eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
224 stars 61 forks source link

device_type multiple_lookup is not finding any devices #85

Open EoinTheHealy opened 4 years ago

EoinTheHealy commented 4 years ago

Hi,

I have 2 bg1 sockets. I can use a custom.conf that works for each individually.

# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'rm4', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
device_type = 'bg1' # use lookup

## lookup parameters
lookup_timeout = 20
local_address = '127.0.0.1'

## parameters for direct connection
device_host = '192.168.86.146'
device_mac  = '24:df:a7:e6:45:29'
....

and

# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'rm4', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
device_type = 'bg1' # use lookup

## lookup parameters
lookup_timeout = 20
local_address = '127.0.0.1'

## parameters for direct connection
device_host = '192.168.86.147'
device_mac  = '24:df:a7:e6:3e:9c'
...

I'm trying to combine them with

# Type of device. Valid options are 'lookup', 'multiple_lookup', 'rm', 'rm4', 'sp1', 'sp2', 'a1', 'mp1', 'dooya', 'bg1'
device_type = 'multiple_lookup' # use lookup

## lookup parameters
lookup_timeout = 20
local_address = '127.0.0.1'

## parameters for direct connection
#device_host = '192.168.86.147'
#device_mac  = '24:df:a7:e6:3e:9c'

I'm not sure what to specify for host/mac for multiple devices.

Getting response:

[2020-10-22 01:22:10,259] ERROR No Broadlink devices found

Am I missing something here?

eschava commented 4 years ago

Your local address is incorrect. It should be local IP address of your device that is connected to the WIFI network

mleiva5 commented 3 years ago

Your local address is incorrect. It should be local IP address of your device that is connected to the WIFI network

@eschava Firtsly, congratulations for probably the most useful plugin I've seen in a while, it's helping a lot with one of my RM4!

I tried several custom.confs but I'm not getting "lookup" or "multiple lookup" to work, it only works when I set device_type to 'rm4' and one static IP/mac on direct connection.

Currently I'm trying multiple devices with the following custom.conf:

` device_type = 'multiple_lookup'

lookup parameters

lookup_timeout = 5 local_address = '5.5.5.6' ## raspberry pi ip

parameters for direct connection

device_host = '5.5.5.9' ## broadlink rm4 no.1 device_mac = 'A0:43:B0:31:AC:02' device_host = '5.5.5.8' ## broadlink rm4 no.2 device_mac = 'a0:43:b0:15:8a:93' ` Could you post an example custom.conf file showing how should be the correct syntax to define two devices on direct connections specifying IP/mac? I understand I would need to specify rm4 on device type as well. If it's not supported, could you please implement that? It's going to be a life saver!

Thanks so much in advance!

eschava commented 3 years ago

for device_type = 'multiple_lookup' parameters device_host/device_mac are ignored, local_address is still strongly required for devices connected to several networks BTW, lookup_timeout = 5 looks to small. Could you set it to 30 at least for a test?

jopenhuber commented 1 year ago

Hello,

thanks for your work. I installed your code a couple of days ago. It works very good with one device (rm).

Now I tried the multiple_lookup and it failed. The „normal“ lookup doesnt work, too.

Whats the deal with the local ip? Earlier, you posted „ should be local IP address of your device that is connected to the WIFI network“. What does that exactly mean.

My devices are in a vlan seperated from my servers. Could that be a reason (special multicast…)?

greets, jopenhuber

eschava commented 1 year ago

Earlier, you posted „ should be local IP address of your device that is connected to the WIFI network“. What does that exactly mean.

I mean that you need to specify there IP address of the network interface connected to the same network as your broadlink devices