eschava / broadlink-mqtt

MQTT client to control BroadLink devices
MIT License
221 stars 60 forks source link

Bind to ip of interface? #116

Closed heikoh81 closed 6 months ago

heikoh81 commented 6 months ago

Hello,

I have assigned several static ips to eth0 on my raspberry. Is there an option to bind broadlink-mqtt to listen only on 1 of these adresses?

I found this in the sample mqtt.conf: _lookup parameters lookup_timeout = 20 localaddress = '127.0.0.1'` But local_adress is in the lookup parameters sections - which does not make sense to me? Will broadlink-mqtt listen to only the ip specified after local_adress = ?

Thanks for any advice, Heiko

eschava commented 6 months ago

Hi Actually broadlink-mqtt doesn't create any server sockets, it creates only client sockets for connection to broadlink devices + connection to the MQTT broker

heikoh81 commented 6 months ago

Thanks for your reply. I understand.

Is it possible to tell broadlink-mqtt to use a specific client ip to connect to the mqtt broker, if I have assigned multiple ips to eth0?

eschava commented 6 months ago

I've added mqtt_bind configuration parameter. Please check it

heikoh81 commented 6 months ago

Thank you very much for the fast implementation. I can confirm that it works and binds correctly.