mqtt:
switch:
platform: broadlink
host: 192.168.0.3
mac: '34:EA:34:B5:0F:F7'
timeout: 10
switches:
switch1:
friendly_name: "Test Switch"
command_on: '6RRGAN8JCRYWCRYJCRYWCRYJCRYJFgkWCRYJFhYJFgkWCRYJFgkJFgkWFgkWCQkWCRYJFhYJCRYWCQkWFgkWCRYJCRYWCQkAAUgAAA=='
command_off: '6RRGAN8JCRYJFhYJFgkWCQkWFgkWCRYJFgkJFgkWFgkJFgkWFgkJFhYJCRYJFhYJCRYJFhYJFgkJFgkWCRYJFgkWCRYJFgkAAUgAAA=='
group: !include groups.yaml
Logs don’t show anything.
Hmm, it looks correct to me. Did you try concatenating two of the codes as specified earlier in this thread?
I just verified the yaml code and removed " !include groups.yaml" for now and it was all valid.
As in taking the code and just doubling up, sometimes up to 6 times?
I’m trying to do a test install on my PC but struggling here:
putting: pip install --use-wheel --no-index --find-links=https://github.com/sfbahr/PyCrypto-Wheels/raw/master/pycrypto-2.6.1-cp35-none-win_amd64.whl pycrypto
into CMD keeps yielding the error " Could not find a version that satisfies the requirement pycrypto (from versions: )
No matching distribution found for pycrypto"
Maybe the bit about the two codes concatenated, or you could try multiplying it up by 6. Not sure either would work but you never know. You could also try re-learning the codes. Perhaps someone with more experience of the TC2 could chime in
Oh my word… I finally did it… I reinstalled Hassbian and started from fresh, it seems like my broadlink “package” was buggered, thanks for all your help Keith!!
Well I’m one step closer now, I managed to use the learn command to get the following 2 codes for my TC1 Gang switch:
JgCMAJSSFDYUNhQ2FBEUERQRFBEUERQ2FDYUNhQRFBEUERQRFBEUERQRFDYUERQRFBEUERQRFDYUNhQRFDYUNhQ2FDYUNhQABfWUkhQ2FDYUNhQRFBEUERQRFBEUNhQ2FDYUERQRFBEUERQRFBEUERQ2FBEUERQRFBEUERQ2FDYUERQ2FDYUNhQ2FDYUAA0FAAAAAAAAAAAAAAAA
JgBGAJSTFDUUNhM2ExITEhMSExITEhM2EzYTNhQRFBEUERQRFBEUNRQ2ExITNhMSExITNhMSExITEhM2ExITNhQ1FBEUNhMADQUAAA==
Edit: I got it working 100% finally!!
So last night I managed to get my TC1 1 Gang switch to work.
Now on both of my TC2 switches every time I do the learn command I get:
Broadlink switch
Recieved packet is: AAAAAAAAAAAAAAAA
At least I’m getting signal every time haha.
Edit:
Ok I’ve found a work around to get the hex codes and for anyone else wondering I used the “RM Plugin” for Android, works well!
well at least you have it working now, tho’ I think you shouldn’t need to use the RM plugin.
In my case, restart of HA solved the learning issue.
Hi guys
Thankful to every one who can point me in the right direction.
I have been trying to connect the TC2 from broadlink via HA.
Unfortunately I had no luck.
The broadlink component could not learn the necessary code. It either learned something that did not work or nothing at all.
I have a bunch of other IR switches set up and all work fine.
The TC2 is RF and I could not set it up.
I read and tried everything on the forum.
Here is what I did as a last resource.
I backed up the data inside the android econtrol application, than downloaded the json file: jsonIrCode file.
Inside I could find a bunch of codes from which I think the last once could be those for the TC2.
Unfortunately they have been written in another code than the one HA is accepting.
I have got these lines
[38,0,54,0,-18,-107,-23,111,113,109,46,-114,-104,11,11,9,38,-88,-57,14,52,71,66,0,1,9,36,0,1,41,17,0,1,56,14,0,1,63,11,0,1,58,8,0,1,64,13,0,1,56,13,0,1,63,12,0,13,5,0,0],“delay”:0,“order”:0,“name”:""},{“buttonId”:5,“id”:5,“code”:[38,0,30,0,16,77,12,8,15,0,1,-35,10,0,1,73,8,-61,21,9,12,50,16,61,27,120,15,0,5,19,6,0,13,5,0,0,0,0,0,0,0,0,0,0],“delay”:0,“order”:0,“name”:""},{“buttonId”:6,“id”:6,“code”:[-23,20,70,0,-33,9,9,22,22,9,9,22,9,22,9,22,22,9,9,22,9,22,22,9,22,9,22,9,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,9,22,9,22,22,9,9,22,9,22,9,22,9,22,9,22,22,9,9,22,22,9,9,22,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:7,“id”:7,“code”:[-23,20,70,0,-33,9,22,9,22,9,22,9,9,22,22,9,22,9,22,9,9,22,9,22,9,22,9,22,9,22,9,22,9,22,9,22,22,9,22,9,22,9,22,9,9,22,9,22,22,9,9,22,22,9,9,22,22,9,22,9,22,9,22,9,9,22,9,22,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:8,“id”:8,“code”:[-23,20,70,0,-33,9,22,9,22,9,9,22,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,22,9,22,9,22,9,9,22,9,22,22,9,9,22,9,22,9,22,22,9,9,22,22,9,22,9,22,9,9,22,22,9,9,22,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:9,“id”:9,“code”:[-23,20,70,0,-33,9,22,9,9,22,9,22,22,9,22,9,9,22,22,9,22,9,22,9,22,9,22,9,9,22,9,22,9,22,22,9,9,22,9,22,9,22,9,22,22,9,9,22,9,22,9,22,22,9,9,22,9,22,9,22,22,9,9,22,22,9,9,22,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:10,“id”:10,“code”:[-23,20,70,0,-33,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,9,22,9,22,22,9,9,22,9,22,22,9,9,22,22,9,9,22,9,22,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:11,“id”:11,“code”:[-23,20,70,0,-33,9,9,22,9,22,9,22,9,22,22,9,9,22,22,9,22,9,22,9,9,22,22,9,22,9,22,9,22,9,9,22,22,9,9,22,22,9,22,9,9,22,22,9,9,22,22,9,22,9,22,9,22,9,9,22,9,22,9,22,22,9,22,9,9,22,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:12,“id”:12,“code”:[-23,20,70,0,-33,9,9,22,9,22,22,9,9,22,9,22,22,9,9,22,22,9,9,22,22,9,9,22,9,22,9,22,22,9,9,22,22,9,9,22,22,9,22,9,9,22,22,9,22,9,22,9,9,22,9,22,9,22,22,9,22,9,22,9,22,9,9,22,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:13,“id”:13,“code”:[-23,20,70,0,-33,9,22,9,9,22,9,22,9,22,22,9,22,9,22,9,9,22,22,9,22,9,9,22,22,9,22,9,22,9,9,22,9,22,9,22,22,9,9,22,22,9,22,9,9,22,22,9,9,22,9,22,22,9,22,9,9,22,9,22,9,22,9,22,9,22,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:14,“id”:14,“code”:[-23,20,70,0,-33,9,9,22,9,22,22,9,9,22,22,9,9,22,9,22,22,9,9,22,22,9,22,9,9,22,22,9,9,22,22,9,9,22,22,9,9,22,22,9,22,9,22,9,22,9,22,9,9,22,22,9,22,9,22,9,9,22,9,22,22,9,22,9,9,22,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:15,“id”:15,“code”:[-23,20,70,0,-33,9,9,22,9,22,22,9,9,22,9,22,22,9,22,9,22,9,9,22,22,9,22,9,22,9,9,22,22,9,22,9,9,22,22,9,22,9,22,9,22,9,9,22,22,9,22,9,9,22,22,9,9,22,9,22,9,22,9,22,9,22,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:16,“id”:16,“code”:[-41,10,70,0,-33,9,9,22,9,22,9,22,22,9,9,22,22,9,9,22,9,22,22,9,9,22,22,9,22,9,22,9,22,9,22,9,9,22,9,22,9,22,22,9,22,9,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,22,9,22,9,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:17,“id”:17,“code”:[-41,10,70,0,-33,9,22,9,9,22,9,22,22,9,22,9,9,22,9,22,9,22,9,22,22,9,9,22,9,22,9,22,9,22,22,9,9,22,22,9,22,9,22,9,22,9,9,22,9,22,22,9,22,9,9,22,22,9,9,22,22,9,9,22,22,9,9,22,9,22,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:18,“id”:18,“code”:[-23,20,70,0,-33,9,22,9,22,9,22,9,22,9,22,9,22,9,22,9,22,9,22,9,9,22,9,22,22,9,9,22,22,9,22,9,9,22,22,9,22,9,22,9,22,9,9,22,9,22,9,22,9,22,22,9,22,9,22,9,9,22,22,9,22,9,22,9,9,22,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:19,“id”:19,“code”:[-23,20,70,0,-33,9,22,9,9,22,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,9,22,9,22,22,9,9,22,9,22,9,22,22,9,22,9,22,9,22,9,9,22,9,22,22,9,9,22,22,9,9,22,22,9,9,22,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:20,“id”:20,“code”:[-23,20,70,0,-33,9,9,22,22,9,22,9,9,22,9,22,22,9,22,9,22,9,22,9,9,22,9,22,9,22,9,22,22,9,9,22,9,22,9,22,22,9,9,22,9,22,9,22,9,22,9,22,22,9,22,9,9,22,9,22,22,9,9,22,9,22,9,22,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""},{“buttonId”:21,“id”:21,“code”:[-23,20,70,0,-33,9,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,22,9,22,9,9,22,22,9,22,9,9,22,22,9,22,9,9,22,22,9,9,22,22,9,9,22,22,9,22,9,9,0,1,72],“delay”:0,“order”:0,“name”:""}]
Would some one be so kind and could point me to a internet page which can convert those codes into something the HA can work with.
Or give me any other advice on how I could get the TC2 to work.
Thank you in advance
You chose tc1 or tc2?
And you have the RM Pro?
Hi claudio
My setup is.
Raspberry pi 3
Hasbian 0,47
Broadlink rm pro
Switch tc2 1 gang.
In the econtrol app I did choose tc2.
Any idea
Did you follow the broadlink component instructions?
If you follow it carefully it should work
You have to download 3 files and use a script, check the instructions
Hi claudio
I went through the instruction from the broadlink component,USING E-CONTROL REMOTES, but run into some trouble.
Hopefully you can help me out.
The requirement for the script to work is python 2,7. I am running 3.x.
Because I did not want to mess with my installation, I did not changed the python version.
Instead I only tried to take the code from the jsonIrCode file and by using the tool from step 11 of the guide tried to convert the json file code into base 64.
It looked like this:
code from jsonIrCode file:
-23,20,70,0,-33,9,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,9,22,22,9,9,22,9,22,9,22,9,22,22,9,22,9,22,9,9,22,22,9,22,9,9,22,22,9,22,9,9,22,22,9,9,22,22,9,9,22,22,9,22,9,9,0,1,72
I had to add a 0 at the end or copied it twice, so not to get the error message that the length of the code is odd
The tool spilled out this code:
IyBwAzmSKSIimSIimSKSKSKSIimSIimSKSKSKSIikikimSIikimSIikimSIimSIimSIikimQFyA=
By copying it into my configuration yalm I had hopped it would work, but it did not.
The switch shows up in the front end, but you can not click on the lightning , you can but nothing happens.
The RMpro does not even blink.
This is strange, because it should be the code that the econtrol is using and when turning the switch from within the app everything works just fine,
When trying to do it from HA nothing.
I am at the end with my mathematics. Do not know what I am doing wrong.
Could you sent me an example of your code which you have in your yalm , that works for the tc2.
Or if it would not be too much to ask, to try to convert my code which I got from the jsonIrCode file into something that HA can understand.
Thank you
did you follow steps from 1 to 11?
at point 5 it states it works for python 2.7, but should work in python 3.x … I think
No no no, it will not work, it needs to be converted to hex first look at my original script code and you will see how it converts this code
you are converting a wrong code
Hi Claudio
I finally got it working. It was a big pain in the a…
Following all the steps from the broadlink component,e-control remote, carefully did got me close but not completely to the desired outcome.
The decisive step was hidden in the link in step one in the script page.
Only after I followed the advice for TC2 and copied the code 6 times. I got it working.
Also, I had to use two codes. One for on and one for off.
In the beginning I thought one code would cover bought commands.
Thank you for your help
Yes is almost always 6 times, but it can be less.
And on off are different codes which is a very good thing. You can’t have the state but you are sure that if you press off is or goes to off