Well I was excited to find this plugin but I just can't get it to work.
I've bought the hardware from Ebay and it looks just like the two items in the picture. I've followed the wiki which is a bit vague (tells you to create the directory
with sudo but then use wget
without sudo which then fails because of permissions) so I've tried creating the directory and files both as root and as my normal pi user.
In both cases, the plugin shows up in Domoticz (I called it
rf) and creates a "
rf Learn 433 switch". Then if I follow the instructions the plugin creates a new switch but nothing hppens when I activate it in Domoticz.
I have tried the stable and latest beta of Domoticz. In all cases nothing happens with the hardware and this is reported in the log on creating the switch:
Code: Select all
2022-05-05 08:33:09.731 rf: onCommand called for Unit 1: Parameter 'On', Level: 0
2022-05-05 08:33:09.745 rf: sudo /bin/python3 /home/pi/domoticz/plugins/RFSwitches/433cloner.py --txpin 17 --rxpin 27 record 2On
2022-05-05 08:33:09.688 Status: User: Admin (IP: 192.168.0.x) initiated a switch command (1/rf - Learn 433 switch/On)
2022-05-05 08:33:26.880 rf: onCommand called for Unit 1: Parameter 'Off', Level: 0
2022-05-05 08:33:26.895 rf: New RF Switch created, #2
2022-05-05 08:33:26.895 rf: sudo /bin/python3 /home/pi/domoticz/plugins/RFSwitches/433cloner.py --txpin 17 --rxpin 27 record 2Off
2022-05-05 08:33:26.867 Status: User: Admin (IP: 192.168.0.x) initiated a switch command (1/rf - Learn 433 switch/Off)
But then, when I activate the new switch, nothing happens with the physical switch and this appears in the log:
Code: Select all
2022-05-05 09:25:30.588 rf: onCommand called for Unit 2: Parameter 'On', Level: 0
2022-05-05 09:25:30.607 rf: sudo /bin/python3 /home/pi/domoticz/plugins/RFSwitches/433cloner.py --txpin 17 --rxpin 27 play 2On
2022-05-05 09:25:30.565 Status: User: Admin (IP: 192.168.0.x) initiated a switch command (2/rf - New RF switch #2/On)
I looked at the command above and tried issuing it directly in the terminal and here is the result:
Code: Select all
sudo /bin/python3 /home/pi/domoticz/plugins/RFSwitches/433cloner.py --txpin 17 --rxpin 27 play 2On
preparing..
Traceback (most recent call last):
File "/usr/lib/python3.7/shelve.py", line 111, in __getitem__
value = self.cache[key]
KeyError: '2On'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/domoticz/plugins/RFSwitches/433cloner.py", line 455, in <module>
main()
File "/home/pi/domoticz/plugins/RFSwitches/433cloner.py", line 449, in main
args.func(args, database)
File "/home/pi/domoticz/plugins/RFSwitches/433cloner.py", line 378, in play
code = int(database[recording][0])
File "/usr/lib/python3.7/shelve.py", line 113, in __getitem__
f = BytesIO(self.dict[key.encode(self.keyencoding)])
KeyError: b'2On'
I am using a cheap remote control wall plug which works fine with its own remote and also works fine with my RFXtrx433 USB dongle in Domoticz on a different Pi.
I've imaged a fresh Raspberry Pi OS from the beginning and I am using a new Pi4 so there should be no clashes with my existing Domoticz. I initially tried the latest Raspbian 32 bit (Bullseye) but then read the note at
https://www.domoticz.com/wiki/Raspberry_Pi so I am now trying the legacy (Buster) version. I get the same issues with both versions of OS and with both stable and beta of Domoticz.
I am all the more confused because the wiki says the receiver needs 3.3V and transmitter 5V but the
Instructable posted here says the opposite and the Ebay product page seems to suggest 5V for the receiver and 3.5V- 12V for the transmitter.
Does anyone have any ideas please? I am so confused and my electronics knowledge is minimal. (The larger of the 2 modules is the receiver, isn't it? Again, not overly clear from any of the documents or diagram)
Many thanks.