Core: broadlink integration error

Created on 17 Sep 2020  路  169Comments  路  Source: home-assistant/core

The problem


I tried to use new integration for my broadlink remote (rm_pro_phicom), it worked with custom components without problems,
with new integration it fails and doesn't create new entity.

Environment

  • Home Assistant Core release with the issue: 0.115
  • Last working Home Assistant Core release (if known): 0.114
  • Operating environment (OS/Container/Supervised/Core): Core
  • Integration causing this issue: Broadlink
  • Link to integration documentation on our website: https://www.home-assistant.io/integrations/broadlink

Problem-relevant configuration.yaml


Traceback/Error logs

Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:29
First occurred: 20:41:02 (2 occurrences)
Last logged: 20:42:44

Error setting up entry despacho_remote for broadlink
Error setting up entry remote_despacho for broadlink
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
    result = await component.async_setup_entry(hass, self)  # type: ignore
  File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
    return await device.async_setup()
  File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
    update_manager = get_update_manager(self)
  File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 29, in get_update_manager
    return update_managers[device.api.type](device)
KeyError: 'Unknown'

Additional information

broadlink

Most helpful comment

looks also ok to me, thanks a lot !

All 169 comments

Same thing happens with rm_mini3_newblackbean, no entity is created . It`s connect fine to the old rm_mini3 .

same issue here rm_mini_3 no entity created this shows in logs.
ERROR (MainThread) [homeassistant.components.broadlink.updater] Error fetching device data: The device storage is full

same here:

Logger: homeassistant.components.broadlink
Source: components/broadlink/config_flow.py:100
Integration: Broadlink (documentation, issues)
First occurred: 22:59:27 (1 occurrences)
Last logged: 22:59:27

Failed to connect to the device at 10.0.0.x: Invalid host for this configuration flow. The MAC address should be xx:xx:xx:xx:xx:xx, but xx:xx:xx:xx:xx:xx was given

and
Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 22:57:33 (3 occurrences)
Last logged: 23:07:24

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, args, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
await self.async_set_device(device)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
"model": device.model,
AttributeError: 'rm4' object has no attribute 'model'

broadlink documentation
broadlink source
(message by IssueLinks)

Hey there @danielhiversen, @felipediel, mind taking a look at this issue as its been labeled with an integration (broadlink) you are listed as a codeowner for? Thanks!
(message by CodeOwnersMention)

The new Blackbean will be solved with https://github.com/home-assistant/core/pull/39228.

@neotrunks Please open a terminal on your computer, install the python-broadlink library (pip install broadlink), open Python 3 and type:

import broadlink as blk

devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])

devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])

What is the output?

@joten75 Once you choose a device for the configuration flow, you can no longer change it. You need to start a new configuration flow if you want to change it. This is not a bug.

The second error is still obscure to me. Do you have any other clues? What were you doing (step by step) when this error appeared?

@neotrunks Please consider sending me your device type soon, or we will miss the next release.

@felipediel
These are the devices I have in my HA.
RM4 Pro -> 0x6026
RM Mini 3 -> 0x5f36

0x6026 is working, right?

@felipediel
i have the same problem this is the output python
[('192.168.10.101', '0x649b')]
it's RM4Pro

@spiro-c Thank you! We will support this device soon.

0x6026 is working, right?

Yes, but not all my ir codes are showing up. Will need to look into that further when I get the chance.

Ok. Please read the docs first, we changed a lot of things.

Post retracted.
Never mind. Not an accurate list.

@neotrunks Please open a terminal on your computer, install the python-broadlink library (pip install broadlink), open Python 3 and type:

import broadlink as blk

devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])

devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])

What is the output?

[('192.168.0.136', '0x27c3')]

@neotrunks Thank you! Your device will be supported soon.

@felipediel i
I just tried to add a device broadlink in the ui :click on the plus sign, select broadlink, insert the ip of the broadlink then unkwno error show up and in the log the message . could it be because i have more than one broadlink?
Obviously I have deleted all the configuration in the yaml except the switch.

No. Please send me your device types so I can check.

type: rm_mini3_newblackbean
in the log of the error they show:
Failed to connect to the device at 10.0.0.5: Invalid host for this configuration flow. The MAC address should be 56:fd:5a:77:0f:78, but c1:17:d6:a7:df:24 was given
the second mac was the rigth one but with inverse order they must be 24:df:a7:d6:17:c1

@joten75 RM mini 3 new Blackbean (0x5f36) will be supported after this patch.

Thanks for all this work @felipediel. I think you already have my device in your PR, but I ran your code to get the info to be sure.

[('192.168.1.99', '0x5f36'), ('192.168.1.96', '0x5f36')]

You commented as I was checking!

Thanks!

thank @felipediel i very appreciate your help.
so i wait for the mini 3 but even the rm2 pro dont'work? i've this when try to add to config:

Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 11:54:00 (1 occurrences)
Last logged: 11:54:00

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, args, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
await self.async_set_device(device)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
"model": device.model,
AttributeError: 'rm' object has no attribute 'model'

@joten75 I need to see the types (represented in hex). This is how you get them: https://github.com/home-assistant/core/issues/40191#issuecomment-694532131

@joten75 I need to see the types (represented in hex). This is how you get them: #40191 (comment)

Im using Windows 10, how to do it?

My RM Pro PLUS have error when update to 115
Here, my log
image

image

We made a recent update to implement a configuration flow for these devices.

From now on they will be configured automatically. But for this to happen, the device needs to be here.

You see those hex keys? These are the device types. You need to send me your type. Here is a how to.

How do I find my device type?

  1. Install Python 3
  2. Open a terminal, go to your tests folder, create a venv and install python-broadlink.
    If you already have python-broadlink installed, you can skip this step.
python3 -m venv venv
source venv/bin/activate
pip3 install broadlink

Now open Python 3:

python3

Then you can try these things to get your type:

import broadlink as blk

## Discover devices. If your device is locked, it won't be discovered.
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])

## Say hello to the device. It will respond even if it is locked.
devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])

If you need more detailed instructions, call tech support.

You are being tortured due to the lack of a decent error message that shows the unsupported type. I will improve this soon. I will also consider adding a manual step to the config flow. But for now, please be proactive, if it is not working, please find your type and send me so I can add it to the library and make it compatible with discover() soon.

Things had to get worse before getting better, hope you guys understand.

Looks like this has already been added, but here is mine: ('192.168.1.60', '0x279d')
Is there a way to manually add the missing device types till they can be included in a future release?

Yes, but it is hackish, you should not do it. I will implement this for normal people soon.

螚i, I can not connect my RM 3 mini also. Will there be a fix for them?

We made a recent update to implement a configuration flow for these devices.

From now on they will be configured automatically. But for this to happen, the device needs to be here.

You see those hex keys? They are the device types. You need to send me your type. Here is a how to.

How do I find my device type?

  1. Install Python 3
  2. Open a terminal, go to your tests folder, create a venv and install python-broadlink.
    If you already have python-broadlink installed, you can skip this step.
python3 -m venv venv
source venv/bin/activate
pip3 install broadlink

Now open Python 3:

python3

Then you can try these things to get your type:

import broadlink as blk

## Discover devices. If your device is locked, it won't be discovered.
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])

## Say hello to the device. It will respond even if it is locked.
devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])

If you need more detailed instructions, call tech support.

Can help me detail info? Where is
" 2. Open a terminal, go to your tests folder, create a venv and install python-broadlink.
If you already have python-broadlink installed, you can skip this step."

How can i go test folder?

Any folder.

Any folder.

Sorry, but i cant do your guide, can explain me detail? Thank you

In the next update your device type will appear in the logs.

Hi,
I have RM4 Pro -> 0x6026
when i try to install integration, in my logs show me this:
Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 17:55:21 (1 occurrences)
Last logged: 17:55:21

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, args, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
await self.async_set_device(device)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
"model": device.model,
AttributeError: 'rm4' object has no attribute 'model'

Do you have some solution for this??

@joten75 I need to see the types (represented in hex). This is how you get them: #40191 (comment)

RM2 Pro Plus 0x272a;

RM4 Pro ('192.168.1.228', '0x6026')

Here are mine :
[('x.x.x.x', '0x5f36')] - rm mini 3 - newbleackbean
[('x.x.x.x', '0x2737')] -rm mini 3

@felipediel I have a Broadlink RM4C Mini, on the earlier version it would only work if it's not connected to the broadlink cloud (that method to connect but not add to a room in broadlink app). I've seen this is not anymore on the Home Assistant Broadlink Integration page.. Does it works when connected to the broadlink app now? Thanks!

@felipediel, Not working for me too. Here my grain of sand:

[('x.x.x.x, '0x279d')] -> RM pro +

@felipediel here is mine
[('192.168.xx.xx', '0x2712')] - RM Pro
[('192.168.xx.xx', '0x2714')] - A1

@felipediel Thank you for your work on this upgrade. All my Ankuoo NEO Switches stopped working, please add to the code.
Formerly used SP2 in configuration. Thanks
Ankuoo NEO Pro (shows wattage) 0x2716
Ankuoo NEO (no wattage) 0x2717

I am on 115.1 and cannot connect to a rm mini3 red bean.

Logger: homeassistant.components.broadlink
Source: components/broadlink/config_flow.py:100
Integration: Broadlink (documentation, issues)
First occurred: 2:22:50 PM (1 occurrences)
Last logged: 2:22:50 PM
Failed to connect to the device at 192.168.1.110: Device not found

I have 3 old rm mini's and a pro2 that work fine.

hi,
I write just in case it can help someone else with my problem. I have a thermostat fluoreon component based on broadlink, and until I deactivated it too from configuration.yaml the integration via ui failed. So you have to deactivate all components that have a reference to the broadlink, restart, configure via ui and then reactivate the various components.
thank a lot for you help @felipediel

import broadlink as blk
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
[]
devs = blk.discover(discover_ip_address="192.168.4.166", timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])
[]

=======
I have no devices, but for HA 114.4 they are visible, maybe I need to turn on some descocery protocol on router ?

@joten75 Thanks for informing about this. We have no control over custom components so these things are really difficult to debug. So was that second error message being caused by this? What is the name of the component?

@tottka Thank you! What is the official app that should be used to control these devices? Can you discover them with Broadlink app?

I was using the NEO app from the play store until a few weeks ago when they updated the app and they stopped working. Now I am using CHACON again from the play store

Hi. I'm very happy that you are working hard on this integration because I have many problems regarding Rm4 pro and RF learning command. I'm not a developer so, for me python instructions ar not clear. I put wifi on rm4 pro via broadlink app and setup this on home assistant. For IR code work fine. I have integration with smartIr and also try to learn IR signals from TV and Fujitsu climate remote. That's good and I have file "broadlink_remote_24dfa7e476b7_codes" whit codes.
Unfortunatelly, for RF, that's is not possible. I tried to setup a CAME gate remote control via three different remote (two original and one cloned from first) whitout any code learned.
How's wrong?
Could I ask if you explain step by step the python way (I'm activated the pip package....)

Thank you very much.
Daniele

@danros3 Forget about those instructions and update Home Assistant to 0.115.1. Your unsupported device types will appear in the logs. RF learning is not supported yet, you need to wait for this.

Basic flow for solving issues and contributing with device types

  1. Do I have a problem to configure the device via Integrations?

    • No: Do not send me your device type, we already have it.
    • Yes: Proceed.
  2. Do you see your device here or here?

    • Yes: Do not send me your device type, we already have it.
    • No: Proceed.
  3. Did you update to 0.105.1 and got an error message "Unsupported type: YOUR_DEVICE_TYPE"

    • Yes: Please send me your device type. We need this to implement device discovery and MAC tracking.
    • No: Check if this is really the problem. We changed a lot of things recently, so please read to docs to adapt your config. We are also dealing with an addressing issue for VPN users or those who have multiple network interfaces. All of these problems are being addressed. For now, disabling VPN while configuring the device on the Integrations page may help.

Edit: I think the patch with the error message was not released yet. Sorry.

Hi,
I have RM4 Pro -> 0x6026
when i try to install integration, in my logs show me this:
Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 17:55:21 (1 occurrences)
Last logged: 17:55:21

Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, args, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
await self.async_set_device(device)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
"model": device.model,
AttributeError: 'rm4' object has no attribute 'model'

Do you have some solution for this??

@djhalun Could you please try this and see if it works for you?

@felipediel I have a Broadlink RM4C Mini, on the earlier version it would only work if it's not connected to the broadlink cloud (that method to connect but not add to a room in broadlink app). I've seen this is not anymore on the Home Assistant Broadlink Integration page.. Does it works when connected to the broadlink app now? Thanks!

@rcojr I did some experiments and I can make them work together, but I won't give any priority to this. My next steps are: solve issues, implement device discovery, MAC tracking and RF learning.

@felipediel here is mine:

[('192.168.xx.xx', '0x649b')] - RM4 Pro
[('192.168.xx.xx', '0x648d')] - RM4 Mini

Thanks!

@felipediel here is mine:

[('192.168.xx.xx', '0x649b')] - RM4 Pro
[('192.168.xx.xx', '0x648d')] - RM4 Mini

Thanks!

How do you get a Hex? Can you guide me?

Hi,
I have RM4 Pro -> 0x6026
when i try to install integration, in my logs show me this:
Logger: aiohttp.server
Source: components/broadlink/config_flow.py:47
First occurred: 17:55:21 (1 occurrences)
Last logged: 17:55:21
Error handling request
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_protocol.py", line 418, in start
resp = await task
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_app.py", line 458, in _handle
resp = await handler(request)
File "/usr/local/lib/python3.8/site-packages/aiohttp/web_middlewares.py", line 119, in impl
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/request_context.py", line 18, in request_context_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/ban.py", line 72, in ban_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/auth.py", line 127, in auth_middleware
return await handler(request)
File "/usr/src/homeassistant/homeassistant/components/http/view.py", line 129, in handle
result = await result
File "/usr/src/homeassistant/homeassistant/components/config/config_entries.py", line 169, in post
return await super().post(request, flow_id)
File "/usr/src/homeassistant/homeassistant/components/http/data_validator.py", line 60, in wrapper
result = await method(view, request, args, *kwargs)
File "/usr/src/homeassistant/homeassistant/helpers/data_entry_flow.py", line 106, in post
result = await self._flow_mgr.async_configure(flow_id, data)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 156, in async_configure
result = await self._async_handle_step(flow, cur_step["step_id"], user_input)
File "/usr/src/homeassistant/homeassistant/data_entry_flow.py", line 204, in _async_handle_step
result: Dict = await getattr(flow, method)(user_input)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 82, in async_step_user
await self.async_set_device(device)
File "/usr/src/homeassistant/homeassistant/components/broadlink/config_flow.py", line 47, in async_set_device
"model": device.model,
AttributeError: 'rm4' object has no attribute 'model'
Do you have some solution for this??

@djhalun Could you please try this and see if it works for you?

Yes, this was solution for my problem. Thx very much for your help.

@joten75 Thanks for informing about this. We have no control over custom components so these things are really difficult to debug. So was that second error message being caused by this? What is the name of the component?

yes, the second error disappear when i deactivate the floureon thermostat component, it's a component based on broadlink. So i think you must warning about this too, every component o configuration in yaml which have a relation whit
broadlink must be deactivate . 馃憤

Here is the cause: https://github.com/algirdasc/hass-floureon/blob/master/custom_components/floureon/manifest.json. They need to update the manifest to broadlink==0.14.1 at least. You can test manually updating the manifest if you want to use both.

Is it possible the following issue I鈥檝e opened is related to this on?
issue 40287

@felipediel Here is the cause: https://github.com/algirdasc/hass-floureon/blob/master/custom_components/floureon/manifest.json. They need to update the manifest to broadlink==0.14.1 at least. You can test manually updating the manifest if you want to use both.

Yep, That was my problem. I've manually changed the manifest.json file and, after restarting Home Assistant, it was detected perfectly:

{
  "domain": "floureon",
  "name": "Floureon Thermostat",
  "documentation": "https://github.com/algirdasc/hass-floureon",
  "dependencies": [],
  "codeowners": ["@algirdasc"],
  "issue_tracker": "https://github.com/algirdasc/hass-floureon/issues",
  "requirements": ["pythoncrc", "broadlink==0.14.1"]
}

Maybe @algirdasc can take a look at this 馃憤

@felipediel here is mine:

[('192.168.xx.xx', '0x27d0')] - RM mini 3
no entity be created

Thank you very very much for your work hard...


Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:24
First occurred: 涓婂崍6:02:18 (3 occurrences)
Last logged: 涓婂崍7:02:30

Error setting up entry rm3 for broadlink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
if device.api.model.startswith("RM mini"):
AttributeError: 'NoneType' object has no attribute 'startswith'

To everyone with the floureon component, @algirdasc fixed the codebase. Just updated via HACS and all seems to be working ok :)

Thanks everyone for the help, and @felipediel for the integration! :)

@felipediel here is mine:

[('192.168.xx.xx', '0x27cd')] - RM mini 3
no entity be created

Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:24
First occurred: 5:31:14 PM (1 occurrences)
Last logged: 5:31:14 PM
Error setting up entry rmmini3 for broadlink

Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
if device.api.model.startswith("RM mini"):
AttributeError: 'NoneType' object has no attribute 'startswith'

@Rain-ZG Thank you! We will support your device soon.

@spiro-c Thank you! We will support this device soon.

Hi @felipediel I too have the same device. Below is the error I receive after trying the integration. Does work with an rm3 mini i have though.
Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:24
First occurred: 7:44:48 AM (1 occurrences)
Last logged: 7:44:48 AM

Error setting up entry RM4Pro for broadlink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
if device.api.model.startswith("RM mini"):
AttributeError: 'NoneType' object has no attribute 'startswith'

@spiro-c Thank you! We will support this device soon.

@spiro-c Thank you! We will support this device soon.

Hi @felipediel I have the same device as spiro-c and receive the following error.

Logger: homeassistant.config_entries
Source: components/broadlink/updater.py:24
First occurred: 7:44:48 AM (1 occurrences)
Last logged: 7:44:48 AM

Error setting up entry RM4Pro for broadlink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
if device.api.model.startswith("RM mini"):
AttributeError: 'NoneType' object has no attribute 'startswith'

@burbuja1 What is your device type? https://github.com/home-assistant/core/issues/40191#issuecomment-694804640

Hi @felipediel it's a 0x649b RM4 Pro. I checked my rm3 mini and that works.

0x649b will be supported when we release this.

0x649b will be supported when we release this.

Thanks @felipediel! Legend!

@felipediel after updating to 0.115.2 I'm still having an issue connecting my RM4 mini, when I add the device it now show's up as an unsupported device but my address(0x648d) is in the list.

Is this device yet to be supported or is there an error?

2020-09-19 23:20:10 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry IR blaster for broadlink
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/config_entries.py", line 228, in async_setup
result = await component.async_setup_entry(hass, self) # type: ignore
File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 28, in async_setup_entry
return await device.async_setup()
File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 97, in async_setup
update_manager = get_update_manager(self)
File "/usr/src/homeassistant/homeassistant/components/broadlink/updater.py", line 24, in get_update_manager
if device.api.model.startswith("RM mini"):

Love your work!!

Thank you! This update has not yet been released. It will be available soon.

after 0.115.2 i'm getting

AttributeError: 'rm' object has no attribute 'model'`

