Hello all, hope everybody’s fine. I have been working hard to set up Home Assistant (presently 0.109.6, System HassOS 3.13) to control my roller blinds according to the sun set and rise time. I feels there is much to be proud at all I’ve achieved: It’s up and running, I have some Hue lights automation working, I succeeded in grabbing RF codes with Broadlink Manager, which also identifies my Broadlink as rm2_pro_plus2. (I can send a command to a blind with it also) Next think is to get a basic communication with Broadlink with HA. No success after reading everything. I am anxious to start automating the blinds. I feel I might be close…
I first set this up as Remote, thinking I would be able to call the service “remote.send.command” on entity “remote.broadlink” that shows up in the Developer Tools, like this:
but I need a Devide ID and a command to send, don’t know where to set those up. (I thought I could send a RF string but apparently not)
I also read that it should not be set up as remote, but as a switch, so I tried this, but I get “The following integrations and platforms could not be set up: Switch.Broadlink” and “Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data[‘switches’][‘blind’][‘command_on’]. Got 'sgB4AhkMDBgNFxkMGAwZCw0YDBgZ…”
So I haven’t succeeded in setting the switch but I see a service called “switch.turn_on” and an entity “switch.blind”. Shouldn’t I get an entity named “store1” ? ( I changed the name of the switch I am trying to set up from “switch” to “store1” for fun of trying to get something under my control)
I am now trying every one of those: rm , rm2 , rm_mini , rm_pro_phicomm , rm2_home_plus , rm2_home_plus_gdt , rm2_pro_plus , rm2_pro_plus2 , rm2_pro_plus_bl
I’ve tried different indentation schemes…
What could be next ? Should I try a different type of HA install ? In Docker in Linux ? Buy a different Broadlink box ?
I don’t have a broadlink.learn service
I don’t remember exactly how, at one point I was trying with Broadlink Manager and the learn command in HA at the same time and suddenly rf codes appeared in HA.
Using remote.learn_command service and remote.broadlink entity, calling service makes a light come on on the Broadlink box. Pointing a IR device makes it blink, pressing repeatedly eventually makes it shut off, but no learned code to be found. RF device does not make the light blink. This would be for troubleshooting purposes only since I already grabbed the RF codes with Broadlink manager.
Wrong RF codes would not prevent the switch from registering, would it ?
Ok, so you deleted the Broadlink integration as a switch and you’re using as a remote. If the light on the device turns on when you use remote.learn_command, then you’re using it correctly. If it is on, you should see a persistent notification with the command captured or, if nothing was captured, you should see a persistent notification saying something like “no signal was received”.
This might be a long shot, since I had a different issue than yours. I have a Broadlink RM Mini 3 (new black bean). I wasn’t able to capture any command through HA (I’ve set it up as a switch since I was using with SmartIR), no light feedback on the device when using broadlink.learn service. Then I would get the “no signal received” notification. Like I said, long shot, but worth a try:
I deleted the Broadlink RM Mini from the app, which made it blink fast waiting to be set up. Then I added it again, but only to the point where it connects to my local network, I didn’t assign it to a home/room. That made it work locally (LAN control) and not exclusively through the Broadlink cloud.
Maybe this would work for you. I don’t know.
But it would be nice to know.
Also, there was an identation problem here:
switch:
- platform: broadlink
host: xxx
mac: xxxx
timeout: 15
switches:
store1: *#previously "blind"*
friendly_name: "Store 1 ouvrir fermer" #right here
command_on: 'sgB4AhkMDBg...' #right here
command_off: 'sgC8AhgMD...' #right here
I don’t see my indentation mistake…this must be it then. Would you explain precisely ?
I redid the “delete the RM from the app, add it again stopping before adding to a room” etc. I noticed a warning that my wifi was 5Ghz and should be 2,4 Hz so I thought I had the solution, but after turning the 5Gz off, nothing better.
I get “Failed to learn ‘Turn on/television’: No code received” when trying to learn IR (but got the light to blink and shut off), nothing when trying RF.
And still get “The following integrations and platforms could not be set up: Switch.Broadlink” and “Invalid config for [switch.broadlink]: not a valid value for dictionary value @ data[‘switches’][‘blind’][‘command_on’]. Got 'sgB4AhkMDBgNFxkMGAwZCw0YDBgZ…”
OMG I lost the error message !
Before reading your last reply, because you mentioned a indentation error earlier, I removed everything regarding the switches, copied a setup from Rollertroll web site (roller shades manufacturer) and I now have the Broadlink services send and learn.
I can move forward now, I’m so happy !
I’ll take time to find out where my indentations errors were , Thank you so much !
The error was showing because my base 64 code was not right. I read that it had to be multiple of 16 characters or something…
We must be ultra cautious with indentation, the right kind of apostrophe or question marks (not curled), the right code format etc. Fo somebody who is getting into this HA adventure, know that when you think you understand this, you need to be even more prudent than you thought…