Add support for Broadlink BG1 devices#36449
Add support for Broadlink BG1 devices#36449b4dpxl wants to merge 1 commit intohome-assistant:devfrom b4dpxl:broadlinkbg1
Conversation
|
@felipediel this replaces #33399, after I managed to completely bork my dev branch :| |
|
The code above works great for a single socket but have you tried with two sockets? Installing a second socket on the BG app shows as a sub device and doesn’t appear to have an IP address. It connected instantly to Alexa so there must be a way but I’m not clever enough to figure it out. |
@Goobiegoobers No, as I only have a single device. Does it not show up in your router's DHCP logs? |
|
No it’s not there, and on the app it shows the mac but says IP unavailable, looks like it talks through the “main” device somehow. |
|
After further investigation I’ve found a second device definitely does not have its on IP address, it connects through what ever device is set up first. Quite a nice idea from BG to save on router devices I think. I tried syncing one and then disconnecting it to sync the other but even with the “master” unplugged it still creates the 2nd as a “sub device”. |
Unless these are doing something really odd, it must be connecting to your wireless network? There's nothing in the |
|
It looks like they're creating a mesh network. If confirmed, things will start to get complicated. |
If so, you should be able to see the network with a wifi scanner. |
|
There must be a way to find it, as soon as it connected in the BG app I had a notification from Alexa saying device found. |
Yes. Sorry, I don't have the devices to test. |
|
@Goobiegoobers Type |
I only have one, and I don't see any evidence of a hidden network, though I've not done a thorough scan yet; I'll dig out one of my decent wireless cards at some point and have a scan. |
|
I’m running HASS.OS so don’t have a command line. Is there another way to do it? Like I said I have two here plugged in and am happy to be a guinea pig to find the solution. |
|
Ughh mine don’t work at all now haha. I’ve reset everything to as it was and I can’t even get one working on it’s own now 😞. Is it because I updated the firmware to v57053? |
It might be that you can add 2nd socket as a sub devise for the 1st one, but its definitely not the default behaviour. When I've added 2nd socket it's appeared as a 1st one exactly the same as a primary one in the app. Regarding this particular PR, I'm going to test it once figured out how to :) |
Snakesms, what firmware do you have running on your sockets? im on v57053 on ios and it does not give me a choice when adding a 2nd socket, it automatically sets it as a sub device. |
I'm thinking there is something "wrong" in the latest Firmware, as one of my sockets used to work with the old firmware and become unavailable with the new one. I've got another socket with old firmware and avoiding firmware upgrade. Going to test if it works with old firmware or broken too New one is: v57053 |
|
Keep me posted! |
I did try to update 2 files preset in this PR in my running 110.5 version of HomeAssistant. Respective config is switch section is:
Not sure if I'm missing anything and if it's possible to get some debugging info in the stable version of HomeAssistant to get more data or not |
You can change the debug level in the configuration.yaml: logger:
logs:
homeassistant.components.broadlink: debug |
|
@Snakesms that config was working for me (before last night), does it not work for your socket with the earlier firmware either? |
|
I figured out what is going on. Check this out. |
Thanks, I'll try to update and catch something useful |
Nope it doesn't. |
|
Can you ping the second socket? |
|
Yea I am able to ping to it but I think I'm having that issue that you had @Goobiegoobers with authentication failing in python. How did you fix it? I used AP mode to connect it to the network otherwise the smart setup just takes over and creates the new device as a sub. |
|
Message from Felipedel solved it for me (2 months ago) |
|
I'm in guys!! I used the broadlink.setup(ssid, password, mode) to set up my device
By using that I was able to connect my device to the network. The issue I was facing was that if:
When I finally used the python library to set it up, it was the barebones I needed it to do i.e. connect it to the network and when i ran |
|
Hi g189ffin, Regards |
|
how can I enable this functionality for my 822/HC-01 double uk socket. switch:
I am using hassio on a rpi two do I enable this custom_broadlink? |
|
Hi I am a HA noobie. I have followed eugene eschava's broadlink mqtt scheme but have only got to : " root@UbuntuDesktop:/home/mebrew/broadlink/broadlink-mqtt# python3 mqtt.py thank you |
|
@b4dpxl I think we are ready for this update. Please rebase it --onto dev branch so I can help you. How to rebase:
Ping me when you are done. |
Many thanks for the detailed instructions @felipediel - It's going to be a couple of weeks before I can look at this, but I'll get it in ASAP. |
|
I'm going to mark this as a draft since its going to be a few weeks before the author can come back to this. Please mark this ready for review once its ready for review. |
|
Does this then mean it will appear in the beta within hass io when the author carries out the requested tasks and then eventually in the non beta ? |
|
Good. I'm really waiting for it and keeping my fingers crossed to get it working! That's really great job - i think it's best quality of the socket for their price. |
Hi @felipediel. what do I Thanks |
|
You need to use HEAD~NUMBER_OF_COMMITS. Let's say your only commit is "Added support for BG1 devices". So you |
|
what am I actually looking for in git log? I've only ever used git for my personal projects, with just me working on it. After a |
|
It may be easier for you to copy the bg1 class to an updated branch and start over. |
|
how does this get resolved, I'm super keen to have this in beta and stable? |
|
still keen to understand how this gets resolved as this is a key integration in the UK |
I need time to rework it given the changes to the core module. However that’s not likely to be any time soon due to personal circumstances. If someone else wants to have a go it should be relatively straight forward. |
|
Agreed. I would like to get a fleet of these sockets as soon as the integration is alive.
… On 12 Oct 2020, at 18:43, Dave Davies ***@***.***> wrote:
still keen to understand how this gets resolved as this is a key integration in the UK
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#36449 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AORPXWK2BDOZWNKC677RGCTSKM53ZANCNFSM4NS2CJ5Q>.
|
|
Thank you for the update. I appreciate that you do this whenever you got time. I wish I had the IT skills to help.
… On 12 Oct 2020, at 18:46, b4dpxl ***@***.***> wrote:
still keen to understand how this gets resolved as this is a key integration in the UK
I need time to rework it given the changes to the core module. However that’s not likely to be any time soon due to personal circumstances. If someone else wants to have a go it should be relatively straight forward.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub <#36449 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AORPXWN3BNPS67HDE3ZFPEDSKM6GNANCNFSM4NS2CJ5Q>.
|
|
If someone wants to give me steps to get this past the post I'm happy to do so as from what I can tell its a matter of git stuff not code stuff ? |
It needed code changes. I should be in a position to push a new PR over the weekend. |
|
That is excellent news, with a colleague we tried but got as far as Implement a BroadlinkUpdateManager to handle updates. |
|
I also would love to see this integration make it. The sockets are fairly priced for the quality and it means I can remove bulky Sonoff plugs. Sadly I don't have the skill set in Python to assist. |
|
#42314 created to replace this. |
Proposed change
This adds support for the British General Broadlink BG1 switches. Replaces PR #33399
Type of change
Example entry for
configuration.yaml:Additional information
Checklist
black --fast homeassistant tests)If user exposed functionality or configuration variables are added/changed:
If the code communicates with devices, web services, or third-party tools:
Updated and included derived files by running:
python3 -m script.hassfest.requirements_all.txt.Updated by running
python3 -m script.gen_requirements_all..coveragerc.The integration reached or maintains the following Integration Quality Scale: