Insteon Hub 2242-422 setup up

Hi all.
I am trying to get an insteon 2242-422 hub to work with openhab 1.8.2 and I can’t find anywhere that says it whether it should or not for a start. If I assume that it does, I am trying to use the PLM binding and add a single motion sensor to test with either mongodb or mysql as persistence
To start I have switched on logging as per the troubleshooting suggestion but I seeing nothing that seem to point to either a successful connection to the hub or a failure. Can anyone suggest a good plan for setting up my initial connection? Let me know which files you need to see to get it working properly if you are able to help.
many thanks.
Mark

This is in logback.xml

<!-- INSERTED FOR LOGGING DURING TESTING -->
<appender name="INSTEONPLMFILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${openhab.logdir:-logs}/insteonplm.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
        <fileNamePattern>${openhab.logdir:-logs}/insteonplm-%d{yyyy-ww}.log.zip</fileNamePattern>
<maxHistory>30</maxHistory>
</rollingPolicy>
<encoder>
        <pattern>%d{yyyy-MM-dd HH:mm:ss} %-5level %logger{30}[:%line]- %msg%n%ex{5}</pattern>
</encoder>
</appender>
<!-- Change DEBUG->TRACE for even more detailed logging -->
<logger name="org.openhab.binding.insteonplm" level="TRACE" additivity="false">
<appender-ref ref="INSTEONPLMFILE" />
</logger>

this is showing up in openhab.log

2016-04-15 11:26:02.569 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:26:02.865 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:26:02.866 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:27:03.220 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:27:03.221 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:27:03.486 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:27:03.487 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:28:03.839 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:28:03.840 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:28:04.097 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:28:04.098 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:29:04.413 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:29:04.414 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:29:04.683 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:29:04.684 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:30:05.013 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:30:05.014 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:30:05.285 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:30:05.286 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:31:05.591 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:31:05.592 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:31:05.900 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:31:05.901 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:32:06.224 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:32:06.225 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:32:06.483 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:32:06.484 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:33:06.796 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:33:06.797 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:33:07.057 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:33:07.058 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:34:07.375 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:34:07.376 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:34:07.631 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:34:07.632 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:35:07.962 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:35:07.963 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:35:08.217 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:35:08.218 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:36:08.534 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:36:08.535 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized
2016-04-15 11:36:08.793 [WARN ] [.httpclient.HttpMethodDirector] - Unable to respond to any of these challenges: {oauth=OAuth oauth_problem=“OST_OAUTH_PARAMETER_ABSENT_ERROR”, realm=“yahooapis.com”}
2016-04-15 11:36:08.795 [WARN ] [g.openhab.io.net.http.HttpUtil] - Method failed: HTTP/1.1 401 Unauthorized

A few things for you:

  • Have you connected your motion sensor to your hub? (outside of openHAB)
  • Can you post what you have in your openhab.cfg file for the PLM binding config?
  • Can you post what you have for your motion sensor in your .items file?
  • Can you post what you have for your motion snesor inyour .sitemap file?

Hi Tommycw10
Thanks for your reply

Yes I have the motion sensor working as a device in insteon with it setup as part of a scene that switches a mains socket on and off so that is OK.

openhab.cfg insteon section. I have used the username and password not from the bottom of the hub as there isn’t one. I use the combination that is in the android app.

The insteon PLM controller port, one for each modem or hub.

You can have multiple ports, but that has never been tested, use at your own peril.

examples of valid port configurations for serial or usb modems:

Linux, with serial port symlinked to /dev/insteon:

insteonplm:port_0=/dev/insteon

Linux, with plain old serial modem:

insteonplm:port_0=/dev/ttyS0

Linux, with usb based PLM modem:

insteonplm:port_0=/dev/ttyUSB0

Windows, with serial/usb modem on COM1:

insteonplm:port_0=COM1

to connect to an Insteon Hub2 (the 2014 version) on port 25105 with

a poll interval of 1000ms = 1sec, use the following line. Use the login

and password that is printed on the label on the bottom of the hub,

NOT the Insteon online login and password!

EDIT HERE

insteonplm:port_0=/hub2/my_user_name:my_password@myinsteonhub.mydomain:25105,poll_time=1000

insteonplm:port_0=/hub2/MYUSER:MYPASS@192.168.2.17:25105,poll_time=1000

to connect to the raw tcp feed on an older Insteon Hub (pre 2014 version) on port 9761

insteonplm:port_0=/hub/localhost:9761

Poll interval (optional, in milliseconds, defaults to 300000).

Poll too often and you will overload the insteon network, leading to sluggish

or no response when trying to send messages to devices. Poll too rarely and it’ll

take a long time to establish the correct state of all devices.

The default poll interval of 300s has been tested and found to be a good

compromise in a configuration of about 110 switches/dimmers.

EDIT HERE

insteonplm:poll_interval=300000

insteonplm:poll_interval=120000

If the modem database download times out prematurely (while the download is

still making progress), bump this parameter. Timeout is in milliseconds, default is 120000.

