getBroadlinkSharedData.py to TC2
Closed this issue · 1 comments
Hi, All my controllers are working well when your script try to read all codes.
But the code which you read from my json files from TC2(Wall Switch) doesn't works when I try to run the sendCode.py I receive this message:
Connecting to Broadlink device....
Connected....
Traceback (most recent call last):
File "broadlink-playcode.py", line 30, in
device.send_data(myhex.decode('hex'))
File "/usr/local/lib/python2.7/site-packages/broadlink-0.3-py2.7.egg/broadlink/init.py", line 455, in send_data
self.send_packet(0x6a, packet)
File "/usr/local/lib/python2.7/site-packages/broadlink-0.3-py2.7.egg/broadlink/init.py", line 229, in send_packet
payload = aes.encrypt(bytes(payload))
File "build/bdist.macosx-10.11-x86_64/egg/Crypto/Cipher/blockalgo.py", line 244, in encrypt
ValueError: Input strings must be a multiple of 16 in length
I don`t know if the problem is discovery what code is it, or try to run the code.
@alexleandrom This issue is not related to the script, For the TC2 RF codes you need to do as follows:
Try sending the code one time:
e.g:
e90a4200df0909161609160909160916091609160916160909160916091609160916091609161609091609160916160916090916091609160916091616091609160909160916
If it is not working and you get the "Input strings must be a multiple of 16 in length" error, try to duplicate it twice:
e.g:
e90a4200df0909161609160909160916091609160916160909160916091609160916091609161609091609160916160916090916091609160916091616091609160909160916e90a4200df0909161609160909160916091609160916160909160916091609160916091609161609091609160916160916090916091609160916091616091609160909160916
If not working keep going 3,4,5,6 time until it works with the script.