eschava / broadlink-mqtt

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

can you retreive status of MP1 device? #50

Closed hamwong closed 4 years ago

hamwong commented 4 years ago

as below command will let me know MP1 status, can you make MP1 like bg1 can Subscription to current state like below?

broadlink_mp1_state_interval=120

command work devices[0].check_power() {'s3': True, 's4': True, 's2': True, 's1': True}

I also found another issue, my RM pro set in another subnet, and rpi have vlan interface, I am able to connect to RM pro by broadlink_cli or broadlink_discovery. but I am not able connect it by mqtt.py, I have set local ip under same subnet but still can't work.

eschava commented 4 years ago

Please check now

I also found another issue, my RM pro set in another subnet, and rpi have vlan interface,

What value of "--ip" parameter did you use in broadlink_discovery?

hamwong commented 4 years ago

I use the vlan interface, eg: main interface:eth0 is 192.0.0.1, and valn interface:vlan2 is 192.0.1.1 I use broadlink_discovery --ip 192.0.1.1 and I able discover device RM, then use the command by discovery, I able direct command RM

anyway, thanks eschava, this is a great work, I have been long time didn't visit here, I see u put lot more new feature in.

eschava commented 4 years ago

Did you try local_address='192.0.1.1' in mqtt.conf (or custom.conf)?

hamwong commented 4 years ago

yes, I did, may be I didn't mention very clear, I not just change the local address to same subnet, I even change mqtt to same subnet, as mqtt server accept both subnet

hamwong commented 4 years ago

anyway state_interval works, thank you for your effort