RFXCom RAW transmit in Domoticz Topic is solved

Moderator: leecollings

Vic3198
Posts: 5
Joined: Thursday 07 March 2019 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

RFXCom RAW transmit in Domoticz

Post by Vic3198 »

Hi,
My gate remote is not recognized by the RFXtrx433XL and Domoticz. However, with undec_on in RFXMngr on Windows, I managed to capture the message sent by the remote, to put it in a .txt and to repeat it with the RFXCom, using RAW transmit in RFXMngr, what successfully opened my gate.

Now my question is: how to make Domoticz transmit the data contained in the .txt through the RFXCom? I didn't see any option in Domoticz (it runs on a Raspberry Pi) to transmit RAW data...
If this is not possible, is there a workaround to transmit RAW data in Linux? I could thus make a script and trigger it in Domoticz.

Thanks,
Vic
Vic3198
Posts: 5
Joined: Thursday 07 March 2019 13:09
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by Vic3198 »

I finally found a (tricky) solution! It uses RFXcmd.

I first used Windows and RFXMngr (available on the RFXCOM official webiste), to receive, decode and clean the raw packets sent by my remote. I created a clean .txt file as explained in the user guide (page 50) and then used RFXMngr to transmit this packet. That way, RFXMngr displays the clean raw code that correspond to the message you want to send, with the correct repeat count etc.

After getting the interesting raw code, I installed RFXcmd.
Once installed (by following the how-to on the Github page), what you just have to do to transmit is:

Code: Select all

./rfxcmd.py -d /dev/ttyUSB<YOUR DEVICE> -s <THE RAW CODE YOU GOT IN RFXMNGR>
Now all you have to do is creating a dummy switch in Domoticz that triggers a script containing the above line. 😉


Hope that can help someone!
sorinpopa
Posts: 1
Joined: Sunday 19 July 2020 15:35
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by sorinpopa »

Hi. I have the same problem with my gate.
Have you managed to control that from Domoticz?

I'm surprized this is not supported in Domoticz, this type o gate is quite popular in France... (or maybe that's why?)

regards
User avatar
Didi
Posts: 15
Joined: Thursday 02 May 2019 21:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by Didi »

Vic3198 wrote: Thursday 25 April 2019 16:19 I finally found a (tricky) solution! It uses RFXcmd.

I first used Windows and RFXMngr (available on the RFXCOM official webiste), to receive, decode and clean the raw packets sent by my remote. I created a clean .txt file as explained in the user guide (page 50) and then used RFXMngr to transmit this packet. That way, RFXMngr displays the clean raw code that correspond to the message you want to send, with the correct repeat count etc.

After getting the interesting raw code, I installed RFXcmd.
Once installed (by following the how-to on the Github page), what you just have to do to transmit is:

Code: Select all

./rfxcmd.py -d /dev/ttyUSB<YOUR DEVICE> -s <THE RAW CODE YOU GOT IN RFXMNGR>
Now all you have to do is creating a dummy switch in Domoticz that triggers a script containing the above line. 😉


Hope that can help someone!
Is it possible to get this working with RFLink also?
Main: RPI-5 / Zigbee / Sonoff / RFLink433 / Camera's / Wifi / Custom Interface / Alarm / GPS / MQTT / MiLight
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

This looks excellent, I'm going to try to control my Lucci DC fan with this. It's able to be controlled in rfxmgr but not Domoticz. Thanks for the heads up !
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

When trying, I get an error 'not in HEX format'.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

I also couldn't get it to work in rfxmgr. I was able to capture the code (19 packets) but each time I pressed the button, the packets were different, maybe some kind of rolling code ? . I tried anyway, I added all the packets together, changing spaces for new-lines, adding 0, and 1, at the start of each packet and "10000" at the end cleaning up the raw codes as described in the article but I got an "array error". I have messaged the RFXCOM guys, hopefully they can help.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

I had to add a 0 and 6 in the beginning and and 9000 at the end of each code.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

Yep, managed to send now with rfxmgr but still unable to with rfxcmd. I converted each number to hex from the RAW code that works with rfxmgr;

0
25
194
404
571
731
242
733
239
733
240
734
240
413
560
739
235
737
238
734
241
732
242
411
561
736
239
10000

Which I converted to

00 19 C2 194 23B 2DB F2 2DD EF 2DD F0 2DE F0 19D 230N


and then tried the following command ;

"./rfxcmd.py -d /dev/ttyUSB0 -f -v 00 19 C2 194 23B 2DB F2 2DD EF 2DD F0 2DE F0 19D 230N"

which results in ;

Error: invalid rawcmd, first byte is zero



I shall keep trying..
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

Yes, please do ;)

How did you convert to hex? I'm thinking this is way above my level of knowledge

I tried with:

