Hi again,
That’s it, now I can control the shutter from Hassio directly.
For those who wish to do the same. The steps I followed:
- Install NodeRed Add-on from the store. For enocean support, go to my previous message (LINK HERE) for NodeRed add-on configuration;
- Once in NodeRed, you can use the flow I have written in my previous post to see if you can command the shutter from NodeRed first;
NOTE: Your shutters needs to be paired with your controller first. I did it with Domoticz, but it can be done in another way. Solutions are available on internet; - If this step is passed, then you can use the final flow I use to command the shutter from Hassio:
[{"id":"488a984b.8f7fc8","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"eef16e03.10f33","type":"enocean-out","z":"488a984b.8f7fc8","serialport":"a5a049a1.cadec8","name":"","logOutput":false,"x":870,"y":420,"wires":[[]]},{"id":"6423065c.485bc8","type":"enocean-btn","z":"488a984b.8f7fc8","name":"","encoding":"f6-02-02","delay":"","x":700,"y":400,"wires":[["eef16e03.10f33"]]},{"id":"cd1a0a8f.c33538","type":"inject","z":"488a984b.8f7fc8","name":"OUVRIR_CUISINE","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"button\":0,\"channel\":2,\"event\":\"click\"}","payloadType":"json","x":150,"y":20,"wires":[[]]},{"id":"23735f15.709b7","type":"inject","z":"488a984b.8f7fc8","name":"FERMER_CUISINE","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"button\":1,\"channel\":2,\"event\":\"click\"}","payloadType":"json","x":150,"y":60,"wires":[[]]},{"id":"b6bdf1c3.1eba8","type":"inject","z":"488a984b.8f7fc8","name":"OUVRIR_SALON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"button\":0,\"channel\":1,\"event\":\"click\"}","payloadType":"json","x":140,"y":100,"wires":[[]]},{"id":"cd02577c.7e0078","type":"inject","z":"488a984b.8f7fc8","name":"FERMER_SALON","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"{\"button\":1,\"channel\":1,\"event\":\"click\"}","payloadType":"json","x":150,"y":140,"wires":[[]]},{"id":"8e5efc85.3614d","type":"template","z":"488a984b.8f7fc8","name":"Ouverture Salon","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"button\":0,\"channel\":1,\"event\":\"click\"}","output":"json","x":460,"y":320,"wires":[["6423065c.485bc8"]]},{"id":"10d3894e.fa4a37","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"cover.volet_salon","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"open","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":170,"y":180,"wires":[[],[]]},{"id":"390dce3e.ca60f2","type":"template","z":"488a984b.8f7fc8","name":"Fermeture Salon","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"button\":1,\"channel\":1,\"event\":\"click\"}","output":"json","x":470,"y":380,"wires":[["6423065c.485bc8"]]},{"id":"e9697f4f.4dcde","type":"template","z":"488a984b.8f7fc8","name":"Ouverture Cuisine","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"button\":0,\"channel\":2,\"event\":\"click\"}","output":"json","x":470,"y":440,"wires":[["6423065c.485bc8"]]},{"id":"7f83caa5.234b74","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"cover.volet_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"open","halt_if_type":"str","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":460,"y":180,"wires":[[],[]]},{"id":"5516db88.a33324","type":"template","z":"488a984b.8f7fc8","name":"Fermeture Cuisine","field":"payload","fieldType":"msg","format":"json","syntax":"mustache","template":"{\"button\":1,\"channel\":2,\"event\":\"click\"}","output":"json","x":470,"y":500,"wires":[["6423065c.485bc8"]]},{"id":"a70473f6.16d65","type":"debug","z":"488a984b.8f7fc8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","statusVal":"","statusType":"auto","x":890,"y":380,"wires":[]},{"id":"6ec0635c.674d2c","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"script.close_volet_salon","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":170,"y":380,"wires":[[],["390dce3e.ca60f2"]]},{"id":"6560ff54.6b0c2","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"script.open_volet_salon","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":170,"y":320,"wires":[[],["8e5efc85.3614d"]]},{"id":"97258cd9.75ffc","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"script.close_volet_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":500,"wires":[[],["5516db88.a33324"]]},{"id":"fabf276d.b4c738","type":"server-state-changed","z":"488a984b.8f7fc8","name":"","server":"87ac2dac.6d295","version":1,"exposeToHomeAssistant":false,"haConfig":[{"property":"name","value":""},{"property":"icon","value":""}],"entityidfilter":"script.open_volet_cuisine","entityidfiltertype":"exact","outputinitially":false,"state_type":"str","haltifstate":"true","halt_if_type":"bool","halt_if_compare":"is","outputs":2,"output_only_on_state_change":false,"for":0,"forType":"num","forUnits":"minutes","ignorePrevStateNull":false,"ignorePrevStateUnknown":false,"ignorePrevStateUnavailable":false,"ignoreCurrentStateUnknown":false,"ignoreCurrentStateUnavailable":false,"x":180,"y":440,"wires":[[],["e9697f4f.4dcde"]]},{"id":"a5a049a1.cadec8","type":"enocean-config-node","serialport":"/dev/serial/by-id/usb-FTDI_FT232R_USB_UART_A908OSA3-if00-port0"},{"id":"87ac2dac.6d295","type":"server","name":"Home Assistant","addon":true}]
NOTE: There is useless nodes in my example, you can remove it;
- Next step is to configure the devices in Hassio in your configuration.yaml. Here is what I used (sorry, names are in French):
#Volet du Salon
volet_salon:
friendly_name: "Volet_Salon"
unique_id: cover.volet_salon
open_cover:
service: script.open_volet_salon
close_cover:
service: script.close_volet_salon
#Volet de la Cuisine
volet_cuisine:
friendly_name: "Volet_Cuisine"
unique_id: cover.volet_cuisine
open_cover:
service: script.open_volet_cuisine
close_cover:
service: script.close_volet_cuisine
#To get all button displayed all the time for covers
homeassistant:
customize_glob:
"cover.*":
assumed_state: true
- Create the associated script in Hassio (such as script.open_volet_cuisine in my case) without any action inside. When you will click in Hassio, it will call the script, and NodeRed will launch the associated flow. It works without scripts, but in my case I cannot stop the shutter once I launch open or close action. By using script, if you call the same twice, it stops the shutter.
NOTE: The final parameter “customize_glob” is optional. It allows to have the two arrows available all the time in Hassio.
I hope it helps some other people trying to find a way to command EnOcean shutters with Home Assistant !
I will work in a way to get the feedback from the shutter (if I use the wall switches), and I will let you know if I have any success !