Closed madmicio closed 5 years ago
I think example no2 in the wiki should do the job.
https://github.com/stefanbode/Sonoff-Tasmota/wiki/Shutter-blinds-working-with-two-relays
no, unfortunately no! I think they changed so many things https://www.home-assistant.io/components/cover.mqtt/
Can you be more specific, what is not working as a command and what works. Open close position, reporting an so on. For me the second example looks promising to match with the requirements
if I use this code:
cover:
I can move the shutter but I don't have the slider. and in the home assistant log I got this error:
2018-11-12 17:18:22 ERROR (MainThread) [homeassistant.helpers.condition] Error during template condition: UndefinedError: 'None' has no attribute 'attributes' 2018-11-12 17:18:26 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 2018-11-12 17:18:28 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 2018-11-12 17:18:32 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False: 2018-11-12 17:18:34 WARNING (MainThread) [homeassistant.components.cover.mqtt] Payload is not True or False:
if I add this code: tilt_command_topic: 'cmnd/portafinestra/shutterposition' tilt_status_topic: 'cmnd/portafinestra/shutterposition' set_position_topic: 'cmnd/portafinestra/shutterposition' tilt_min: 0 tilt_max: 100 tilt_closed_value: 0 tilt_opened_value: 100
The result is: Testing configuration at /config Failed config cover.mqtt:
You should ask @b1g1 for help. Maybe there is an additional file missing for the template definition.
it could be a good idea. but how do I send a message ???
Hi, i didn’t update to 0.82 yet, too many changes and i still running 0.79.3
Hi, i didn’t update to 0.82 yet, too many changes and i still running 0.79.3
exellent idea! is there the possibility to downgrade?
or now it's time to upgrade your home assistant :-)
I already downgraded from 0.80 to 0.79.3 because that version broke my configuration
You have to use ssh to run this command hassio homeassistant update --options “version=x.xx.x”
ok just downgrade… all ok!
for the moment I'm back to version 0.81.2 let me know if there are updates for the new version. thank you
For me new new mqtt.cover in HASS works fine. Here is my config:
- platform: mqtt
name: "Balcony Blinds"
availability_topic: "balconyblinds/tele/LWT"
payload_available: "Online"
payload_not_available: "Offline"
position_topic: balconyblinds/stat/SHUTTER1
position_open: 100
position_closed: 0
set_position_topic: "balconyblinds/cmnd/shutterposition"
value_template: "{{ value | int }}"
command_topic: "balconyblinds/cmnd/backlog"
payload_open: "SHUTTEROPEN"
payload_close: "SHUTTERCLOSE"
payload_stop: "SHUTTERSTOP"
retain: false
optimistic: false
qos: 1
For me new new mqtt.cover in HASS works fine. Here is my config:
- platform: mqtt name: "Balcony Blinds" availability_topic: "balconyblinds/tele/LWT" payload_available: "Online" payload_not_available: "Offline" position_topic: balconyblinds/stat/SHUTTER1 position_open: 100 position_closed: 0 set_position_topic: "balconyblinds/cmnd/shutterposition" value_template: "{{ value | int }}" command_topic: "balconyblinds/cmnd/backlog" payload_open: "SHUTTEROPEN" payload_close: "SHUTTERCLOSE" payload_stop: "SHUTTERSTOP" retain: false optimistic: false qos: 1
Changed my working mqtt config (thanks B1G1) to this one after upgrading from 0.79.x to 0.82.1 and all my shutters work perfectly! Thank you bastshoes!
According to new config in HASS state topic is not considered if position topic specified.
state_topic
(string)(Optional)The MQTT topic subscribed to receive cover state messages. Use only if not using get_position_topic. State topic can only read open/close state. Cannot read position state.
position_topic
(integer)(Optional)The MQTT topic subscribed to receive cover position messages. Always in favor if used together with state_topic.
this code does not work for me. I do not understand why but it is so! I had to change it in:
Take a look at your position_topic. Mine is: position_topic: screenr/stat/SHUTTER1 Yours starts with stat, maybe that's the problem.
whit this code all works fine, the only problem is that after the restart I do not have the position until I move the shutter. it's normal?
platform: mqtt name: "salone" availability_topic: "tele/salone/LWT" payload_available: "Online" payload_not_available: "Offline" position_topic: stat/salone/SHUTTER1 position_open: 100 position_closed: 0 set_position_topic: "cmnd/salone/shutterposition" value_template: "{{ value | int }}" command_topic: "cmnd/salone/backlog" payload_open: "SHUTTEROPEN" payload_close: "SHUTTERCLOSE" payload_stop: "SHUTTERSTOP" retain: false optimistic: false qos: 1
Have you set 'power retain' in console for you shutter? HASS don't see previous messages if they do not have retain flag.
ok… with powerretain works fine!
Added example to wiki. I guess issue can be closed.
@stefanbode, can be closed.
hassio 0.82 introduces a new management of the cover. this is the suggested code
cover:
How can I implement this with your firmware?