Lightning4 support (RFX)

Hi all,

I’ve spotted an earlier question on this (Help with RFXtrx) we have a slightly different Lightning4 requirement; control of a presentation screen (hence; cover).

The same RFXtrx is used for both Somfy (RFY) and Kingpin (Lightning4), the remote is programmed, but how/why/where to get the right IDs for the configuration. When we still used domoticz at work we had a script wrapping rfxcmd as indicated below - the Somfy’s now work, but how to get the Kingpin/presentation screen included?

I’ve not yet tried to “just set the kingping ID” but even the below mentioned Somfy ID’s are not 0C1A001... in our script but rather 071a000... in HASS-configuration.yaml

Ideas are welcome - our shell-script approach with rfxsend.py included below:

#!/bin/sh

rfxcmd="/somewhere/rfxsend.py"

# Projectorscreen (Kingpin)
#09130011E1428041000
#             xxxx - 1040 timing/pulse in hex
#           xx - Command (24/stop 22/up 28/down)
#      xx - sequence number
# Somfy's
#0C1A0015010203010300000000
#                xx - Command (00/stop 01/up 03/down)
#            xx - ID
#          xx - ID
#        xx - ID
#      xx - sequence number

# rfx_subtype_1A_cmnd = {
# "00":"Stop",
# "01":"Up",
# "02":"Up+Stop (Set upper limit)",
# "03":"Down",
# "04":"Down+Stop (Set lower limit)",
# "05":"Up+Down (Connect motor)",
# "07":"Program",
# "08":"Program > 2 seconds",
# "09":"Program > 7 seconds",
# "0A":"Stop > 2 seconds (Set position / Change direction)",
# "0B":"Stop > 5 seconds (Set middle position)",
# "0C":"Up+Down > 5 seconds (Change upper position)",
# "0D":"Erase this RTS remote from RFXtrx",
# "0E":"Erase all RTS remotes from the RFXtrx"}

# not shown some
# magic with case-statements
# to create a string like
# 09130011E142xx041000
# where xx = 22 for up or 28 for down (or 24 for stop)

${rfxcmd} -r ${string}