They were in the template cover that I originally posted:
There is a condition in both the âopen_coverâ and âclose_coverâ scripts. Itâll only run âopen_coverâ if the state of the MQTT cover is âclosedâ and itâll only run âclose_coverâ of the state of the MQTT cover is âopenâ. This way, youâll never be able to press the down button and have the door go up, and vice versa, despite them being the same MQTT messages.
Of course, this all depends on the state of your MQTT cover being reported correctly. i.e., that reed switch problem you were having will need to be worked out.
I did a telnet with Putty to HA. and logged with root but I couldnât execute your command?
mosquitto_sub -v -h localhost -p 1883 -u [username] -P [password] -t â#â
Maybe I should install the internal console plugin? or replace it with this?
the mqqt and built in webservice?
Yeah, that looks right. I thought that in one of your posts, it didnât have those conditions.
HrmâŚIâm not sure how you have your MQTT set up then. I donât use the broker that comes with HA. I didnât like that all the MQTT devices I had would lose contact every time I restarted HA. What error did it give you running that command?
So what MQTT are you using? I guess it wouldnât be to hard to change it?
I am using the âstandard oneâ Mosquitto broker 4.1 An Open Source MQTT broker.
I assumed that you were running mosquitto on the same machine as Home Assistant. You can replace âlocalhostâ with whatever youâre running mosquitto on. The standard port for MQTT is 1833. If it is the same machine, try using 127.0.0.1 instead of âlocalhostâ.
And trying IP address and local gets me:
core-ssh:~# mosquitto_sub -v -h 127.0.0.1 -p 1883 -u user -P password -t â#â
Error: Invalid subscription topic ââ#ââ, are all â+â and â#â wildcards correct?
Use âmosquitto_sub --helpâ to see usage.
Ha! It looks like perhaps this forum changed standard single quotes into some fancy left-hand and right-hand single quotes. Try typing single-quote hashtag single-quote manually.
Please take a look at my output. (It goes crazy when I press the close button)
I really dont understand it, it opens right away, but the closing seems like it overloads it⌠and if you just wait then it will close (Pressing again will make it take even longer, which you really want to do because you think it hasent received any signal to close.)
Again thanks for spending your valuable time helping me out!
Wow. I have no idea here. I press the up or down button on the interface, and I get one instance of âcmnd/GarageDoor/POWER ONâ when viewing my MQTT broker. Seems like something is causing an awful lot of command topics to get published. The âstat/Sonoff_SV_Garage/RESULTâ âstat/Sonoff_SV_Garage/POWERâ topics are just the sonoff SV responding with the current state of POWER.
The only thing that should be sending those cmnd topics is Home Assistant itself, so whatâs in your HA log when all this is happening?
Tue Mar 19 2019 17:48:43 GMT+0100 (Central European Standard Time)
Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
Doesnât make any sense I donât have any record with this in my configuration
019-03-19 17:25:36 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
2019-03-19 17:25:36 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
2019-03-19 17:25:36 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
2019-03-19 17:25:36 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
2019-03-19 17:25:36 WARNING (MainThread) [homeassistant.helpers.service] Not passing an entity ID to a service to target all entities is deprecated. Update your call to cover.close_cover to be instead: entity_id: all
Thatâs in the condition. Hereâs what the full close_cover section should look like:
close_cover:
- condition: state
entity_id: cover.garagedoor_mqtt
state: 'open'
- service: cover.close_cover
entity_id: cover.garagedoor_mqtt <------ You were missing this line
So sorry I didnât catch that in the beginning of this, and we spend so much time over onr missing lineâŚ
On the positive side you have learned me allot about getting logs from MQTT and more
THANKS!
I do see a lot of devices losing contacts in the logs, and I have had one or two false alarm saying that someone opens the garage door when nobodyâs home (Scary false alarms!) - So what MQTT did you get that could handle all your devices? (Just curious not going to mess with this for some time now! )
This is much more like itâŚ
stat/Sonoff_SV_Garage/RESULT {âPOWERâ:âONâ}
stat/Sonoff_SV_Garage/POWER ON
stat/Sonoff_SV_Garage/RESULT {âPOWERâ:âOFFâ}
stat/Sonoff_SV_Garage/POWER OFF
cmnd/garagestate/POWER2 ON
cmnd/Sonoff_SV_Garage/POWER ON
stat/Sonoff_SV_Garage/RESULT {âPOWERâ:âONâ}
stat/Sonoff_SV_Garage/POWER ON
stat/Sonoff_SV_Garage/RESULT {âPOWERâ:âOFFâ}
stat/Sonoff_SV_Garage/POWER OFF
cmnd/garagestate/POWER2 OFF
tele/Sonoff_SV_Garage/LWT Offline
The going offline could be due to the version of Tasmota youâre running. There were some versions released with a core library that was kind of buggy. See this thread for details:
Iâm running Home Assistant on Ubuntu in a python virtual environment. I have a media server thatâs on all the time anyway, and running Home Assistant on it is hardly taxing, and still many times faster than a Raspberry Pi. I donât have any sense of what might be better because this is all Iâve ever done.
I used to use the MQTT broker provided by HA, but I moved to a stand-alone Mosquitto broker, so that it didnât shut down when I restarted HA. Thanks to Tasmotaâs rules, I have some âautomationsâ that can run even in the absence of Home Assistant.
I have finally moved away from Raspberry and I am running HA on a VM on a Unraid server!
What a difference!
Since your help troubleshooting the garage door setup itâs been Rock Solid! - No false openings
I also reflashed all of my Tasmota to the one based on the pre-2.6 core
(I highly recommend it if you have any disconnect problems) http://thehackbox.org/tasmota/
But I just wanted to hear if you use your Garage setup in Google Assistant?
Because it seems that the only way to get that working is to create a âSwitchâ for the garage opener
And I really donât want to go down that road again!