Hi, I am using Home Assistant with an arduino and RFlink module and library -> works perfectly. Now, I want to take advantage of the fact that this RFLink library also allows to control 10 GPIOs or the arduino to control relays that will trigger covers not compatible with RFLink.
The only issue is: I don’t know how to configure home assistant to that it defines, let’s say a cover for which up button would send 10;GPIOset30;0;ON and one second after 10;GPIOset30;0;OFF, the same with 31 for stop button, with 32 for down button, with 33 for the next remote etc.
Using this :
http://www.rflink.nl/blog2/faq#GPIO
Any idea ?
FredC
March 10, 2021, 4:11pm
2
Did anyone ever come up with an answer to this?
In addition to output pins 30-39 there are also 4 input on pins 26-29.
devtone
(devtone)
July 8, 2023, 9:45am
3
Looking for the same solution. Its possible to send it with a commandline switch, using minicom. I rather have a cleaner solution.
The inputs can be use as binary sensors. Dont use GPIOset, use gpioset instead. 0 is input 26, 1 is input 27 and so on…
binary_sensor:
- platform: rflink
devices:
gpioset_0_0: {}
dek_ami
(Dekamilv)
July 21, 2023, 8:58pm
4
Hi. Unfo I have no reaction in logger to short input pins to ground. Does any additional “tricks” necessary?
devtone
(devtone)
July 24, 2023, 9:56am
5
Did you turn on the GPIO function?
Run: 10;setGPIO=ON;
I need to check this solution because so far I did this ugly thing :
Custom stores
platform: command_line
covers:
salle_a_manger:
command_open: ‘echo -e -n “\n10;GPIOset;30;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;30;0;OFF;\n” > /dev/ttyACM0 57600’
command_close: ‘echo -e -n “\n10;GPIOset;31;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;31;0;OFF;\n” > /dev/ttyACM0 57600’
command_stop: ‘echo -e -n “\n10;GPIOset;32;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;32;0;OFF;\n” > /dev/ttyACM0 57600’
salon:
command_open: ‘echo -e -n “\n10;GPIOset;33;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;33;0;OFF;\n” > /dev/ttyACM0 57600’
command_close: ‘echo -e -n “\n10;GPIOset;34;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;34;0;OFF;\n” > /dev/ttyACM0 57600’
command_stop: ‘echo -e -n “\n10;GPIOset;35;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;35;0;OFF;\n” > /dev/ttyACM0 57600’
chambre_d_ami:
command_open: ‘echo -e -n “\n10;GPIOset;36;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;36;0;OFF;\n” > /dev/ttyACM0 57600’
command_close: ‘echo -e -n “\n10;GPIOset;37;0;ON;\n” > /dev/ttyACM0 57600 ;sleep 1; echo -e -n “\n10;GPIOset;37;0;OFF;\n” > /dev/ttyACM0 57600’
dek_ami
(Dekamilv)
August 6, 2023, 7:43pm
7
I managed to get it work.
configuration.yaml added
shell_command:
rflink_gpio_on: echo -e "10;setgpio=on" > /dev/ttyACM0
in automations
alias: 1st - on start
description: xxx
trigger:
- platform: homeassistant
event: start
condition: []
action:
- service: shell_command.rflink_gpio_on
data: {}
mode: single
Only one issue - after hassio restart binary sensor i using always “on” until it changed firs time.