Are you using any custom component?

@neotrunks Please open a terminal on your computer, install the python-broadlink library (pip install broadlink), open Python 3 and type:

import broadlink as blk

devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype)) for d in devs])

devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype)) for d in devs])

What is the output?

[('192.168.0.xxx', '0x2737')]
and
[('192.168.0.xxx', '0x2737')]

I'm not upgrading to the last firmware... with HA 113 it was working perfect.
When I try to integrate in configuration/integration/broadlink I get no error on GUI, but a "Device not found" on the console

Your device is supported. The error message comes from an outdated config file, probably. Please check the IP address.

Your device is supported. The error message comes from an outdated config file, probably. Please check the IP address.

- platform: broadlink
  host: !secret rm_mini_3_despatx_ip
  mac: !secret rm_mini_3_despatx_mac

where i'm getting the ip and mac from my secrets.yaml...

this is the console output:
2020-09-20 15:56:42 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to the device at 192.168.0.168: Device not found
The GUI says in red: "Can't connect"
And from the ha docker console I get:

bash-5.0# ping 192.168.0.168
PING 192.168.0.168 (192.168.0.168): 56 data bytes
64 bytes from 192.168.0.168: seq=0 ttl=255 time=410.421 ms
64 bytes from 192.168.0.168: seq=1 ttl=255 time=3.124 ms
64 bytes from 192.168.0.168: seq=2 ttl=255 time=36.012 ms
64 bytes from 192.168.0.168: seq=3 ttl=255 time=8.024 ms
64 bytes from 192.168.0.168: seq=4 ttl=255 time=18.886 ms
64 bytes from 192.168.0.168: seq=5 ttl=255 time=31.208 ms
^C
--- 192.168.0.168 ping statistics ---
7 packets transmitted, 6 packets received, 14% packet loss
round-trip min/avg/max = 3.124/84.612/410.421 ms
bash-5.0# 

