New Insteon PLM modem integration option via MQTT

Tags: #<Tag:0x00007f77f9645a28>

The IM system doesn’t support MQTT device discovery - you have to configure them yourself in HA following the examples in config.yaml. If your devices were already configured (paired w/ the modem in BOTH directions), then you just need to issue a refresh command to each device so that IM can download the device database. See the docs here: https://github.com/TD22057/insteon-mqtt/blob/fdfe9a4991349e240f43d9532ed76ad7b24fab0a/docs/mqtt.md

You can send refresh or pair commands that way. I’m pretty certain that HA can be used to send MQTT messages or you can use any external utility to do it. So if you send to the topic insteon/command/aa.bb.cc the payload { "cmd" : "refresh" }, it will get the db for that device. You can try sending the cmd refresh-all to do them all at once. If you have battery devices that won’t work (they have to be awake to see the command) and I have a few devices that don’t respond that well (IOLinc) so you may have to send the refresh command a couple of times before it works.

Thanks for replying so quickly!

I read the documentation you linked already, and I tried (as my first message explained) to send MQTT messages, but nothing is happening in the Mosquitto logs when I do it, and nothing is showing in the Insteon-MQTT logs either. It shows I logged in, but there’s no response to my publishes.

That’s really the part that’s driving me crazy right now - all of the components are installed and can be connected to, but they don’t seem to be listening to each other. Either that or I am not sending a message correctly. I’m not very familiar with MQTT internals, but it seems simple enough with the utilities I’ve tried. Any suggestions? Right now I just want to have Mosquitto and IM communicating, I’ll worry about homeassistant’s device config later.

Let me clarify - IM is connecting successfully to Mosquitto, there’s a successful connection showing in both logs. There’s just no responses to poking MQTT messages into Mosquitto, or any response to events generated by IM in Mosquitto.

It’s quite possible it’s actually Mosquitto is the problem, but I have no idea where to start there since it’s more or less a one liner installation, other than setting up the user Id (which I know I did right because it won’t let the command line tool log in unless the I’d/password is right).

I did find a place for sending mqtt from home assistant itself (in developer tools/services), but when I fill in the mqtt.publish like so:

topic: insteon/command/40.63.c9
payload: ‘{ “cmd” : “refresh” }’
qos: 1
retain: true

Nothing happens. The message doesn’t error out (I was getting that before I put the payload in single quotes), but it doesn’t elicit a response from mosquitto either.

Here’s how I have mosquitto configured:

{
  "logins": [
    {
      "username": "mozzie",
      "password": "(password)"
    }
  ],
  "anonymous": true,
  "customize": {
    "active": false,
    "folder": "mosquitto"
  },
  "certfile": "fullchain.pem",
  "keyfile": "privkey.pem",
  "require_certificate": false,
  "plain": true,
  "ssl": false
}

and here’s how I have my devices setup (the x10 ones are commented out because I can’t figure out how to enter their house and unit codes):

 logging:
  level: 10

insteon:
  port: 'socket://192.168.1.64:9761'
  address: 25.e8.e4
  storage: 'data'

  devices:
    switch:
#      - g2.00.00: 'traffic'       
      - 35.40.18: 'floor'
#      - g5.00.00: 'bedroom'                                               

    dimmer:
      - 26.9d.19: 'table'
      - 41.0e.c9: 'bathroom'
      - 41.14.0a: 'hallway'
      - 24.e4.85: 'dining'
      - 40.63.c9: 'kitchen'
      - 43.c7.bb: 'office'

    motion:
      - 4f.88.a7: 'garagemotion'

    keypad_linc_sw:
      - 39.45.a1: 'keypad'

    outlet:
      - 4e.6d.ef: 'garage'

mqtt:
  broker: core-mosquitto
  port: 1883
  username: mozzie
  password: (password)
  keep_alive: 30
  qos: 1
  retain: 1

  cmd_topic: 'insteon/command'

Everything after that is unchanged from the default yaml configuration.

The IM log shows it’s connecting to mosquitto:

2020-01-16 12:23:39 DEBUG poll: Link connection attempt MQTT core-mosquitto:1883
2020-01-16 12:23:39 INFO Mqtt: MQTT device opened core-mosquitto 1883 with keepalive=30
2020-01-16 12:23:39 DEBUG poll: Link connection success MQTT core-mosquitto:1883
2020-01-16 12:23:39 DEBUG poll: Link added: MQTT core-mosquitto:1883
2020-01-16 12:23:39 DEBUG Mqtt: MQTT subscribe insteon/command/+ qos=1
2020-01-16 12:23:39 DEBUG Mqtt: MQTT subscribe insteon/modem/scene qos=1
(many subscribe messages not shown)

And likewise, mosquitto shows it was connected to from both HA itself and IM:

1579199324: New connection from 172.30.32.1 on port 1883.
[INFO] found homeassistant on local database
1579199325: New client connected from 172.30.32.1 as auto-632408A8-6010-CD04-EC18-317156CF4E0E (p2, c1, k60, u'homeassistant').
1579199327: New connection from 172.30.33.1 on port 1883.
[INFO] found mozzie on local database
1579199327: New client connected from 172.30.33.1 as insteon-mqtt (p2, c0, k30, u'mozzie').

Edit: Woo, progress! I was apparently missing a bit of stuff in the master config.yaml for home assistant. I added this:

mqtt:
  broker: hassio.local
  port: 1883
  username: mozzie
  password: (password)

And now messages are passing between mosquitto and IM succesfully! I sent a refresh all command, and lots and lots of stuff happened.

I’m going to poke around and see if I can actually get lights to work, but it appears my only open question is how do I configure my two X10 devices. Thanks a lot for all the help so far!

