I’ve been watching development of a couple of other Insteon modem softwares (insteon mqtt in particular). They recently added the ability to change the “on level” of dimmers without turning on/off the light. I spent some time poking around their code and the Insteon PLM code here on OpenHAB. I’ve been able to put together a new “my_own_devices.xml” and “my_own_features.xml” for my Insteon binding that seems to let me control the dimmer on level of my lights!
I think this is new for OpenHAB - at least I haven’t seen it mentioned anywhere on the forms. If someone knows a better way to do this please share it.
my_own_devices.xml looks like:
<xml>
<device productKey="F00.00.91">
<model>2477G</model>
<description>Garrett Dimmer</description>
<feature name="dimmer">GenericDimmer</feature>
<feature name="manualchange">ManualChange</feature>
<feature name="fastonoff">FastOnOff</feature>
<feature name="lastheardfrom">GenericLastTime</feature>
<feature_group name="ext_group" type="ExtStatusGroup">
<feature name="ledbrightness">LEDBrightness</feature>
<feature name="ramprate">RampRate</feature>
<feature name="onlevel">OnLevel</feature>
</feature_group>
</device>
</xml>
my_own_features looks like:
<xml>
<feature name="OnLevel">
<message-dispatcher>DefaultDispatcher</message-dispatcher>
<!-- handles direct extended message after query -->
<message-handler cmd="0x2e" ext="1" match_cmd1="0x2e" match_cmd2="0x00" match_d2="0x01" low_byte="userData8">NumberMsgHandler</message-handler>
<!-- handles direct ack after poll-->
<message-handler cmd="0x19">TriggerPollMsgHandler</message-handler>
<message-handler default="true">NoOpMsgHandler</message-handler>
<command-handler command="DecimalType" ext="1" cmd1="0x2e" d1="0x01" d2="0x06" factor="1" value="userData3">NumberCommandHandler</command-handler>
<command-handler default="true">NoOpCommandHandler</command-handler>
<poll-handler>NoPollHandler</poll-handler> <!-- polled by ExtStatusGroup -->
</feature>
</xml>
And an example item:
Number OnLevelCloset "Closet On Level" {insteonplm="46.b4.48:F00.00.91#onlevel"}
NOTE: the error below was fixed when I changed all items of Insteon address 46.b4.48 to device type F00.00.91. I haven’t seen any errors for a while after this fix. (Edit October 14, 2018)
I say this “seems to work” because I’ve had trouble during a couple of OH restarts. The error I get is:
2018-09-23 19:06:10.115 [ERROR] [g.insteonplm.InsteonPLMActiveBinding] - item OnLevelCloset references unknown feature: onlevel, item disabled! Known features for F00.00.91 are: dimmer, fastonoff, lastheardfrom, ledbrightness, manualchange, ramprate.
This error is odd to me because on boot the insteon binding correctly loaded my two xml files - if anyone has suggestions about why this could happen and how to prevent it in the future, I’m listening. But for now I’m off to go write rules to change my dimmers to have dynamic on levels based on how high the sun is in the sky!
Edit January 18, 2019: submitted pull request to make this part of everyone’s Insteon features!