Strange. I have the same device (0x2737) and it works normally. The message means what is says, your device was not found. So make sure this address really matches your device. If you read the documentation, double-checked all the information and everything is correct, please ping me so we can do some tests.

Does discover() work outside Home Assistant for the same host? I am asking because you redacted the host. You don't need to redact your local addresses, they are not accessible to the outside world unless you expose them through your external IP.

I ask for the information and you fill it up with xxx. What's the use? 馃ぃ 馃ぃ

Let's get more information this time.

import broadlink as blk

devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])

devs = blk.discover(discover_ip_address="192.168.0.17", timeout=5)  # Your device IP address
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])

What is the output?

This is my output for my ip:

Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import broadlink as blk
>>> 
>>> devs = blk.discover(timeout=5)
>>> print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])
[('192.168.0.169', '0x2737', False), ('192.168.0.168', '0x2737', False)]
>>> 
>>> devs = blk.discover(discover_ip_address="192.168.0.168", timeout=5)  # My device IP address
>>> print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])
[('192.168.0.168', '0x2737', False)]
>>> 

I've tried to upgrade this rmmini to latest firmware... same result... can't integrate

This is the same function we are using to discover your device in Home Assistant. It should work.

I'm in a docker environment... and in last version it was working well (without integration) with yaml configuration.
I've also smartir and codes work well with my climates. What else can I test?

