I would love to help create a pure Java implementation of insteon-terminal

40 views
Skip to first unread message

matt domanowski

unread,
Jan 9, 2021, 9:52:36 PM1/9/21
to insteon-terminal

I have a legacy home automation solution that runs completely in Java but it used old X10 modem (From Radio Shack.. Seriously that old).  I have been looking for a native Java class to replace the old X10 modem class but haven't been able to find one.

Any thoughts on how hard it would be to add that functionality to insteon-terminal?  It looks like you are using Python binding into Java already (Not a Python Programmer so I could be wrong)

Thanks!

Matt

dan.pf...@gmail.com

unread,
Jan 9, 2021, 10:18:49 PM1/9/21
to insteon-terminal
This tool was originally created to help with the development of the OpenHAB insteon binding, which you can find here:
https://www.openhab.org/addons/bindings/insteon/
and the corresponding source code for the original binding you can browse through here:

Currently there exists an experimental pure-python version of the insteon terminal with some extra features (such as saving and reflashing the linkdb of devices),
but I haven't had the time to develop it in the last year and so it isn't at feature-parity with the existing insteon terminal. The semi-java semi-python nature of the current insteon terminal
is mainly because it was faster to get the tool off the ground when it was first written, but in retrospect is certainly a drawback to the application.

Daniel

matt domanowski

unread,
Jan 11, 2021, 10:21:02 AM1/11/21
to insteon-terminal
Fantastic.  That source gives me a great place to start.  Thanks!

matt domanowski

unread,
Jan 14, 2021, 2:12:13 PM1/14/21
to insteon-terminal
I have began dissecting exactly how the Python scripts interact with the Java classes.
As an initial tinker, I am trying to get a light module to turn off.
Although I am not getting an error back, I am not get the module to turn off.

I know all of the switch is configured and linked correctly because I can send

curl -u myser http://192.168.39.100:25105/3?026254aa910F11FF=I=3 to turn on and
curl -u myser http://192.168.39.100:25105/3?026254aa910F1100=I=3 to turn off

import java.io.IOException;

import us.pfrommer.insteon.msg.FieldException;
import us.pfrommer.insteon.msg.IOPort;
import us.pfrommer.insteon.msg.InsteonAddress;
import us.pfrommer.insteon.msg.Msg;
import us.pfrommer.insteon.msg.hub.HubStream;

public class NeuMain {


    public static void main(String[] args) throws IOException, FieldException {
        HubStream hs = new HubStream("192.168.39.100", 25105, 1000, "myser", "mypass");
        hs.open();
        IOPort ioPort=new IOPort(hs);
   

        Msg msg = Msg.s_makeMessage("SendStandardMessage");
        msg.setAddress("toAddress", new InsteonAddress("54.aa.91"));
        msg.setByte("messageFlags", (byte)0x1f);
        //msg.setByte("command1", (byte)0x11);
        msg.setByte("command2", (byte)0x11);
        ioPort.write(msg);

       
        hs.close();
       
   
    }

}

--
You received this message because you are subscribed to a topic in the Google Groups "insteon-terminal" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/insteon-terminal/QVkHyoJIuZg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to insteon-termin...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/insteon-terminal/4cedbae1-fae3-4a59-9a53-68793f2120b2n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages