Appreciate that mate, works perfect now. So to finalize:
This solution is not simple and requires 2 transeivers:
- First one hooked to GPIO17(TX) and GPIO27(RX) for sending simple fixed codes (8digit)
- Second one is homemade RFLINK (arduino mega pro + 2nd transeiver for instructions on how to assemble refer to documentations). This one is both sending and receiving 433(315 or any other) Mhz fixed codes.
I have created switches.yaml file (must include reference to it in configuration.yaml file i.e. !include switches.yaml)
here I have:
- platform: rpi_rf
gpio: 17
switches:
2nd_Floor_Stairs_Light01:
pulselength: 320
protocol: 1
code_on: '1020025'
code_off: '1020026'
signal_repetitions: 5
2nd_Floor_Stairs_Light02:
pulselength: 320
protocol: 1
code_on: '1020027'
code_off: '1020028'
signal_repetitions: 5
This above for sending RF signal in simple format (24bit fixed code). It works, but not perfect, signal repetition does not work even if you put 1800 times there, signal is very strange and RC-Switch arduino sketch struggles to identify signal nature, but wall switch surprisingly accept and actions BUT only if switch hit manualy in HASSOS WEB UI, automations works but there are issues written above in conversation.
There for…
Below is taken from entity register - registered RFLINK codes when activated above simple codes.
- platform: rflink
devices:
ev1527_00f907_09:
name: 2nd_F_Stairs_Light01On_Code
signal_repetitions: 5
ev1527_00f907_0a:
name: 2nd_F_Stairs_Light01Off_Code
signal_repetitions: 5
ev1527_00f907_0b:
name: 2nd_F_Stairs_Light02On_Code
signal_repetitions: 5
ev1527_00f907_0c:
name: 2nd_F_Stairs_Light01Off_Code
signal_repetitions: 5
Below is template to consolidate 2 commands from 2 switches into one switch
- platform: template
switches:
2nd_f_stairs_light001:
turn_on:
service: switch.turn_on
data:
entity_id: switch.2nd_f_stairs_light01On_code
turn_off:
service: switch.turn_off
data:
entity_id: switch.2nd_f_stairs_light01Off_code
All said above sounds “super simple” isn’t it? But for now this is how to get below automations to work:
Binary Sensors (codes from motion sensors received using RFLINK:
binary_sensor.yaml file:
- platform: rflink
devices:
ev1527_0ffaae_00:
name: Sensor Motion StairsOff
device_class: motion
off_delay: 5
automations.yaml file:
- id: '1611304514042'
alias: New Automation Light ON
description: ''
trigger:
- platform: state
entity_id: binary_sensor.sensor_motion_stairson
to: 'on'
condition: []
action:
- delay: 00:00:01
- service: switch.turn_on
data: {}
entity_id: switch.2nd_f_stairs_light001
mode: single
- id: '1611304642082'
alias: New Automation Light OFF
description: ''
trigger:
- platform: state
entity_id: binary_sensor.sensor_motion_stairson
to: 'off'
for: 00:01:00
condition: []
action:
- delay: 00:00:01
- service: switch.turn_off
data: {}
entity_id: switch.2nd_f_stairs_light001
mode: single
If you have better solution using RF switches and peripheral please share your way.