Code: Select all

$ python rfxcmd.py -d /dev/ttyUSB0 -f -v 300a360a3231370a3833320a3330320a3833320a3330330a3833310a3330340a
3833330a3330310a3833330a3330310a3434300a3639360a3433390a3639340a3434330a3639350a3434320a3639320a3833370a3330330a3833320a3330300a3
833330a3330340a3433390a3639340a3434350a3639310a3434330a3639330a3434310a3639340a39303030
RFXCMD Version 0.3 (739)
------------------------------------------------
Send                    = 0D 00 00 00 02 00 00 00 00 00 00 00 00 00
Date/Time               = 2021-07-19 22:50:57
Packet Length           = 0D
Packettype              = Interface Control
------------------------------------------------
Received                = 01 03
Date/Time               = 2021-07-19 22:50:58
Packet Length           = 01
Packettype              = Undecoded RF Message
Traceback (most recent call last):
  File "rfxcmd.py", line 4838, in <module>
    main()
  File "rfxcmd.py", line 4806, in main
    option_send()
  File "rfxcmd.py", line 4224, in option_send
    read_rfx()
  File "rfxcmd.py", line 3830, in read_rfx
    decodePacket( message )
  File "rfxcmd.py", line 1108, in decodePacket
    print "Subtype\t\t\t= " + rfx.rfx_subtype_03[subtype]
UnboundLocalError: local variable 'subtype' referenced before assignment
The long line of numbers I got when converting to hex on https://www.online-toolz.com/tools/text ... vertor.php
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

OK, I have it working as a script.

You need to run the command in rfxmgr and note the actual RAW code it generates in the yellow window.

Then paste this IN QUOTES into the command.

For example:

sudo ./rfxcmd/rfxcmd.py -d /dev/ttyUSB0 -s "38 7F 00 07 19 00 C3 01 92 02 3D 02 D1 00 FC 02 D8 00 F5 02 D5 00 F9 02 DF 00 EF 01 92 02 3C 02 D6 00 F8 02 D7 00 F6 01 93 02 3A 02 D9 00 F6 02 D6 00 F8 02 DA 00 F3 27 10"

I can execute this "sh" script without issue but if I try to call it from within Domoticz, it fails with "Error: Error executing script command (/home/pi/domoticz/scripts/luccion1.sh). returned: 256" which is leading me down a complete other rabbit hole....
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

Forget converting to hex, the yellow window output of rfxmgr already does this for you. Now to fix the 256 error...
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

I'll try this later tomorrow. don't feel like removing the RFXcom transciever from my pi now. It's getting late for this old person.:)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

Finally got this working, needed to use absolute paths in the scripts..
So for example...

To turn my fan onto level 1, the script is

sudo /home/pi/domoticz/scripts/rfxcmd/rfxcmd.py -d /dev/ttyUSB0 -s "38 7F 00 07 19 00 C3 01 92 02 3D 02 D1 00 FC 02 D8 00 F5 02 D5 00 F9 02 DF 00 EF 01 92 02 3C 02 D6 00 F8 02 D7 00 F6 01 93 02 3A 02 D9 00 F6 02 D6 00 F8 02 DA 00 F3 27 10"

Where rfxcmd.py is installed in DIR "rfxcmd"

All working now thanks to Bert at RFXCOM, Walter in the scripting forum and Edwin and of course the original poster Vic3198.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

This line works now :)

sudo /home/pi/domoticz/scripts/rfxcmd/rfxcmd.py -d /dev/ttyUSB0 -s "48 7F 00 0F 06 01 03 03 40 01 2E 03 3F 01 30 03 3F 01 2E 03 45 01 2C 01 B6 02 B6 01 BB 02 B5 03 44 01 2C 01 BA 02 B5 01 B8 02 B7 03 45 01 2C 03 43 01 28 03 44 01 2E 03 43 01 2C 03 40 01 2D 03 45 01 2C 03 40 01 2D 23 28"
Last edited by EdwinK on Tuesday 20 July 2021 13:23, edited 1 time in total.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

From this screen, what code do I need. The line between the '=====' or the line beneed the Nbr of pulses?
rfxmanager.png
rfxmanager.png (26.24 KiB) Viewed 9127 times
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

The bit between the double lines after "command"..it needs to be in quotes to work in the script.

"48........28"

Your 1st example today should work.., well it would have worked on my system, certainly looks like hex to me.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

Going to try it later. Thanks
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
solarboy
Posts: 300
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by solarboy »

As we both have rfxcmd.py installed in the same location you could try copying my example and seeing if you still get that error.
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: RFXCom RAW transmit in Domoticz

Post by EdwinK »

Nothing seems to happen, but at least it doesn't give an error.

Your line is much shorter then what I'm having. Maybe that's the problem.
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest