fmeili1
(Frank Meilinger)
January 22, 2024, 8:33pm
21
jonnydev13:
Another possibility is for you to use a rule and publish from openhab to the mqtt power topic, giving it a value of power off. That way the next time you restart openhab it is still reading the topic for the message that was last published, but the value is correct because you explicitly sent the Off value.
I’ll give this option a try.
fmeili1
(Frank Meilinger)
January 22, 2024, 8:34pm
22
rlkoshak:
If the solar inverter is smart enough to use the retained flag, it’s probably smart enough to use a LWT.
I’m not certain how OH handles this but I would not be surprised if the Thing were configured to go OFFLINE if the LWT message indicates the device is OFFLINE, it will ignore any messages from that device. I also wouldn’t be surprised if the opposite is true so that needs to be tested.
If the Thing being OFFLINE doesn’t cause the messages to be ignored, the LWT message could be used in other ways. For example, a rule could update all the Items to UNDEF or something like that when the Thing goes OFFLINE. I used to do that sort of thing all the time.
Unfortunately SolarAssistant (which is the bridge between the inverters and OH) is not able to configure a LWT in it’s MQTT configuration and does not use LWT automatically by itself.
system
(system)
Closed
March 4, 2024, 12:35pm
23
This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.