I don't know about your environment conditions. If it is a devcontainer, try adding --net=host to runArgs in devcontainer.json. So it will look like this:

  "runArgs": ["-e", "GIT_EDITOR=code --wait", "--net=host"],

This should not be necessary for direct discovery, but it won't hurt if you try. More: https://www.home-assistant.io/docs/installation/docker/

Hi @felipediel,

Could you please add 0x947a (SPS3-EU) as it's now only a switch and the power sensors are missing?

If you click the entity in lovelace and then click Settings in the upper right you should see the power sensor. I can reproduce this behavior with a mock device (but I don't have the real device to test).

Felipediel,

I think my device isn't on the recognized device list, however I have upgraded to 115.2 and I'm not seeing a more graceful error when trying to discover through Integrations. Just want to make sure the issue is down to non-recognized device and not some other issue. Current front end error: Failed to connect

import broadlink as blk

devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])
[('192.168.1.60', '0x279d', False)]

devs = blk.discover(discover_ip_address="192.168.1.60", timeout=5) # Your device IP address
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])

Thanks in advance.

Different issue. Your issue is related to your subnetwork. I am working on the solution. Do you want to help me test it?

Willing to try :)

Ok, I will try something really stupid first, but if it works this will be a universal solution.

python3 -m venv venv
source venv/bin/activate
pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
python3

