Re: [mh] MQTT Not Reliable
Giles Godart-Brown <[email protected]> Tue, 22 Aug 2023 19:08:06 +0100
| Newsgroups | gmane.comp.misc.misterhouse.user |
|---|---|
| Message-ID | <[email protected]> |
I also have a lot of MQTT devices using the native MH code with no major issues. Giles On 22/08/2023 17:50, H Plato wrote: > On an unrelated note, is the insteon MQTT code more reliable than the > native MH support? Why did you switch? > > I don’t have 120 devices, but probably 50 or so devices and it’s > pretty good for reliability with the odd device exception. I have a > challenge with some keypadlincs getting them to sync. the MH code > seems to give up after a period of time, so I end up uninstalling the > KPLs from the walls and into a temporary plastic electrical box that I > can plug into the same outlet as the PLM. > > Dave if you submit a PR I can merge it in. There’s been a bunch of > changes over the past year or so, might be good to capture a release > soon. Unfortunately my git skills have atrophied so every time I think > about doing this I get frustrated with some git situation and figure > I’ll do it later…. > >> On Aug 20, 2023, at 1:32 PM, Stephen Switzer <[email protected]> wrote: >> >> I'm probably running an old version of MH, so if this has been fixed >> in the past 1-2 years, then please tell me to update. :) >> >> I created an integration that has MH listening to the mosquito broker >> for some light commands, and for the most part, it's working. >> However, it seems that random lights do not work when I send a MQTT >> command to the broker. I can see the command hit the broker, but it >> won't trigger an event in MH for all lights. I see no difference >> between the lights that work and those that do not. >> >> Mosquito Broker: >> insteon/living_room_lamp on >> insteon/living_room_lamp/state on >> >> insteon/living_room_fan_light on >> caddx/motion/binary_sensor.living_motion/state on >> insteon/living_room_lamp off >> caddx/motion/binary_sensor.living_motion/state off >> insteon/living_room_lamp/state off >> >> >> MH: >> 08/20/23 03:21:57 PM [MQTT_RECV] living_room_lamp: on >> 08/20/23 03:21:59 PM [LIGHTS] $ll_liv_lamp1 is 100% >> 08/20/23 03:21:59 PM [MQTT_SEND] ll_liv_lamp1: on >> >> 08/20/23 03:22:06 PM [MQTT] MQTT_living_motion: on >> 08/20/23 03:22:07 PM [MOTION] Motion sensed in Living. >> 08/20/23 03:22:10 PM [MQTT_RECV] living_room_lamp: off >> 08/20/23 03:22:12 PM [MQTT] MQTT_living_motion: off >> 08/20/23 03:22:12 PM [LIGHTS] $ll_liv_lamp1 is off >> 08/20/23 03:22:12 PM [MQTT_SEND] ll_liv_lamp1: off >> >> You can see MH is listening to the broker, sending messages >> successfully, etc. The living_room_fan_light event was not picked up >> from the broker by MH. I don't see why. Here's the code snippets: >> >> >> $MQTT_insteon = new mqtt('mqtt_1', '127.0.0.1', 1883, 'insteon/#', >> "", "", 120); >> >> $MQTT_insteon_living_room_fan_light_set = new >> mqtt_Item($MQTT_insteon, "insteon/living_room_fan_light"); >> $MQTT_insteon_living_room_fan_light_state = new >> mqtt_Item($MQTT_insteon, "insteon/living_room_fan_light/state", 1, 1); >> if(my $state = state_changed $MQTT_insteon_living_room_fan_light_set) { >> print_log("[MQTT_RECV] living_room_fan_light: $state"); >> set $living_room_fan_light $state; >> } >> if($state = state_now $fl_liv_fanlight) { >> $state = ON if $state == '100%'; >> print_log("[MQTT_SEND] fl_liv_fanlight: $state"); >> set $MQTT_insteon_living_room_fan_light_state $state; >> } >> >> $MQTT_insteon_living_room_lamp_set = new mqtt_Item($MQTT_insteon, >> "insteon/living_room_lamp"); >> $MQTT_insteon_living_room_lamp_state = new mqtt_Item($MQTT_insteon, >> "insteon/living_room_lamp/state", 1, 1); >> if(my $state = state_changed $MQTT_insteon_living_room_lamp_set) { >> print_log("[MQTT_RECV] living_room_lamp: $state"); >> set $living_room_lamp $state; >> } >> if($state = state_now $ll_liv_lamp1) { >> $state = ON if $state == '100%'; >> print_log("[MQTT_SEND] ll_liv_lamp1: $state"); >> set $MQTT_insteon_living_room_lamp_state $state; >> } >> >> >> Mind you, I have about 120 lights in my code, all listening to >> $MQTT_insteon. Could there be a memory issue? I appreciate any input >> with ideas on this. >> >> Thank you! >> >> -- >> Best regards, >> Steve Switzer >> >> --- >> Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget! >> http://www.sbsROC.com <http://www.sbsroc.com/> >> ________________________________________________________ >> To unsubscribe from this list, go to: >> https://lists.sourceforge.net/lists/listinfo/misterhouse-users >> > > > > ________________________________________________________ > To unsubscribe from this list, go to:https://lists.sourceforge.net/lists/listinfo/misterhouse-users > ________________________________________________________ To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users