Note to Randall (I am limited to the number of replies, I had to edit instead, that’s annoying!:
I can help with this one!

If you’re using hassio, there’s no place for a command line utility. Instead, you need to open up the developer tools, click on “services”, and under service name on the page that opens, put “mqtt.publish”. Inside the message box, you would put your topic and payload. For example, if I want to turn on my hallway light, I would do this:

topic: insteon/41.14.0a/set
payload: on
qos: 1
retain: true

If you want to do that refresh-all command, it looks like this:

topic: insteon/command/modem
payload: '{ "cmd" : "refresh", "force": true}'
qos: 1
retain: true

Alternatively, you can set up an MQTT client utility (such as mqtt-cli, or MQTTBox) and send the messages that way. mqtt-cli is handy if you need to send a bunch of messages multiple times and don’t want to keep cutting and pasting.

Read this message for some more clues (like what you need to do in config.yaml) on the config process.

Edit: If you install the ssh server, you can also do this right from the hassio shell:

[Iris]pv: ssh [email protected]
Enter passphrase for key '/Users/pv/.ssh/id_rsa': 

  _    _                 _       
 | |  | |               (_)      
 | |__| | __ _ ___ ___   _  ___  
 |  __  |/ _` / __/ __| | |/ _ \ 
 | |  | | (_| \__ \__ \_| | (_) |
 |_|  |_|\__,_|___/___(_)_|\___/ 
                                 


Our Cli:
$ hassio help

~ $ mosquitto_pub -h 'core-mosquitto' -t 'insteon/43.c7.bb/set' -m 'on'
~ $ 


Hi, just started with insteon-MQTT on hassio. I keep seeing references to a command line version of insteon-MQTT for sending commands etc to devices but I cant seem to locate it on my system anywhere. Is this script installed as part of the hassio addon or do I need to install it a different way? I’ve gotten switches/dimmers working using the developer MQTT but now I’m trying to set my modem as a controller of a scene and command line seems like the best/only way to do this.

Ah, cool, I didn’t think of using the shell. I’ll give it a try. Thanks!

OK, another question. I have a scene in my office that was set up a long time ago using the insteon app and hub. It consists of the main overhead light and two lamps. The overhead is controller of the scene so if you turn it on the two lamps turn on as well. If I look in the app it is group 23. I’m trying to figure out how to make the modem a controller/responder of this scene so that I can trigger the scene from HA-mqtt. I see this command in the doc that makes a device a controller of another device:

{ "cmd" : "db_add_ctrl_of", "local_group" : ctrl_group,
  remote_addr" : aa.bb.cc, "remote_group" : resp_group,
  ["two_way" : true/false], [refresh" : true/false],
  ["local_data" : [D1,D2,D3]], ["remote_data" : [D1, D2,D3]] } }

Is that what I need?  I don't understand the local_group & remote group.  Wouldn't the groups be the same i.e 23 on both ends?  Does this have to be done for each device in the group?

Can you explain in further details your fix?

I too have the thermostat icon/card only showing like your screenshot.

Thx

Hello all… First of I apologize for posting such newbie questions here but I’m pretty lost…

I have Hassio running on a pi and really want to get my Insteon devices working thru MQTT. I have Mosquitto running and communicating (with zwave3mqtt). I have Insteon-mqtt installed and it seems to start but I believe that I am missing a vital step.

Trying to execute the required device initialization in the Hassio Terminal window results in a “insteon-mqtt” command not found… Does this initialization process have to be executed via my config file??? if so which my config.yaml or /Insteon-mqtt/config.yaml?? and how…

I’ve also tried searching for a few of the files listed lower in the log below with no luck… so I cannot be sure that the add-on was installed correctly

Below is a portion of the Insteon-mqtt add-on log log after starting the add-on…

Any an all help is greatly appreciated.

2020-01-21 08:52:27 DEBUG Base: Device 17.25.9b (kitchen nb) db doesn't exist
2020-01-21 08:52:27 DEBUG Base: Device 17.28.fb (kitchen nh wired) db doesn't exist
Traceback (most recent call last):
  File "/usr/bin/insteon-mqtt", line 5, in <module>
    status = insteon_mqtt.cmd_line.main()
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/cmd_line/main.py", line 330, in main
    return args.func(args, cfg)
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/cmd_line/start.py", line 48, in start
    config.apply(cfg, mqtt_handler, modem)
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/config.py", line 63, in apply
    modem.load_config(config['insteon'])
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/Modem.py", line 137, in load_config
    self._load_devices(data.get('devices', []))
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/Modem.py", line 769, in _load_devices
    devices = dev_class.from_config(values, self.protocol, self,
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/device/Base.py", line 75, in from_config
    device = cls(protocol=protocol, modem=modem, address=addr,
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/device/Dimmer.py", line 50, in __init__
    super().__init__(protocol, modem, address, name)
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/device/Base.py", line 98, in __init__
    self.addr = Address(address)
  File "/usr/lib/python3.8/site-packages/insteon_mqtt/Address.py", line 88, in __init__
    raise Exception(msg)
Exception: Error trying to parse an Insteon address.  The input can be a single integer, string, or 3 bytes or strings.  Inputs: None, None, None

Sure, I’ll say that the lovelace MQTT 'stat isn’t the best in the world, but I did end up with a workable configuration until something better comes along…

Here’s my thermostat config in the insteon-mqtt config.yaml. I don’t remember if I changed anything, but here it is just incase… EDIT: I did make a change, I pulled out the Celsius stuff as we’ll never use that. adjust as needed for your config…

  thermostat:
    # Output state change topic and payload.  Available variables for
    # templating in all cases are:
    #   address = 'aa.bb.cc'
    #   name = 'device name'
    # The following specific variables only apply to the topics listed
    # directly below
    #   temp_c = temperature in celsius
    #   temp_f = temperature in farenheit
    ambient_temp_topic: 'insteon/{{address}}/ambient_temp'
    #ambient_temp_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
    ambient_temp_payload: '{{temp_f}}'
    cool_sp_state_topic: 'insteon/{{address}}/cool_sp_state'
    #cool_sp_state_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
    cool_sp_state_payload: '{{temp_f}}'
    heat_sp_state_topic: 'insteon/{{address}}/heat_sp_state'
    #heat_sp_state_payload: '{"temp_f" : {{temp_f}}, "temp_c" : {{temp_c}}}'
    heat_sp_state_payload: '{{temp_f}}'
    #   fan_mode = "on", "off"
    #   is_fan_on = 0/1
    fan_state_topic: 'insteon/{{address}}/fan_state'
    fan_state_payload: '{{fan_mode.lower()}}'
    #   mode = 'off', 'auto', 'heat', 'cool', 'program'
    mode_state_topic: 'insteon/{{address}}/mode_state'
    mode_state_payload: '{{mode.lower()}}'
    #   humid = humidity percentage
    humid_state_topic: 'insteon/{{address}}/humid_state'
    humid_state_payload: '{{humid}}'
    #   status = "off", "heating", "cooling"
    #   is_heating = 0/1
    #   is_cooling = 0/1
    status_state_topic: 'insteon/{{address}}/status_state'
    status_state_payload: '{{status.lower()}}'
    # Caution, there is no push update for the hold or energy state.  ie, if
    # you press hold on the physical device, you will not get any notice of
    # this unless you run get_status().  There is also no way to programatically
    # change the hold state or energy state
    #   hold_str = 'off', 'temp'
    #   is_hold = 0/1
    hold_state_topic: 'insteon/{{address}}/hold_state'
    hold_state_payload: '{{hold_str.upper()}}'
    # See caution in hold state above
    #   energy_str = 'off', 'on'
    #   is_energy = 0/1
    energy_state_topic: 'insteon/{{address}}/energ_state'
    energy_state_payload: '{{energy_str.upper()}}'

    # Command Topics
    # Available variables for templating all of these commands are:
    #   address = 'aa.bb.cc'
    #   name = 'device name'
    #   value = the input payload
    #   json = the input payload converted to json.  Use json.VAR to extract
    #          a variable from a json payload.
    #
    # Mode state command.  The output of passing the payload through the
    # template must match the following:
    #   { "cmd" : "auto"/"off"/"heat"/"cool","program" }
    mode_command_topic: 'insteon/{{address}}/mode_command'
    mode_command_payload: '{ "cmd" : "{{value.lower()}}" }'
    # Fan state command.  The output of passing the payload through the
    # template must match the following:
    #   { "cmd" : "auto"/"on" }
    fan_command_topic: 'insteon/{{address}}/fan_command'
    fan_command_payload: '{ "cmd" : "{{value.upper()}}" }'
    # Temp setpoint commands. The payloads should be in the form of {temp_c:
    # float, temp_f: float} Only one unit needs to be present.  If temp_c is
    # present it will be used regardless
    heat_sp_command_topic: 'insteon/{{address}}/heat_sp_command'
    heat_sp_payload: '{{value}}'
    cool_sp_command_topic: 'insteon/{{address}}/cool_sp_command'
    cool_sp_payload: '{{value}}'

Here is the thermostat portion of my HA’s configuration.yaml. The important thing here is that I swapped what seems the intuitive configuration of heat/cool setpoint topics such that the low state is populated using the heat sp from the 'stat and the high state is populated using the cool sp from the 'stat:

  - platform: mqtt
    name: Downstairs
    unique_id: downstairs_hvac
    mode_state_topic: 'insteon/22.18.1e/mode_state'
    mode_command_topic: 'insteon/22.18.1e/mode_command'
    current_temperature_topic: 'insteon/22.18.1e/ambient_temp'
    fan_mode_state_topic: 'insteon/22.18.1e/fan_state'
    fan_mode_command_topic: 'insteon/22.18.1e/fan_command'
    temperature_high_state_topic: 'insteon/22.18.1e/cool_sp_state'
    temperature_low_state_topic: 'insteon/22.18.1e/heat_sp_state'
    temperature_high_command_topic: 'insteon/22.18.1e/cool_sp_command'
    temperature_low_command_topic: 'insteon/22.18.1e/heat_sp_command'
    min_temp: 50
    max_temp: 90
    precision: 1
    modes:
      - "off"
      - "cool"
      - "heat"

The lovelace yaml for the climate entity is pretty simple:

entity: climate.downstairs
name: Downstairs
theme: Backend-selected
type: thermostat

All the above produces this:

The left-most slider control controls the heating setpoint, and the right-most control sets the cool setpoint (that’s why I reversed them in the HA configuration.yaml). So this view shows that my heat setpoint is 65F, my cool setpoint is 75F, and I’m currently heating. We never use the “auto” mode on the thermostat so I didn’t include that in my config but it should be easy enough to add if you do.

Hope this helps!
Terry

Not sure if you’ve tried this, but I never used Insteon Terminal in my setup - I did everything from the HA developer tools page --> MQTT tab and sending MQTT commands while listening to insteon/#

I followed the directions from the github page and it worked without issue for me. I’m using this as a custom add-on in HASSIO.

Terry

Thank you for the suggestion… but I think I have lower level problems that need to be worked out before that… it looks like my Insteon-mqtt add-on won’t run… stops after I start with the log I included above…

What version of Home Assistant are you running? If HASSIO/HASSOS - can you describe your environment a little? Also, post your config.yaml for the addon

Terry

I am trying to configure an insteon scene between my serial PLM and an insteon outlet (two independent outlets). I seem to be having issues setting the virtual scene to control both outlets. After messing with it a bunch, I deleted all the links between the PLM and the outlet, did a join/pair and re issued the commands to create the scene. here are my results:
modem = 53.bd.2e, foyer_lights = 46.59.84

foyer_lamps after join/pair  
  2020-01-22 11:12:09 UI Base: DeviceDb: (delta 46)
  0fef: 53.bd.2e grp:   2 type: CTRL data: 0x03 0x00 0x02
  0ff7: 53.bd.2e grp:   1 type: CTRL data: 0x03 0x00 0x01
  0fff: 53.bd.2e grp:   1 type: RESP data: 0xff 0x00 0x02
Unused:
  0fdf: 46.59.84 grp:  30 type: RESP data: 0xff 0x00 0x02 (UNUSED)
  0fe7: 53.bd.2e grp:   2 type: CTRL data: 0x03 0x00 0x02 (UNUSED)
Last:
  0fd7: 00.00.00 grp:   0 type: RESP data: 0x00 0x00 0x00 (UNUSED) (LAST)
GroupMap
  1 -> ['53.bd.2e']
  2 -> ['53.bd.2e']

modem after foyer_lamps join/pair
  ID: 46.59.84  grp: 1  type: CTRL  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 1  type: RESP  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 2  type: RESP  data: 0x02 0x00 0x00

issue following to modem:
{ "cmd" : "db_add_ctrl_of", "local_group" : 30,
  "remote_addr" : "foyer_lamps", "remote_group" : 1,
  "two_way" : true, "refresh" : true }
  
foyer_lamps after command:
  2020-01-22 11:18:50 UI Base: DeviceDb: (delta 50)
  0fe7: 53.bd.2e grp:  30 type: RESP data: 0xff 0x00 0x01
  0fef: 53.bd.2e grp:   2 type: CTRL data: 0x03 0x00 0x02
  0ff7: 53.bd.2e grp:   1 type: CTRL data: 0x03 0x00 0x01
  0fff: 53.bd.2e grp:   1 type: RESP data: 0xff 0x00 0x02
Unused:
  0fdf: 46.59.84 grp:  30 type: RESP data: 0xff 0x00 0x02 (UNUSED)
Last:
  0fd7: 00.00.00 grp:   0 type: RESP data: 0x00 0x00 0x00 (UNUSED) (LAST)
GroupMap
  1 -> ['53.bd.2e']
  2 -> ['53.bd.2e']

modem after command: 
  ID: 46.59.84  grp: 1  type: CTRL  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 1  type: RESP  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 2  type: RESP  data: 0x02 0x00 0x00
  ID: 46.59.84  grp: 30  type: CTRL  data: 0x1e 0x00 0x00
  
issue following to modem:
{ "cmd" : "db_add_ctrl_of", "local_group" : 30,
  "remote_addr" : "foyer_lamps", "remote_group" : 2,
  "two_way" : true, "refresh" : true } 
  
foyer_lamps after command:
2020-01-22 11:22:47 UI Base: DeviceDb: (delta 51)
  0fe7: 53.bd.2e grp:  30 type: RESP data: 0xff 0x00 0x02
  0fef: 53.bd.2e grp:   2 type: CTRL data: 0x03 0x00 0x02
  0ff7: 53.bd.2e grp:   1 type: CTRL data: 0x03 0x00 0x01
  0fff: 53.bd.2e grp:   1 type: RESP data: 0xff 0x00 0x02
Unused:
  0fdf: 46.59.84 grp:  30 type: RESP data: 0xff 0x00 0x02 (UNUSED)
Last:
  0fd7: 00.00.00 grp:   0 type: RESP data: 0x00 0x00 0x00 (UNUSED) (LAST)
GroupMap
  1 -> ['53.bd.2e']
  2 -> ['53.bd.2e']

modem after command:
  ID: 46.59.84  grp: 1  type: CTRL  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 1  type: RESP  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 2  type: RESP  data: 0x02 0x00 0x00
  ID: 46.59.84  grp: 30  type: CTRL  data: 0x1e 0x00 0x00  

I guess I don’t understand how this is supposed to work. I thought I would see two group 30 responders in foyer_lamps (groups 1 & 2), but it seems that only the last one I issued shows up. i.e. if I were to now issue a ctrl_of command for group 30 of the modem to group1 of foyer lamps the current entry in foyer_lamps for group 30 would get replaced with one that controls group 1. The net result is that my scene can control one of the outlets but not both.

For reference foyer_lamps is defined in config.yaml like

    # On/off ouetlets
    outlet:
       - 46.59.84: 'foyer_lamps'

I am running hassio 0.103.5

Hello all…
I am running Hassio on a Pi3 and have some some Insteon devices working with mqtt and HA. I believe my existing problems are due to not being able to complete the required device initialization.

Can anyone explain how and where this is done… I’ve read the help file stating that this can be executed at anytinme from the command line…

insteon-mqtt config.yaml join aa.bb.cc
insteon-mqtt config.yaml pair aa.bb.cc
insteon-mqtt config.yaml sync aa.bb.cc
  • Does this only work if installed on linux distribution??? I tried running in a Hassio terminal window and the command is not found.

  • Is there a primer for installing Insteon-mqtt command line support on Hassio???

Thank you
K

Insteon-mqtt is not included with hassio. To do the inititialization steps, click on developer tools and then mqtt. There you will be able to post directly to an mqtt topic. So to join a device for example, the topic would be insteon\command\aa.bb.cc and the command would be { “cmd” : “join” }.

Terry-

I’m having an issue w/insteon-mqtt and two 2411TH thermostats - It doesn’t seem to be sending the ambient_temp without me having to poll the thermostats w/the refresh command every 10 mins or so. I’m curious if you’re seeing the regular temperature notifications (ambient and humidity).

I used the wireless stick and also the PLM to no avail. Indigo seems to have no issue access the data however, it’s just Insteon-mqtt.

Here’s a dump of my thermostat and modem - was wondering if you could compare w/your settings…

THERMOSTAT:

* 1faf: 31.18.d7 grp: 239 type: CTRL data: 0x03 0x00 0xef
* 1fb7: 31.18.d7 grp: 4 type: CTRL data: 0x03 0x00 0x04
* 1fbf: 31.18.d7 grp: 3 type: CTRL data: 0x03 0x00 0x03
* 1fc7: 31.18.d7 grp: 2 type: CTRL data: 0x03 0x00 0x02
* 1fcf: 31.18.d7 grp: 1 type: CTRL data: 0x03 0x00 0x01
* 1fd7: 31.18.d7 grp: 1 type: RESP data: 0xff 0x00 0x01

MODEM:

* ID: 4c.7f.fc grp: 0 type: CTRL data: 0x00 0x00 0x00
* ID: 4c.7f.fc grp: 1 type: RESP data: 0x01 0x00 0x00
* ID: 4c.7f.fc grp: 1 type: CTRL data: 0x01 0x00 0x00
* ID: 4c.7f.fc grp: 2 type: RESP data: 0x02 0x00 0x00
* ID: 4c.7f.fc grp: 3 type: RESP data: 0x03 0x00 0x00
* ID: 4c.7f.fc grp: 4 type: RESP data: 0x04 0x00 0x00
* ID: 4c.7f.fc grp: 239 type: RESP data: 0x00 0x00 0xef

Thanks,

-Herb

I sort of got this working by running a linking command group 30 on the modem to groups 1 & 2 on the foyer lamps. After doing that, the db for the devices look like this:

modem:

  ID: 46.59.84  grp: 1  type: CTRL  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 1  type: RESP  data: 0x01 0x00 0x00
  ID: 46.59.84  grp: 2  type: RESP  data: 0x02 0x00 0x00
  ID: 46.59.84  grp: 30  type: CTRL  data: 0x02 0x39 0x44

foyer_lamps:

  0fdf: 53.bd.2e grp:  30 type: RESP data: 0xff 0x1c 0x01
  0fe7: 53.bd.2e grp:  30 type: RESP data: 0xff 0x1c 0x02
  0fef: 53.bd.2e grp:   2 type: CTRL data: 0x03 0x00 0x02
  0ff7: 53.bd.2e grp:   1 type: CTRL data: 0x03 0x00 0x01
  0fff: 53.bd.2e grp:   1 type: RESP data: 0xff 0x00 0x02

This looks correct (to me at least). Now when I trigger the scene, The lights turn on/off as expected with the scene but only the status of group 2 gets updated. I have done multiple refresh commands to no avail

If I look at the insteon mqtt log it looks like this:

2020-01-23 21:09:58 DEBUG Modem: Modem message insteon/modem/scene b'{ "cmd" : "on", "group" : 30 }'
2020-01-23 21:09:58 DEBUG MsgTemplate: Input template render: '{ "cmd" : "on", "group" : 30 }'
2020-01-23 21:09:58 INFO Modem: Modem input command: {'cmd': 'on', 'group': 30}
2020-01-23 21:09:58 INFO Modem: Modem scene 30 on=on
2020-01-23 21:09:58 INFO Protocol: Write message to modem: Modem Scene: grp: 30 cmd: 0x11 0x00
2020-01-23 21:09:58 DEBUG Protocol: Write bytes to modem: b'\x02a\x1e\x11\x00'
2020-01-23 21:09:58 DEBUG Serial: Wrote 5 bytes to serial /dev/ttyUSB0
2020-01-23 21:09:58 INFO Protocol: Read 0x61: Modem Scene: grp: 30 cmd: 0x11 0x00 ack: True
2020-01-23 21:09:58 DEBUG Protocol: Passing msg to write handler: ModemScene handler
2020-01-23 21:09:59 INFO Protocol: Read 0x58: All link status ack: 1
2020-01-23 21:09:59 DEBUG Protocol: Passing msg to write handler: ModemScene handler
2020-01-23 21:09:59 DEBUG ModemScene: Modem scene 30 command ACK
2020-01-23 21:09:59 DEBUG Modem: Found 1 responders in group 30
2020-01-23 21:09:59 DEBUG Modem: Group 30 -> ['46.59.84']
2020-01-23 21:09:59 INFO Modem: 53.bd.2e (modem) broadcast to 46.59.84 for group 30
2020-01-23 21:09:59 INFO Outlet: Setting device 46.59.84 (foyer_lamps) grp: 2 on True normal scene
2020-01-23 21:09:59 INFO Outlet: MQTT received on/off 46.59.84 (foyer_lamps) grp: 2 on: True normal 'scene'
2020-01-23 21:09:59 DEBUG Mqtt: MQTT publish insteon/46.59.84/state/2 ON qos=1 ret=1
2020-01-23 21:09:59 DEBUG Protocol: Write handler finished
2020-01-23 21:09:59 DEBUG Mqtt: MQTT writing
2020-01-23 21:09:59 INFO Protocol: Read 0x50: Std: 46.59.84 Type.CLEANUP_ACK grp: 1e cmd: 11 1e
2020-01-23 21:09:59 DEBUG Protocol: Setting next write time: 1579835399.494647
2020-01-23 21:09:59 DEBUG MsgHistory: Received 0 hops, total 0 for 11 entries
2020-01-23 21:09:59 WARNING Protocol: No read handler found for message type 0x50: Std: 46.59.84 Type.CLEANUP_ACK grp: 

From this I see the scene get fired and then I see group 2 get updated but not group 1.

Is this a bug or am I missing something here?

It’s probably a bug. The search is probably finding the first entry that matches the address/group and not all of the entries. I’m in the middle of a remodel so my computer is packed away right now. I’ll try and take a look next week.

Hi,
Has anyone had success getting battery level reports from an Insteon motion sensor?