```python3
import broadlink as blk
for d in blk.xdiscover():
print(d)

print(blk.hello("192.168.0.17")) # Device IP address

Do you see your devices?

Failing at the first hurdle!
I'm running Win10, Python 3.8 not sure if that makes a difference?

>>> python3 -m venv venv
  File "<stdin>", line 1
    python3 -m venv venv
               ^
SyntaxError: invalid syntax
>>> source venv/bin/activate
  File "<stdin>", line 1
    source venv/bin/activate
           ^
SyntaxError: invalid syntax
>>> pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
  File "<stdin>", line 1
    pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
         ^
SyntaxError: invalid syntax
>>> python3

The commands in the first box must be entered at the terminal. They create a virtual environment to not screw with your stuff.

Suspect you will wish you hand not asked me to test, this could be an issue as my end. Running HA on Synology/Docker.

From terminal:

bash-5.0# python3 -m venv venv                                                                                                                          
bash-5.0# source venv/bin/activate                                                                                                                      
(venv) bash-5.0# pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator                                                      
Collecting git+https://github.com/felipediel/python-broadlink.git@the-generator                                                                         
  Cloning https://github.com/felipediel/python-broadlink.git (to revision the-generator) to /tmp/pip-req-build-ur8rhjf_                                 
  Running command git clone -q https://github.com/felipediel/python-broadlink.git /tmp/pip-req-build-ur8rhjf_                                           
  Running command git checkout -b the-generator --track origin/the-generator                                                                            
  Branch 'the-generator' set up to track remote branch 'the-generator' from 'origin'.                                                                   
  Switched to a new branch 'the-generator'                                                                                                              
Collecting cryptography>=2.1.1                                                                                                                          
  Using cached cryptography-3.1.tar.gz (534 kB)                                                                                                         
  Installing build dependencies ... error                                                                                                               
  ERROR: Command errored out with exit status 1:                                                                                                        
   command: /config/venv/bin/python3 /config/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --                               
prefix /tmp/pip-build-env-cuzystiv/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://p                               
ypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''                                     
       cwd: None                                                                                                                                        
  Complete output (68 lines):                                                                                                                           
  Collecting setuptools>=40.6.0                                                                                                                         
    Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)                                                                                            
  Collecting wheel                                                                                                                                      
    Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)                                                                                              
  Collecting cffi!=1.11.3,>=1.8                                                                                                                         
    Using cached cffi-1.14.3.tar.gz (470 kB)                                                                                                            
  Collecting pycparser                                                                                                                                  
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)                                                                                           
  Using legacy setup.py install for cffi, since package 'wheel' is not installed.                                                                       
  Installing collected packages: setuptools, wheel, pycparser, cffi                                                                                     
      Running setup.py install for cffi: started                                                                                                        
      Running setup.py install for cffi: finished with status 'error'                                                                                   
      ERROR: Command errored out with exit status 1:                                                                                                    
       command: /config/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-4mh                               
oyzu3/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4mhoyzu3/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"',                                
open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'                               
))' install --record /tmp/pip-record-stx5nq9s/install-record.txt --single-version-externally-managed --prefix /tmp/pip-bu                               
ild-env-cuzystiv/overlay --compile --install-headers /config/venv/include/site/python3.8/cffi                                                           
           cwd: /tmp/pip-install-4mhoyzu3/cffi/                                                                                                         
      Complete output (48 lines):                                                                                                                       
      unable to execute 'gcc': No such file or directory                                                                                                
      unable to execute 'gcc': No such file or directory      

          No working compiler found, or bogus compiler options passed to                                                                                
          the compiler from Python's standard "distutils" module.  See                                                                                  
          the error messages above.  Likely, the problem is not related                                                                                 
          to CFFI but generic to the setup.py of any Python package that                                                                                
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about                                                                              
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/                                                                              
          Otherwise, see https://wiki.python.org/moin/CompLangPython or                                                                                 
          the IRC channel #python on irc.freenode.net.)                                                                                                 

          Trying to continue anyway.  If you are trying to install CFFI from                                                                            
          a build done in a different context, you can ignore this warning.                                                                             

      running install                                                                                                                                   
      running build                                                                                                                                     
      running build_py                                                                                                                                  
      creating build                                                                                                                                    
      creating build/lib.linux-x86_64-3.8                                                                                                               
      creating build/lib.linux-x86_64-3.8/cffi                                                                                                          
      copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi                                                                                          
      copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi                                                                                     
      copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi                                                                                       
      copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi                                                                                       
      copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi                                                                                          
      copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi                                                                                        
      copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi                                                                                      
      copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi                                                                                 
      copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi                                                                                 
      copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi                                                                                            
      copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi                                                                                           
      copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi   
      copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi                                                                                      
      copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi                                                                                    
      running build_ext                                                                                                                                 
      building '_cffi_backend' extension                                                                                                                
      creating build/temp.linux-x86_64-3.8                                                                                                              
      creating build/temp.linux-x86_64-3.8/c                                                                                                            
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc                               
 -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -ljemalloc -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/                               
ffi -I/usr/include/libffi -I/config/venv/include -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-                               
x86_64-3.8/c/_cffi_backend.o                                                                                                                            
      unable to execute 'gcc': No such file or directory                                                                                                
      error: command 'gcc' failed with exit status 1                                                                                                    
      ----------------------------------------                                                                                                          
  ERROR: Command errored out with exit status 1: /config/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.ar                               
gv[0] = '"'"'/tmp/pip-install-4mhoyzu3/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-4mhoyzu3/cffi/setup.py'"'"';f=g                               
etattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compi                               
le(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-stx5nq9s/install-record.txt --single-version-extern                               
ally-managed --prefix /tmp/pip-build-env-cuzystiv/overlay --compile --install-headers /config/venv/include/site/python3.8                               
/cffi Check the logs for full command output.                                                                                                           
  WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.                                                                      
  You should consider upgrading via the '/config/venv/bin/python3 -m pip install --upgrade pip' command.                                                
  ----------------------------------------                                                                                                              
ERROR: Command errored out with exit status 1: /config/venv/bin/python3 /config/venv/lib/python3.8/site-packages/pip inst                               
all --ignore-installed --no-user --prefix /tmp/pip-build-env-cuzystiv/overlay --no-warn-script-location --no-binary :none                               
: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_impl                               
ementation != '"'"'PyPy'"'"'' Check the logs for full command output.                                                                                   
WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.                                                                        
You should consider upgrading via the '/config/venv/bin/python3 -m pip install --upgrade pip' command.                                                  
(venv) bash-5.0# python3                                                                                                                                
Python 3.8.5 (default, Sep 10 2020, 14:23:57)   

output from python which I guess is expected given the above:

>>> import broadlink as blk
>>> for d in blk.xdiscover():
...     print(d)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'broadlink' has no attribute 'xdiscover'
>>> print(blk.hello("192.168.1.60"))  # Device IP address

If the above is not caused by my enviroment happy to help more. If it's my setup might need someone else to jump in and test.

I meant the terminal of your desktop.

Ok that was a pain, needed to install Ubuntu, then play with multiple errors. But in the end I got this!

Thank you! It means xdiscover() is working fine for you, at least in the environment you tested. It is just a matter of time now.

Are you using any custom component?

if we are talking about custom for broadlink then no.

If you are using Floureon you need to update the manifest.

I don't know about your environment conditions. If it is a devcontainer, try adding --net=host to runArgs in devcontainer.json. So it will look like this:

  "runArgs": ["-e", "GIT_EDITOR=code --wait", "--net=host"],

This should not be necessary for direct discovery, but it won't hurt if you try. More: https://www.home-assistant.io/docs/installation/docker/

I'm in a portainer environment, using stacks with docker-compose yaml. I'm using macvlan instead of --net=host
If I put a ping to rmmini its working from the docker... so the communication between my HA (docker) and rm mini is ok.

python3 -m venv venv
source venv/bin/activate
pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
python3
import broadlink as blk
for d in blk.xdiscover():
    print(d)

print(blk.hello("192.168.0.17"))  # Device IP address

This is my output:

(venv) ubuntu@pubuntu:~$ python3
Python 3.8.2 (default, Jul 16 2020, 14:00:26) 
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import broadlink as blk
>>> for d in blk.xdiscover():
...     print(d)
... 
<rm: Broadlink RM mini 3 (0x2737) at 192.168.0.169:80 | 78:0f:77:ec:1b:06 | 鏅鸿兘閬ユ帶 | Unlocked>
<rm: Broadlink RM mini 3 (0x2737) at 192.168.0.168:80 | 78:0f:77:d6:3a:fc | 鏅鸿兘閬ユ帶 | Unlocked>
>>> print(blk.hello("192.168.0.168"))  # Device IP address
<rm: Broadlink RM mini 3 (0x2737) at 192.168.0.168:80 | 78:0f:77:d6:3a:fc | 鏅鸿兘閬ユ帶 | Unlocked>
>>> 

This will fix. Thank you!

My RM pro PLUS is

[('192.168.11.12', '0x27c3')]

Like above, thank you,

image

If you are using Floureon you need to update the manifest.

yes, found this myself already. got broadlink added now, its even learning and storing codes but its not passing codes to tv. help?

Will i be out of luck if mine says "Locked"

This will fix. Thank you!

Thank you so much for your time.
I'm willing to try it.

@kevindgoff You will be able to unlock your device using the config flow in Home Assistant.

@felipediel Hello i still have problem connecting 0x649b to homeassistant
when i use this

python3 -m venv venv
source venv/bin/activate
pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
python3
import broadlink as blk
for d in blk.xdiscover():
    print(d)

print(blk.hello("192.168.0.17"))  # Device IP address

i get following error

(venv) spiroc@hasbun:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import broadlink as blk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/spiroc/venv/lib/python3.6/site-packages/broadlink/__init__.py", line 153, in <module>
    ) -> Generator[device, None, None]:
NameError: name 'Generator' is not defined

but if i just install broadling

python3 -m venv venv
source venv/bin/activate
pip3 install broadlink

```python
(venv) spiroc@hasbun:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import broadlink as blk
devs = blk.discover(timeout=5)
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])
[('192.168.10.101', '0x649b', False)]
devs = blk.discover(discover_ip_address="192.168.10.101", timeout=5)
print([(d.host[0], hex(d.devtype), d.is_locked) for d in devs])
[('192.168.10.101', '0x649b', False)]

