Hi Tom,
I was just guessing with the device type. I found a reference to EzRain in the very old (2008) list of devices here (http://cache.insteon.com/pdf/INSTEON_DevCats_and_Product_Keys_20081008.pdf) although the number 0x000001 seems unlikely. So I just called tech support at SmartenIt who seems to own this product now. They asked me to e-mail them my question so we’ll see if I get an answer.
So now my items file (/etc/openhab2/items/ezrain.items) looks like this:
Switch FrontYardOn “Front yard [%d]” { insteonplm=“05.93.D6:0x000001#ValveOn”}
Switch FrontYardOff “Front yard [%d]” { insteonplm=“05.93.D6:0x000001#ValveOff”}
Switch BackYardOn “Back yard [%d]” { insteonplm=“05.93.D6:0x000001#ValveOn”}
Switch BackYardOff “Back yard [%d]” { insteonplm=“05.93.D6:0x000001#ValveOff”}
I’m still not sure how to specify which valve to control. Do I need to to create a Valve1On, Valve2On etc?
I modified my config file (etc/openhab2/services/insteonplm.cfg) and added these 2 lines:
more_devices=/usr/local/openhab/rt/extra_devices.xml
more_features=/usr/local/openhab/rt/ezrain_features.xml
The extra_devices file looks like this:
<xml>
<device productKey="0x000001">
<model>5010A</model>
<feature name="ValveOn">ValveOn</feature>
<feature name="ValveOff">ValveOff</feature>
</device>
</xml>
When I restart openHAB I get this:
2017-12-29 16:35:13.946 [INFO ] [er.internal.HomeBuilderDashboardTile] - Started Home Builder at /homebuilder
2017-12-29 16:35:14.758 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at http://192.168.2.19:8080
2017-12-29 16:35:14.760 [INFO ] [.dashboard.internal.DashboardService] - Started dashboard at https://192.168.2.19:8443
2017-12-29 16:35:16.379 [ERROR] [io.openhabcloud.internal.CloudClient] - Socket.IO error: not authorized
2017-12-29 16:35:17.846 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'ezrain.items’
2017-12-29 16:35:18.971 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2017-12-29 16:35:19.742 [INFO ] [basic.internal.servlet.WebAppServlet] - Started Basic UI at /basicui/app
2017-12-29 16:35:19.775 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2017-12-29 16:35:19.823 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2017-12-29 16:35:19.862 [INFO ] [nding.insteonplm.InsteonPLMActivator] - Insteon PLM binding has been started.
2017-12-29 16:35:19.941 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - read additional device definitions from /usr/local/openhab/rt/extra_devices.xml
2017-12-29 16:35:19.941 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - reading additional feature templates from /usr/local/openhab/rt/ezrain_features.xml
2017-12-29 16:35:19.996 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - dead device timeout set to 3000s
2017-12-29 16:35:20.001 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: port_0 -> /hub2/Elizabet:Hllze9WB@192.168.2.27:25105,poll_time=1000
2017-12-29 16:35:20.001 [INFO ] [b.core.service.AbstractActiveService] - InsteonPLM has been started
2017-12-29 16:35:20.003 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - devices: 0 configured, 0 polling, msgs received: 0
2017-12-29 16:35:20.018 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: more_features -> /usr/local/openhab/rt/ezrain_features.xml
2017-12-29 16:35:20.018 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: more_devices -> /usr/local/openhab/rt/extra_devices.xml
2017-12-29 16:35:20.019 [INFO ] [g.insteonplm.InsteonPLMActiveBinding] - config: service.pid -> org.openhab.insteonplm
2017-12-29 16:35:20.106 [ERROR] [steonplm.internal.device.PollHandler] - error trying to create message handler: DefaultPollHandler
java.lang.ClassNotFoundException: org.openhab.binding.insteonplm.internal.device.PollHandler$DefaultPollHandler cannot be found by org.openhab.binding.insteonplm_1.11.0
and then similar stuff for the unknown comands ValveOnCommandHandler and ValveOffCommandHandler.
So now I think I have to write those commands so openHAB can send the 0x40 and 0x41 commands to the device.
Steve
and the ezrain_features files like this:
<xml>
<feature name="ValveOn">
<message-dispatcher>DefaultDispatcher</message-dispatcher>
<command-handler command="OnOffType">ValveOnCommandHandler</command-handler>
<poll-handler>DefaultPollHandler</poll-handler>
</feature>
<feature name="ValveOff">
<message-dispatcher>DefaultDispatcher</message-dispatcher>
<command-handler command="OnOffType">ValveOffCommandHandler</command-handler>
<poll-handler>DefaultPollHandler</poll-handler>
</feature>
</xml>