Folks,
I recently converted everything from mqtt 1.x to 2.5 and my smart home is now dumber than a mud hut.
**Details
2.5.11 running docker on rpi4, only container running.
mosquito running docker on another rpi4
tldr;
- Things, with brokers, subscribed
- items linked to the channels
things
Bridge mqtt:broker:LEDBroker [ host="mqtt.home", secure=false, port=1883]
{
Thing topic RoomsKitchenCupboard1
{
Channels:
Type switch : SwitchState "Switch" [stateTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/relay/0", commandTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/relay/0/set" ]
Type dimmer : dimmer "Dimmer" [stateTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/brightness", commandTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/brightness/set", min=0, max=255 ]
Type color : color "Colour" [stateTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/hsv/0", commandTopic = "home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/hsv/0/set" ]
}
}
items:
Switch kitchen_led_cupboard1_switch "Kitchen Cupboard 1 Switch" (g_Kitchen_switch) {channel="mqtt:topic:LEDBroker:RoomsKitchenCupboard1:SwitchState"} //{ mqxtt=">[mqtt:home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/relay/0/set:command:ON:1],>[mqtt:home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/relay/0/set:command:OFF:0]" }
Color kitchen_led_cupboard1_color "Kitchen Cupboard 1 Color" (g_KitchenCupboards_Colour) {channel="mqtt:topic:LEDBroker:RoomsKitchenCupboard1:color"} //{ mqxtt=">[mqtt:home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/hsv/set:command:*:default]" }
Dimmer kitchen_led_cupboard1_dimmer "Kitchen Cupboard 1 Dimmer" (g_Kitchen_Brightness, g_KitchenCupboards_Brightness, g_Kitchen_Brightness_AutoDim) {channel="mqtt:topic:LEDBroker:RoomsKitchenCupboard1:dimmer"} //{ mqxtt=">[mqtt:home/lights/kitchen/led/cupboard/LED_KITCHEN_CUPBOARD_1/brightness/set:command:*:JS(convert.js)]" }
First I force the message in mqtt to 0:
I set the item to 10
log:tail:
events.log
2020-12-19 16:09:06.831 [ome.event.ItemCommandEvent] - Item 'UtilityElectricKWH10m' received command 2.09400000
2020-12-19 16:09:06.834 [vent.ItemStateChangedEvent] - UtilityElectricUnitsTotal changed from 986.909 to 986.910
2020-12-19 16:09:07.071 [ome.event.ItemCommandEvent] - Item 'kitchen_led_cupboard1_dimmer' received command 10
2020-12-19 16:09:07.075 [nt.ItemStatePredictedEvent] - kitchen_led_cupboard1_dimmer predicted to become 10
2020-12-19 16:09:08.438 [vent.ItemStateChangedEvent] - UtilityElectricPulse changed from OFF to ON
2020-12-19 16:09:08.471 [ome.event.ItemCommandEvent] - Item 'UtilityElectricPulse' received command OFF
Now having a look at mqttspy, the message is still
To solve all this, I can comment out the thing watch it unsubscribe, put it back in, and watch it subscribe, and it works. At some random point over the day/week, this will break.
Commented out:
Now removed.
Put it back and save:
Update the item:
Message:
Now mqttspy shows the value (note that 0-100 is scaled 0-255)
This happens across all the different items. Sometimes it’s ok for a while, sometimes it breaks quickly. It does not affect all items in the same broker (I have 10 brokers with over a hundred items)
Is there anything else I can do/check with this as it’s rendered everything useless?
TIA
C