and if i try xdiscover()
```python
(venv) spiroc@hasbun:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import broadlink as blk
>>> for d in blk.xdiscover():
...     print(d)
...
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: module 'broadlink' has no attribute 'xdiscover'
>>>

That branch is outdated. It has a bug. Take git+https://github.com/felipediel/python-broadlink.git@code-quality instead.
Edit: I fixed that branch in case you wanna take it.

The new one is working but still wen i try to add to homeassistant i get error

(venv) spiroc@hasbun:~$ python3
Python 3.6.9 (default, Jul 17 2020, 12:50:27)
[GCC 8.4.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import broadlink as blk
>>> for d in blk.xdiscover():
...     print(d)
...
<rm4: Broadlink RM4 pro (0x649b) at 192.168.10.101:80 | 24:df:a7:f1:16:98 | 鏅鸿兘閬ユ帶 | Unlocked>

^CTraceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/spiroc/venv/lib/python3.6/site-packages/broadlink/__init__.py", line 160, in xdiscover
    for resp in responses:
  File "/home/spiroc/venv/lib/python3.6/site-packages/broadlink/device.py", line 81, in scan
    response, host = conn.recvfrom(1024)
KeyboardInterrupt
>>> print(blk.hello("192.168.10.101"))
<rm4: Broadlink RM4 pro (0x649b) at 192.168.10.101:80 | 24:df:a7:f1:16:98 | 鏅鸿兘閬ユ帶 | Unlocked>
Logger: homeassistant.components.broadlink
Source: components/broadlink/config_flow.py:46
Integration: Broadlink (documentation, issues)
First occurred: 13:02:06 (2 occurrences)
Last logged: 14:50:15

Unsupported device: 0x649b. If it worked before, please open an issue at https://github.com/home-assistant/core/issues

This means that you have not updated the library correctly. It may be necessary to use --upgrade, since you want to update over the current version. If you use this option, make sure to pip3 install cryptography==2.9.2 later, as it will also be updated.

Do i need to update library in home assistant ?

Yes. If you don't know how to do it, please don't fry your brains. The release is coming soon.

Getting "Device not supported" currently with RM4 Mini (w/ Temp and Humidity Sensors). Was working before. Device code is 0x648d. Wasn't sure if this was already fixed, but figured I'd mention it.

EDIT: Updating the library worked, so this device code has already been added. When will it be included in release?

any plan to integrate Broadlink TC2 light in the integration? they do not appear in HA

@lilamad You may want to have a look on this.

Hello @felipediel, version 0.115.3 have added Broadlink RM Pro+ 0x27c3 ? When i using Integration, it's said unsupported device

You are waiting for this.

This will fix. Thank you!

I've upgraded to 115.3 and still "Can't connect" on GUI and in console:
2020-09-26 08:31:48 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to the device at 192.168.0.168: Device not found

python3 -m venv venv
source venv/bin/activate
pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
python3
import broadlink as blk
for d in blk.xdiscover():
    print(d)

print(blk.hello("192.168.0.17"))  # Device IP address

this is my output now... in case you need it:

bash-5.0# python3 -m venv venv
bash-5.0# source venv/bin/activate
(venv) bash-5.0# pip3 install git+https://github.com/felipediel/python-broadlink.git@the-generator
Collecting git+https://github.com/felipediel/python-broadlink.git@the-generator
  Cloning https://github.com/felipediel/python-broadlink.git (to revision the-generator) to /tmp/pip-req-build-98vusvg2
  Running command git clone -q https://github.com/felipediel/python-broadlink.git /tmp/pip-req-build-98vusvg2
  Running command git checkout -b the-generator --track origin/the-generator
  Branch 'the-generator' set up to track remote branch 'the-generator' from 'origin'.
  Switched to a new branch 'the-generator'
Collecting cryptography>=2.1.1
  Using cached cryptography-3.1.1.tar.gz (534 kB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /config/venv/bin/python3 /config/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-miotjjdj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"''
       cwd: None
  Complete output (68 lines):
  Collecting setuptools>=40.6.0
    Using cached setuptools-50.3.0-py3-none-any.whl (785 kB)
  Collecting wheel
    Using cached wheel-0.35.1-py2.py3-none-any.whl (33 kB)
  Collecting cffi!=1.11.3,>=1.8
    Using cached cffi-1.14.3.tar.gz (470 kB)
  Collecting pycparser
    Using cached pycparser-2.20-py2.py3-none-any.whl (112 kB)
  Using legacy setup.py install for cffi, since package 'wheel' is not installed.
  Installing collected packages: setuptools, wheel, pycparser, cffi
      Running setup.py install for cffi: started
      Running setup.py install for cffi: finished with status 'error'
      ERROR: Command errored out with exit status 1:
       command: /config/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0ru3365g/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0ru3365g/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-f7s_dom_/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-miotjjdj/overlay --compile --install-headers /config/venv/include/site/python3.8/cffi
           cwd: /tmp/pip-install-0ru3365g/cffi/
      Complete output (48 lines):
      unable to execute 'gcc': No such file or directory
      unable to execute 'gcc': No such file or directory

          No working compiler found, or bogus compiler options passed to
          the compiler from Python's standard "distutils" module.  See
          the error messages above.  Likely, the problem is not related
          to CFFI but generic to the setup.py of any Python package that
          tries to compile C code.  (Hints: on OS/X 10.8, for errors about
          -mno-fused-madd see http://stackoverflow.com/questions/22313407/
          Otherwise, see https://wiki.python.org/moin/CompLangPython or
          the IRC channel #python on irc.freenode.net.)

          Trying to continue anyway.  If you are trying to install CFFI from
          a build done in a different context, you can ignore this warning.

      running install
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-3.8
      creating build/lib.linux-x86_64-3.8/cffi
      copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
      copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
      running build_ext
      building '_cffi_backend' extension
      creating build/temp.linux-x86_64-3.8
      creating build/temp.linux-x86_64-3.8/c
      gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fno-semantic-interposition -fno-builtin-malloc -fno-builtin-calloc -fno-builtin-realloc -fno-builtin-free -ljemalloc -DTHREAD_STACK_SIZE=0x100000 -fPIC -I/usr/include/ffi -I/usr/include/libffi -I/config/venv/include -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
      unable to execute 'gcc': No such file or directory
      error: command 'gcc' failed with exit status 1
      ----------------------------------------
  ERROR: Command errored out with exit status 1: /config/venv/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0ru3365g/cffi/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0ru3365g/cffi/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-f7s_dom_/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-miotjjdj/overlay --compile --install-headers /config/venv/include/site/python3.8/cffi Check the logs for full command output.
  WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.
  You should consider upgrading via the '/config/venv/bin/python3 -m pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /config/venv/bin/python3 /config/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-miotjjdj/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.8,!=1.11.3; platform_python_implementation != '"'"'PyPy'"'"'' Check the logs for full command output.
WARNING: You are using pip version 20.1.1; however, version 20.2.3 is available.
You should consider upgrading via the '/config/venv/bin/python3 -m pip install --upgrade pip' command.

Those lines were for the computer terminal, not Home Assistant. They have already been tested and they work. Now we just have to wait for this.

Those lines were for the computer terminal, not Home Assistant. They have already been tested and they work. Now we just have to wait for this.

Ok Thank You! I'll wait.

Those lines were for the computer terminal, not Home Assistant. They have already been tested and they work. Now we just have to wait for this.

Hi.
this solved the error with rm3mini?
this will be published in the next update of HA?
thaks

Why is it not part of 0.115.4 @felipediel ?
Do we need to wait to 0.116?

(Setting my expectations 馃榿)

I have returned to 114. For me it is vital that the rm3mini work. I can't be without air conditioning.
I have high expectations about the update 馃槵馃槵.
Thanks for you work馃憤馃徎

115.4 stil doesnt work for me, as no Broadlink devices are discovered:

2020-09-28 19:28:54 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to the device at 192.168.3.92: Device not found
2020-09-28 19:29:11 ERROR (MainThread) [homeassistant.components.broadlink] Failed to connect to the device at 192.168.3.61: Device not found

Looks like 0.115.4 was full of cherry picked commits. A newer commit on dev made it in, but not the broadlink commits. How does HA do releases? What get's cherry picked vs what doesn't?

Hi, I wish there were more information regarding the common issued with the mini 3 and mini 4 integrated with Home Assistant. I have not been able to move forward with the integration since I am NOT sure what I will do if I enable everything I was asked during the integration?
The main issue I have is - would it continue working on broadlink APP as well as with Home Assistant? That refferes to RM Mini3 and RM Mini4 - I have to make sure that it will work on bot APP and HA since removing it from my network will be only if I can put it back with Broadlink App and also with HA.
I have searched the internet so many times and I could not find a confirmation to what it will do after integration - regarding the RM Mini4 and that is needed to be answered so if we will take that rout we should know what to expect?
Also, Regarding the rm mini 3 - I was not sure if it will work or not since I have read several issues with different versions of rm mini 3.
Would be happy if someone, will let us newbies know what will happened after integration? that is not simple to understand.
Thanks for the great work!

@aryehassbian might be best to ask on the forums - https://community.home-assistant.io/

Every message here notifies at least 37 other people. 馃樄

If this is open, does it mean it's not in today's 0.116?

Who knows:

https://github.com/home-assistant/core/pull/39228#issuecomment-700365209

But doesn't seems it will be fixed in 0.115, which is IMHO wrong, as this is clearly regression.

@alb147 Thank you. RM mini 3 (0x5f36) is already working, if that was your problem you can safely update.

@aryehassbian You can have both. Follow this thread and use Discord for support.

@Amir974 I added your device type the same day and linked the PR so that you could follow the progress. You should stick with the latest stable until you see this in the release notes.

@litinoveweedle Your problem will be solved with the same update.

All problems mentioned here were addressed in record time. They no longer exist in the dev branch. Sometimes it takes a while to get the code into production, especially when we are also dealing with library updates. No one is to blame, this is normal. New code needs treatment. There is a whole process involving tests, reviews and devops.

Home Assistant has more than 1600 integrations. Not an easy task to keep all these things up to date with a small team. So please, don't push these guys. They are doing a great job. You just need to report the issue and wait politely. This is the easiest task and anything different is counterproductive.

Edit: I think I need to add something here. This is an open-source project. Everyone is invited to contribute by sending code, reviews, tests, documentation or whatever they think they can do to improve this integration and Home Assistant. Opening issues is also much appreciated as it helps us to identify problems that we were unable to reproduce before merging the code. What I meant is that sometimes we need to have a little patience after opening the issue.

All problems mentioned here were addressed in record time. They no longer exist on the dev branch. Sometimes it takes a while to get the code into production, especially when we are also dealing with library updates. No one is to blame, this is normal. New code needs treatment. There is a whole process involving tests, reviews and devops.

Home Assistant has more than 1600 integrations. Not an easy task to keep all these things up to date with a small team. So please, don't push these guys. They are doing a great job. You just need to report the issue and wait politely. This is the easiest task and anything different is counterproductive.

Thank @felipediel for your reply, im still waiting, i know so hard for your dev team, we don't push these guys, Thank for your Broadlink Integration, still waiting ^_^

Hi, my rm2 pro plus, 0x279d is now not detected after upgrade. Can I know when will it be supported?

Thanks

EDIT: Nvm, I have to manually add rm2plus device under Integrations. It worked.

All problems mentioned here were addressed in record time. They no longer exist on the dev branch. Sometimes it takes a while to get the code into production, especially when we are also dealing with library updates. No one is to blame, this is normal. New code needs treatment. There is a whole process involving tests, reviews and devops.

Home Assistant has more than 1600 integrations. Not an easy task to keep all these things up to date with a small team. So please, don't push these guys. They are doing a great job. You just need to report the issue and wait politely. This is the easiest task and anything different is counterproductive.

Hello, thank you for update. I can imagine dimension of the work you are doing and I would like to thank you for that. :1st_place_medal:

On the other hand if HA would like to get from enthusiast world into consumer one, in my humble opinion such regression issues has to be dealt as patch releases a bit more swiftly. BFU will not understand when his automated home stopped suddenly working, that he should wait a month for new release or install beta. Honestly even I am not brave to install beta HA in my home. :-) I know this is really off-topic discussion, but please understand, that your work has really impact to other people living now. Thank you. ;-)

I am afraid the production level cannot be achieved on a builder like broadlink. Therefore, you need to be able to roll back. I think it is worth making it possible to roll back to the old version in the HA admin panel. And at home you can have two instances of HA, primary and backup. You can also save configs in git, and put release tags on them

Totally agree. It would be nice to have a drop-down menu on the UI to switch between versions, or at least a panic button to roll back to the latest stable. Such feature requests have to be made in the community. From time to time developers look for suggestions there. For now, you can use this. You may also find this video useful.

I am afraid the production level cannot be achieved on a builder like broadlink. Therefore, you need to be able to roll back. I think it is worth making it possible to roll back to the old version in the HA admin panel. And at home you can have two instances of HA, primary and backup. You can also save configs in git, and put release tags on them

This would be so great feature to have. If done together with config held in local git repo and tagged automatically for HA releases even config downgrade could be automated!

For now, you can use this. You may also find this video useful.

Yep, downgrade was solution, but for my installation I used different approach - if someone running supervised (i.e. Docker install), then probably easiest way is to install SSH add-on and then use it to execute:

# ha core update --version=0.114.4

Let's wait for 0.116. Thank you for help.

Rollback to previos version for "venv" instalation method:
su - homeassistant
cd /opt/homeassistant
source bin/activate
python3 -m pip install --upgrade homeassistant==0.114.4

@felipediel I upgraded HA to 0.116.0b2, now broadlink works with VPN, everything works, but broadlink S2C host doesn't work. It works only on custom components, and never was supposed by HA. But I saw that there is support for it in the broadlink library. And I even post about it bug in HA forum year ago. Maybe you should fix it too? Log-> Unsupported device: 0x2722.

Just updated HA to 116, now I can integrate my two RMMini, and after changing configuration on Smart_ir everything is working again. Thank you @felipediel and all the people that makes HA a reality.

Can also advise after upgrading HA to .116 my Rm4 脳0649b and sensorsensors work! Thanks again @felipediel and all involved in the update. Amazing work!!! 馃帀馃帀馃帀

my seven rm3mini also come back after 116,
Thank @felipediel and all involved in the update very very much.
You are the man.

looks also ok to me, thanks a lot !

I did upgraded to 116.2 just now and it is still failing (please note that my Broadlink devices are in dedicated / secondary network connected to HA, therefore my original issue was with wrong source IP being used for detection/communication with them):

  • my existing remotes defined in configuration.yaml are not imported (contrary to this description).

  • my existing configuration defined Broadlink devices each triggers error like this:
    2020-10-10 12:24:41 ERROR (MainThread) [homeassistant.config] Platform error: remote Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config.py", line 814, in async_process_component_config platform = p_integration.get_platform(domain) File "/usr/src/homeassistant/homeassistant/loader.py", line 401, in get_platform cache[full_name] = importlib.import_module( File "/usr/local/lib/python3.8/importlib/__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 961, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "<frozen importlib._bootstrap>", line 1014, in _gcd_import File "<frozen importlib._bootstrap>", line 991, in _find_and_load File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked File "<frozen importlib._bootstrap>", line 671, in _load_unlocked File "<frozen importlib._bootstrap_external>", line 783, in exec_module File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed File "/usr/src/homeassistant/homeassistant/components/broadlink/__init__.py", line 6, in <module> from .device import BroadlinkDevice File "/usr/src/homeassistant/homeassistant/components/broadlink/device.py", line 7, in <module> from broadlink.exceptions import ( ImportError: cannot import name 'NetworkTimeoutError' from 'broadlink.exceptions' (/usr/local/lib/python3.8/site-packages/broadlink/exceptions.py)

  • when I try to add Broadlink integration nothing will happen (in the past in 115 ad least I get pop-up window do add new device), now when I click to Broadlink integration I got for second window with: "Please wait while the integration is being installed", then this window closes but nothing being add as Broadlink integration.

So for me things are not solved and I need to rollback again to 114.4 :-o

Are you using custom components? If you have Floureon, you need to update the manifest.

Hello,
yes I am using Floureon thermostat integration from this repo, but I also have three Broadlink remotes. From 0.115.0 none of these work. I was thinking Floureon issue is related, but I would not believe this could stop Broadlink remotes to work as well. I actually opened this issue regarding Floureon problem.

When you say I need to update manifest, you probably mean to bump broadlink library to current version?

{
  "domain": "floureon",
  "name": "Floureon Thermostat",
  "documentation": "https://github.com/algirdasc/hass-floureon",
  "dependencies": [],
  "codeowners": ["@algirdasc"],
  "issue_tracker": "https://github.com/algirdasc/hass-floureon/issues",
  "requirements": ["pythoncrc", "broadlink==0.14.1"]
}

Is it current 0.15.0?
"requirements": ["pythoncrc", "broadlink==0.15.0"]

I did updated custom component manifest integration and upgraded again to 0.116.2. I can now confirm Broadlink RM on dedicated secondary network being detected automatically (2 from 3) and the one missing I was able to add manually using webUI.

@felipediel Thank you very much for you help! And to all for work on this project. :-)

Hi,

I have an RM Pro --> [('10.64.16.12', '0x272a')]

My Broadlink hub gets detected, I see two entities created - "Broadlink Temperature" and "Broadlink Remote".

The temperature sensor reports a reasonable figure - 21C.

However I have Broadlink switches defined in my configuration.yaml, and these entities do not appear. I can't find any error reported anywhere.

switch:
  - platform: broadlink
    mac: '5C:CF:7F:98:41:19'
    switches:
      - name: Sunroom light
        command_on: 6RRGAN8JCRYJFgkWFgkJFhYJFgkWCRYJFgkJFhYJCRYJFhYJFgkJFhYJFgkWCQkWCRYWCQkWFgkJFgkWCRYJFgkWCRYJFgkAAUg=
        command_off: 6RRGAN8JCRYJFgkWCRYWCQkWCRYJFhYJCRYWCRYJCRYWCQkWFgkJFgkWFgkWCQkWFgkWCQkWFgkJFgkWFgkJFhYJCRYJFgkAAUg=
      - name: Front door light
        command_on: 6RRGAN8JFgkWCRYJCRYWCRYJCRYJFhYJCRYJFhYJCRYJFhYJFgkWCRYJFgkJFgkWCRYJFgkWFgkWCRYJCRYJFgkWCRYJFgkAAUg=
        command_off: 6RRGAN8JCRYJFgkWCRYJFgkWFgkJFhYJCRYJFhYJCRYJFgkWCRYWCQkWCRYJFgkWCRYWCQkWCRYWCQkWFgkJFgkWCRYWCQkAAUg=
      - (etc)

@elbow Check the MAC address.

Hi,

I have an RM Pro --> [('10.64.16.12', '0x272a')]

My Broadlink hub gets detected, I see two entities created - "Broadlink Temperature" and "Broadlink Remote".

The temperature sensor reports a reasonable figure - 21C.

However I have Broadlink switches defined in my configuration.yaml, and these entities do not appear. I can't find any error reported anywhere.

switch:
  - platform: broadlink
    mac: '5C:CF:7F:98:41:19'
    switches:
      - name: Sunroom light
        command_on: 6RRGAN8JCRYJFgkWFgkJFhYJFgkWCRYJFgkJFhYJCRYJFhYJFgkJFhYJFgkWCQkWCRYWCQkWFgkJFgkWCRYJFgkWCRYJFgkAAUg=
        command_off: 6RRGAN8JCRYJFgkWCRYWCQkWCRYJFhYJCRYWCRYJCRYWCQkWFgkJFgkWFgkWCQkWFgkWCQkWFgkJFgkWFgkJFhYJCRYJFgkAAUg=
      - name: Front door light
        command_on: 6RRGAN8JFgkWCRYJCRYWCRYJCRYJFhYJCRYJFhYJCRYJFhYJFgkWCRYJFgkJFgkWCRYJFgkWFgkWCRYJCRYJFgkWCRYJFgkAAUg=
        command_off: 6RRGAN8JCRYJFgkWCRYJFgkWFgkJFhYJCRYJFhYJCRYJFgkWCRYWCQkWCRYJFgkWCRYWCQkWCRYWCQkWFgkJFgkWCRYWCQkAAUg=
      - (etc)

I have the same problem after update !

Logger: homeassistant.helpers.service
Source: helpers/service.py:435
First occurred: 21:34:48 (2 occurrences)
Last logged: 21:45:46
Unable to find referenced entities switch.tv_sony

RM4 Pro ('192.168.1.69', '0x653c')

Thank you! This device will be supported after https://github.com/mjg59/python-broadlink/pull/472.

Please support device: 0x2722 ; broadlink S2C kit

Please support: RM4C mini [('192.168.0.80', '0x6539')]

I'm sorry but I don't understand the update process on github and how that works into Home Assistant, or how the changes by mjg feed in. I just updated to HA 0.118 and I can report the RM4 mini devices I was concerned about now install.

We added your type to the library, launched a new version and updated the manifest in Home Assistant to install it.

Thank you! It is open: mjg59/python-broadlink#476.

@felipediel who should approve it?

Garrett is going to approve it soon. The updates come in batches, so we have to wait a bit for a release. Waiting won't be necessary after https://github.com/home-assistant/core/pull/41744, but its not ready yet.

Hi, @nick2525, just to give you a feedback. The Broadlink integration does not yet support the alarm kit. These devices communicate via RF and have a slightly different implementation. They are already supported in the library, but the class needs some improvements before we can bring it to Home Assistant.

For now you can use this custom component. It is no longer maintained and I don't have the devices to test, but I think it works. We cannot just copy and paste it into hass due to protocol-level information like this, which should be part of the library.

I hope we can offer support for this kit in the future, but I can't promise for this year.

@felipediel Yes, I use broadlink_s1c custom component, but it often disconnected. So I have to fork it and write some crutches, although I'm a Kotlin developer, not a Python, while it seems to work. I am afraid that the HA will be updated and this library will be laggy agin

@felipediel Can you please add 0x271d. It is an sp2

@paynenz Thank you! I created a PR. Is the brand correct? (Broadlink)

@paynenz Thank you! I created a PR. Is the brand correct? (Broadlink)

It's an Efergy Ego smart plug. I have been using the older broadlink switch configuration with type sp2 on 0.114.4. Sorry I don't know more about the smart plug internals.
Thanks heaps!

This?

This?

That's the one, I have the New Zealand outlet model but I doubt that it would matter

Thank you!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

moskovskiy82 picture moskovskiy82  路  3Comments

missedtheapex picture missedtheapex  路  3Comments

i-am-shodan picture i-am-shodan  路  3Comments

Elmardus picture Elmardus  路  3Comments

sogeniusio picture sogeniusio  路  3Comments