You should not have to adjust this parameter. Please post on the openhab forum if you do

have to bump it.

insteonplm:modem_db_retry_timeout=120000

optional file with additional device types. The syntax of

the file is identical to the device_types.xml file in the

source tree. Please remember to post successfully added

device types to the openhab group so the developers

can include them into the device_types.xml file!

#insteonplm:more_devices=/path_to_file/more_devices.xml

optional file with additional feature templates, like

in the device_features.xml file in the source tree.

#insteonplm:more_features=/path_to_file/more_features.xml

The .items file:

Group All
Group gGF (All)

Group GF_Living “Living Room” (gGF)

Group:Contact:OR(OPEN, CLOSED) Windows “Movement [(%d)]” (All)

Contact motionSensor “motion sensor [MAP(contact.map):%s]” {insteonplm=“2D.3F.0B:0x00004A#contact”}
Number motionSensorBatteryLevel “motion sensor battery level [%.1f]” {insteonplm=“2D.3F.0B:0x00004A#data,field=battery_level”}
Number motionSensorLightLevel “motion sensor light level [%.1f]” {insteonplm=“2D.3F.0B:0x00004A#data,field=light_level”}

sitemap, (this is a real guess)

sitemap demo label=“testout”
{
Frame {
Group item=gGF label=“Ground Floor” icon=“groundfloor”

        Frame label="Demo" {
    Text label="Test" icon="groundfloor" {
        Group item=Windows
    }
}
    Text label="Widget Overview" icon="chart" {
        Frame label="Binary Widgets" {
            Switch item=DemoSwitch label="Toggle Switch"
            Switch item=DemoSwitch label="Button Switch" mappings=[ON="On"]
        }
        Frame label="Map/Location" {
            Mapview item=DemoLocation height=10
        }
        
    }
}

}

In your .cfg file I can’t tell what you have commented out and what isn’t Not sure if it is a cut/paste error? At first I thought you had both a PLM and a hub configured, but then I realized that you have even plain test not showing as commented out. Can you have a look and repost?

These are the live lines

insteonplm:port_0=/hub2/MYUSER:MYPASS@192.168.2.17:25105,poll_time=1000

insteonplm:poll_interval=120000

Mark,

I think you are using the old (pre 2014 2242-222) hub but are using the new (2245-222) configuration for the binding. I’m guessing you should be using this:

to connect to the raw tcp feed on an older Insteon Hub (pre 2014 version) on port 9761

insteonplm:port_0=/hub/localhost:9761

Not this:

to connect to an Insteon Hub2 (the 2014 version) on port 25105 with

a poll interval of 1000ms = 1sec, use the following line. Use the login

and password that is printed on the label on the bottom of the hub,

NOT the Insteon online login and password!

insteonplm:port_0=/hub2/my_user_name:my_password@myinsteonhub.mydomain:25105,poll_time=1000

I think that is why you also don’t have a uname/passwd on the bottom of your hub.

According to the label on the bottom the default port is 25105 and the model is a 2242-422 rev C. Perhaps I am trying to use something that just won’t work. If this is the case I need to have a real hard think of what to do; my PhD revolves around getting this setup working… I don’t have anything else to take its place.

Hi Mark,

According to the PLM binding wiki page:

This binding provides access to the Insteon network by means of either an Insteon PowerLinc Modem (PLM), a legacy Insteon Hub 2242-222 (pre-2014) or the new 2245-222 (“2014”) Insteon Hub.

It doesn’t mention anything about a 2242-422 and I guess I’m not sure what that model is. I was suspecting it was a typo of 2242-222. Maybe @Bernd_Pfrommer can comment further? Have you looked at the Insteon Hub binding page? That one says it supports legacy hubs, but doesn’t state the model number.

Tom
I have made some progress; this Insteon page has the some info on the hub I have. It looks like a 2012 version. The username and password are changed at setup using the Insteon app. I have found an extremely basic error, I had an old IP address in the PLM config section! :rage: This, obviously did not hep at all. The log file seems to show lots of stuff now file on pastebin . There is loads of stuff being listed that is not from my items file though. If you have time, perhaps you could take a look?

Getting new errors now about the modem db.

2016-04-15 20:18:59 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!
2016-04-15 20:18:59 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!
2016-04-15 20:19:10 WARN o.o.b.i.i.message.MsgFactory[:121]- got unknown command code 0x11
2016-04-15 20:19:10 WARN o.o.b.i.internal.driver.Port[:266]- bad data received: got unknown command code 0x11
2016-04-15 20:19:10 WARN o.o.b.i.internal.driver.Port[:269]- got bad data back, must assume message was acked.
2016-04-15 20:19:10 DEBUG o.o.b.i.internal.driver.Port[:382]- writing (0): OUT:Cmd:0x69|
2016-04-15 20:20:59 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!
2016-04-15 20:20:59 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!
2016-04-15 20:22:59 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!
2016-04-15 20:22:59 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!
2016-04-15 20:24:59 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!
2016-04-15 20:24:59 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!
2016-04-15 20:26:59 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!
2016-04-15 20:26:59 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!
2016-04-15 20:27:21 WARN o.o.b.i.i.message.MsgFactory[:121]- got unknown command code 0x11
2016-04-15 20:27:21 WARN o.o.b.i.internal.driver.Port[:266]- bad data received: got unknown command code 0x11
2016-04-15 20:27:21 WARN o.o.b.i.internal.driver.Port[:269]- got bad data back, must assume message was acked.
2016-04-15 20:27:21 DEBUG o.o.b.i.internal.driver.Port[:382]- writing (0): OUT:Cmd:0x69|

Thanks for your help so far!

OK - cool. Looks like you are connecting to the hub now and it’s finding 41 insteon devices. I do see some errors where it is trying to download the DB, but not sure if that is a problem or not. Might be an issue with this model not officially being supported, but not sure. Did you look at the Insteon Hub binding rather than this Insteon PLM binding. The hub binding seem to support the older hubs.

Also, did you create that sitemap entry I suggested for the motion? If this is working, you should be able to see it chage states one of the front ends.

Tom
Not sure why I seem to have 41 devices, must be that they are multiple use devices. I have two motion sensors, two open / close sensors and a power socket configured in the app.

I can’t find your advice about the sitemap entry?

I have found out the model number!
2242-222 (US)
2242-422 (EU)
2242-442 (UK)
2242-522 (AUS/NZ)

This means that I should be able to use the PLM binding so the problems with the modem db must be real problems, not a config issue. I am going to wipe all the devices from the system with the exception of the one motion sensor and see what the db looks like on start up.

The 2242-422 seems to be the european version of the 2242-222. Either way, it’s an older hub, and the raw port access should be used, on port 9761.

Just see that you have already figured that one out, guess I’m late to the party.

Looked at the pastebin files: the modem database does not seem to load at all, it only gets junk data from the hub. The 41 devices are the ones known to the binding, has nothing to do with how many devices are actually linked with your hub.
What port are you connecting to? Can you please post all openhab.cfg lines that pertain to the insteonpm binding?

Hi Bernd

I am using the PLM binding with :

insteonplm:port_0=/hub/192.168.2.132:9761

as the only line in the cfg file that pertains to PLM

I can talk to the hub using a browser to port 9761 and I can see valid pages so that side seems OK.

Am I right in thinking that this means that openhab knows about the two devices in the items file or does it mean that the two devices are the two configured on the hub and openhab has found aout about them?

2016-04-16 10:05:28 DEBUG o.o.b.i.InsteonPLMActiveBinding[:220]- item doorSensor binding changed: addr=23.38.BE|prodKey: 0x000049|feature:contact

2016-04-16 10:05:28 DEBUG o.o.b.i.InsteonPLMActiveBinding[:220]- item motionSensorLightLevel binding changed: addr=2D.3F.0B|prodKey: 0x00004A|feature:data|params:field=light_level

….

….

2016-04-16 10:13:27 DEBUG o.o.b.i.internal.driver.Port[:122]- clearing modem db!

2016-04-16 10:15:26 INFO o.o.b.i.InsteonPLMActiveBinding[:670]- devices: 2 configured, 0 polling, msgs received: 0

2016-04-16 10:15:27 WARN o.o.b.i.i.d.ModemDBBuilder[:74]- modem database download unsuccessful, restarting!

Another thought, is it worth a full reset of the hub and starting again?

You shouldn’t see valid http pages on port 9761, but rather a raw byte stream. There will be occasionally a few corrupted messages, and maybe the binding will retry a couple of times until it gets the full database. But in your case it doesn’t get any valid data from the hub. Just to confirm: you are saying you are getting valid HTTP pages on port 9761?

and

If I change the system to another port, for example I changed it in the app to 25501 then I can see the same pages.

Odd then?

Bernd

I have been running a wireshark trace on the network and I am not seeing any kind of communication between the Insteon hob and my Linux machine running openHAB. Should I not be seeing at least something passing between them? This is even after a restart of openHAB.

Most weird this device behaves. I don’t own such a hub, but bazillions of other users are running the insteonplm binding with this hub (or rather, the US version of it) successfully enough to complain about one device or the other not working.

Begs the question what is different about your hub. Have you tried rebooting it? Factory reset would be last resort, as you will lose all config on it.

Other option is trying to reach it with HouseLinc. It has a habit of erasing your config info as well, but afaik, it accesses the raw plm port 9761 to do its job. Meaning that if HouseLinc works, so should the binding.

Hi Bernd
I have done a complete reset after trying houselinc as this did not see the hub. I can now talk to the hub using houselinc. Adding devices through the app has not populated the houselinc database as far as I can see though. I have stuck a new pastebin file up with the latest set of errors in the insteonplm debug file on openhab. The messages are different so I think that it might be getting further but there is a message saying that the port has not been connected to at 12:25:37. Any further ideas or suggestions?

http://pastebin.com/yudpEXTD