Insteon and MQTT

hey guys
i have two problems
1- i linked and configer insteon it works for one time and one button but the status doesn’t update in the platform and every time i have to restart the home assistant too use is also for one time ?

2- how i can link the insteon devices with the MQTT ?

You can try my new system: New Insteon PLM modem integration option via MQTT - it does require running it as a separate process but it’s designed to work w/ HA and MQTT.

I notice that for on/off devices (I’m testing specifically an ICON switch) when I turn the device ON, I get the MQTT response “insteon/aa.bb.cc/state ON” which is all good and proper. If for some reason hass restarts, and the state of the device is lost, I thought that as a quick and dirty solution, I could simply turn it on again, and get the status to update.
However, when monitoring mqtt, I see the command “insteon/aa.bb.cc/set ON” on the bus, but I never see the “state ON” response.
If I go into the command prompt and run “insteon-mqtt refresh /opt/insteon-mqtt/config.yaml aa.bb.cc” then the “state ON” message is shown in the MQTT log, and hass now reflects the status.

I realize that I could probably avoid this by setting “startup_refresh” to True in the insteon-mqtt config.yaml, but 1) Its going to be slow, and 2) I hate to have to restart the insteon-mqtt service for this. It’s been chugging along great since I got it installed.

Could we look at ensuring that any time a set message is received by insteon-mqtt, a state message is sent in response, even if the set message was superfluous?

I removed the “if state is already X, don’t set to X” check in the development branch. I’ll push out a new release next week with that update (or you can checkout the dev branch any time).

I think the solution you want is to set retain: 1 in the MQTT portion of the config file. It causes the MQTT broker to store the last state message received for every device so each time HASS connects, the state is updated. Basically the whole point of sending “retained” state messages in MQTT is to insure that new connections get updated values for everything.

The startup_refresh option might still be a good idea as it insures that if you do need to stop and restart the process that it’s internal state will be in sync w/ the devices.

total new bee here (and not linux inclined) … Just got hass running on hass.io … I installed the insteon local … it works, but limited
is there a way to run this on hass.io ?
can anybody provide a step by step how to do it

@Haddood Please post requests over in the main thread. I’ve added a request for hass.io support but I don’t use that so it might take me a little while to get to.
New Insteon PLM modem integration option via MQTT