Broadlink Network Discovery - where is the Broadlink library located

Hi,

Please help I’m new to HASS & python.

I’m having trouble finding were the Broadlink library is located.

I’m trying to use the broadlink network discovery fn. I created a PHP broadlink API & know its possible to get a list of all broadlink devices & their model# / device name.

I’m wish to create a discovery function which as 1st phase lists all Broadlink devices on the network & then hopefully create an auto setup for Broadlink devices.

PS: I’ve searched the community but no refs to NW discovery found.

2 Likes

I also (unfortunately) have a bunch of broadlink switches. I have found several android applications which can discover the devices, so it is doable. The best of these seems to be the Tasker plugin titled “RM Plugin lite” (or the non-lite paid version… ) the best thing about it is it has a HTTP bridge which that lets you query discovered devices and control them! The current method of having to hard code an IP and MAC address and populate friendly names etc manually is really a bit of a poor mans solution…

The component uses this library. From memory discovery is supported in the library.

That is only for the RM Pro and A1 sensor. Hmm… And SP2, SP3 and MP1… I hadnt see those listed, but shame as I have SPmini (SP1) devices too.

The relevant documentation for Broadlink is https://home-assistant.io/components/switch.broadlink/ where MP1 and SP1 through SP4 is documented as requiring both hardcoded IP addresses and MAC addresses. Just having to set a DHCP reservation for all the various devices is a no go…

The github notes may say that but it does do those other devices when you look at the code and it is what homeassistant is using

So on hass.io, how do we get it to discover the broadlink devices? (I’m new to hassio)

That would involve either rewriting the component or adding broadlink into the discovery component.

Sounds like a plan! Haha…

so basically I’m stuck with reserving the IP address in DHCP for each of the switches… and then hard coding the IPs into the configuration.yaml file for hass.io… ?

Yes. Although many components rely on a fixed IP so the broadlink component isn’t alone in this.

Any particular reason you are opposed to fixing the ip address?

As a long time sys admin, hard coding an IP address is a big no no… always abstract… and when we know it’s fully discoverable, why create more work and require hard coding both on the DHCP server and in configuration files?

my router doen’t support ip reservation… so every time ip is changed i have to manually change it in config… :frowning: