thehookup / Motorized_MQTT_Blinds

Motorized_MQTT_Blinds
293 stars 75 forks source link

Blind state is not retained and defaults to “unknown” On HA reboot/upgrade #13

Open vortex-uk opened 4 years ago

vortex-uk commented 4 years ago

Blind state is not retained by HA and defaults to “unknown” On HA reboot/upgrade. Only way to resolve is to send a state (that doesn’t match the blind’s current state) then HA realises the current blind position.

binaryn3xus commented 4 years ago

Is this why my motor only seems to turn in one direction?

thehookup commented 4 years ago

I suppose I could change the state publish to retain: true which would allow HA to see it on restart, let me test it out.

Neo201069 commented 4 years ago

Still having this issue, any luck with fix?

mrwaltern commented 4 years ago

In Home Assistant, I set the availability topic to be the /checkIn, with the payload_available to "OK," which is sent on your network every 90 seconds. I also added a line to the .ino file in void checkIn to publish to the positionState topic every time it checks in. It seems to solve the unknown issue for me. The only time this won't work is when the node MCU reboots, because its initial positionState playload is empty until it is run once.

sajovicd commented 3 years ago

Hello, I also have problem with unknown position, is that problem realy so rare, or most of people just dont care about. I would love to find solution for this. Is there some fix for that? retain: true does not help.

sajovicd commented 3 years ago

In Home Assistant, I set the availability topic to be the /checkIn, with the payload_available to "OK," which is sent on your network every 90 seconds. I also added a line to the .ino file in void checkIn to publish to the positionState topic every time it checks in. It seems to solve the unknown issue for me. The only time this won't work is when the node MCU reboots, because its initial positionState playload is empty until it is run once.

Can youshow your code? PLEASE