Broadlink RM-PRO and A1 sensor

It seems that sp3 is supported: https://github.com/mjg59/python-broadlink/blob/master/broadlink/init.py#L18

Great!
Is there already a way to use SP1, SP2 or SP3, once they report their status…

I think Sp2 and sp3 will report the current state back to HA, but sp1 will not.

@undef : could you try to add your sp3 switch as:
type: sp2

I have a SP Mini.
Would be
type: SPMini
?

Should also be sp2: https://github.com/mjg59/python-broadlink/blob/master/broadlink/init.py#L16

Notice, that you will need the newest version: https://github.com/home-assistant/home-assistant/pull/5022

I will will add support for all the types later

The log not show any problem…

for you problem try to copy cp -r /usr/local/lib/python2.7/dist-packages/Crypto /usr/local/lib/python3.5/dist-packages/

How do I config complete A/C remote with all the buttons needed?

Thanks.

That will be a really challenge…
First of all, I think is time we ask for a Button Instance instead of using switches.
I think the best option would be creating a floating remote filled with buttons, just like the history floating window when click on a component on frontend.

It did not work.
Got a persistent notification saying Invalid Config

switch 3:
  platform: broadlink
  host: 192.168.1.207
  mac: 'B4:43:0D:XX:XX:XX'
  type: sp2
  switches:
    sp_switch:

Remove the two last lines

I did it, but now nothing appears on frontend…

Check your log

Thanks I did this (I had to change to python3.4 I hope it will work as well

A new version is ready for testing: https://github.com/home-assistant/home-assistant/blob/Broadlink_fix/homeassistant/components/switch/broadlink.py

nothing logged.

Check the output from hass --script check_config

Nothing as well…

(hass_venv) hass@pi:/home/pi$ hass --script check_config
Testing configuration at /home/hass/.homeassistant
(hass_venv) hass@pi:/home/pi$

hi daniel, i’m running into some issues just trying to get hass working with your latest file
(https://raw.githubusercontent.com/home-assistant/home-assistant/645cbff3f5c47acf996e40101f96a879c8ce9328/homeassistant/components/switch/broadlink.py)

here’s what I did:
pip3 install --upgrade homeassistant
removed the previous broadlink.py from custom_components/sensor
added the broadlink.py reference above in custom_components/switch

on starting hass it tried to fetch your dependency and failed with this error:
INFO:homeassistant.util.package:Attempting install of https://github.com/Danielhiversen/python-broadlink/archive/master.zip#master==0.3
Command “C:\Users\admin\AppData\Local\Programs\Python\Python35\python.exe -u -c “import setuptools, tokenize;file=‘C:\Users\admin\AppData\Local\Temp\pip-build-fspdk4ql\pycrypto\setup.py’;f=getattr(tokenize, ‘open’, open)(file);code=f.read().replace(’\r\n’, ‘\n’);f.close();exec(compile(code, file, ‘exec’))” install --record C:\Users\admin\AppData\Local\Temp\pip-vr_c01xq-record\install-record.txt --single-version-externally-managed --compile --home=C:\Users\admin\AppData\Local\Temp\tmp5go0njn_” failed with error code 1 in C:\Users\admin\AppData\Local\Temp\pip-build-fspdk4ql\pycrypto\

So, would love to try out with my SP3 (SPCC) but need some help getting there.

— update

i manually placed the broadlink from your github under deps/broadlink/init,py (overwriting the 0.2 that came with the upgrade) and replaced the dependency wth broadlink==0.2.
the good news is the A1 still works… the SPCC remains silent, with nothing in the logs.

hope this helps in making sense of the behaviour.

I also try this
switch 1:
** platform: broadlink**
** host: 192.168.0.109**
** mac: ‘B4:43:0D:CB:FB:6F’**
** type: sp2**
** switches:**
** sp_switch:**

and get Invalid config error, any help???

What do you mean with that? Is the switch not showing up in the ui?

Try:

switch:
  platform: broadlink
  host: IP_ADDRESS
  mac: 'MAC_ADDRESS'
  type: sp2
  switches:
    Name: