Thank you for the shoutout in your code. I didnt even know this was going on.
I have moved my garadget in Home Assistant to MQTT. Every thing seems to work except the following automation. I can execute the automation manually and the door closes but the door does not close 10 minutes after it opens. When I view the status I see it go from closed to open. Any help would be appreciated.
- id: â1521918378249â
alias: Close Garage Door
trigger:- entity_id: cover.homegarage
for: 0.10.00
from: closed
platform: state
to: open
condition: []
action: - data:
entity_id: cover.homegarage
entity_id: cover.homegarage
service: cover.close_cover
- entity_id: cover.homegarage
Dennis,
I would suggest testing your automation with some other trigger/action and shorter delay - something that you can quickly and repeatedly reproduce. Say a light that turns off after in 10 seconds after you turned it on. Depending on how it goes youâll know if the issue is related to automation or Garadgetâs MQTT connection.
I am not sure if its the reason why some people are having issues with Home Assistant, I am also having issues, I can control the door but not get the status so i was listening on garadget/# in the dev tools and noticed that even though I changed the topic from âGarage Doorâ to âGarageDoorâ - i really hate using spaces in anything code related so i removed the space. I am thinking maybe the people who have success left the default topic and the ones with issues changed it perhaps?
But I am getting this:
As you can see garadget is using the old topic and the new one and i suspect that is why things arent working properly.
I am going to try and factory reset the garadget and then leave it set to Garage Door with the space and see if that fixes my issues.
EDIT: Yes, i only have 1 garadget at my house.
now i have 3 different topics Gararge, Garage Door and GarageDoor and to make things worse one of them is accurate the other is showing the door always open. Not sure what is going on.
The old topics are likely cached in the broker with the state in last message that was retained. Resetting the broker should remove dead topics.
I deleted all the retained messages using mqtt explorer and still even though my Garadget is set to topic of âGarageâ its still giving the status as âGarage Doorâ topic. I should point out âGarage Doorâ is the ânameâ of my Garadget (the first field you set in the app). I am guessing that is where that is coming from.
I tried to reset the Garadget so that the topic was âGarage Doorâ but it doesnt let me, I guess due to the space.
I am going to try and re-name my garadget to âgarageâ to match my mqtt topic and see if that fixes the different mqtt topics.
thanks is that a bug or inteded behavior? Wouldnt that mean its ignoring the topic you set during the config?
This appears to be the case for me also. Although it did register that topic name with MQTT broker it doesnât seem to publish anything to itâŚif that makes sense. Using MQTT explorer I was able to see both names. The âdevice nameâ as a topic along with the name I set in firmware as âtopicâ. However only the device name responds.
I had some issues with this myself. What appears to have worked it out for me was to use MQTT explorer to send a json payload of {"nme":"Garage"}
to the topic garadget/Garage Door/set-config
Also make sure the name of the door in the web interface and the app is set to âGarageâ and reset the wifi / mqtt settings using the topic name âGarageâ (I dunno if that makes a difference but thatâs what I did and it seems to have corrected the issue of using the old device name). I think what really did it though was the first step of sending the json payload.
This page claims when you reboot it will be overwritten with the one saved in the cloud via apps but so far nothing has changed for me even after rebooting.
Thanks I will try that, currently I am working around the issue like this:
cover:
- platform: mqtt
name: âGarage Doorâ
command_topic: âgaradget/Garage/commandâ
state_topic: âgaradget/Garage Door/statusâ
value_template: â{{ value_json.status }}â
payload_open: âopenâ
payload_close: âcloseâ
payload_stop: âstopâ
sensor:
-
platform: mqtt
name: âGarage Doorâ
state_topic: âgaradget/Garage Door/statusâ
value_template: â{{ value_json.status }}â -
platform: mqtt
name: âGarage Brightnessâ
state_topic: âgaradget/Garage Door/statusâ
unit_of_measurement: â%â
value_template: â{{ value_json.bright }}â
my topic is set to âGarageâ. what is interesting is it wont let you save Garage Door as the topic name (due to the space) and it wouldnt take GarageDoor either (not sure why). With the topic set to Garage its still using the incorrect topic of Garage Door AND the correct topic of Garage as shown in my working config.
I think I figured out how the configuration works. At least this is what I did.
When you go to the Garadget device and press the âMâ button for about 3 seconds until the LED starts blinking dark blue, and then you connect to the Garadget device (connect to WiFi access point PHOTON-XXXX and open browser to http://192.168.0.1) the entry you make for âDevice Topic ID:â is what ends up being used in the MQTT topic. So do not use any spaces in that âDevice Topic IDâ. I used something like âgarage5â. Now, in Home Assistant, when I want to issue an MQTT command to cause the device to open the garage door, the command format is âgarage/garage5/commandâ and the payload is âopenâ.
Then, in your configuration.yaml file in Home Assistant, you can give it a name that has a space, like this:
cover:
- platform: mqtt
name: garage door 5
command_topic: âgaradget/garage5/commandâ
state_topic: âgaradget/garage5/statusâ
payload_open: âopenâ
payload_close: âcloseâ
If you do that in the configuration.yaml file, Home Assistant will create an entity named âgarage door 5â and it will have the entity ID of âcover.garage_door_5â, but you still issue MQTT commands using the topic âgaradget/garage5/commandâ with no spaces.
OT but i just want to say, i really wish i had 5 garage doors
@garadget Thanks for this!
Whatâre the chances the firmware could be updated to support the MQTT-TLS library? https://github.com/hirotakaster/MQTT-TLS Itâs by the same guy that did the MQTT library you use, so I would assume it wouldnât be that hard to convert.
Sending usernames and passwords without TLS is dangerous.
Morning Guys.
MQTT Newbie here - first device being added to my Home assistant.
I have configured my MQTT Broker, added the device to the .yaml file and can see the states change on the UI but i cannot get any control. Does anyone have any suggestions how / this might be?
I cannot work out how you actually control the door - I assumed from the UI the Cover entity with loaded in with 2 arrows and a stop button would have done the trick but no success
I also tried to call the service from the Developer Tools section with no success. Any tips would be greatly appreciated.
Many thanks
Iâve done my best to try to write up the process I used to convert to MQTT only. Blog Write up and YouTube video on the process below. Hope it is useful for everyone.
A toggle MQTT command would be also helpful.
As far as I understand, for now we have to use conditions, if the door is open, then send âcloseâ, if it is closed, then send âopenâ.
Am I right?
I have my two doors operating correctly with MQTT, but now the doors are no longer connecting via the app. Is that a bug or a feature?
When you configured MQTT via the embedded web interface, did you select âCloud & MQTTâ option?
If device is connected to cloud then LED slowly pulses cyan, if it is only connected to WiFi, but not server (as in case of MQTT only) the LED slowly pulses green.