mjg59 / python-broadlink

Python module for controlling Broadlink RM2/3 (Pro) remote controls, A1 sensor platforms and SP2/3 smartplugs
MIT License
1.38k stars 479 forks source link

Can Broad Link RM4 Mini (for example) Query device for power state? #699

Closed Jibun-no-Kage closed 2 years ago

Jibun-no-Kage commented 2 years ago

Can Broad Link RM4 Mini (for example) Query device for power state? For example with CEC, you can ask the device for its power state, on or off/standby. But I have not seen any examples of doing the same via Broad Link devices? Is such possible?

felipediel commented 2 years ago

Not possible. If you have a Raspberry Pi, you can install Home Assistant and combine the HDMI-CEC integration with the Broadlink integration to achieve the result you want.

Jibun-no-Kage commented 2 years ago

Humm... right now I am just using a simple ping to determine if the RM4 is on the network. That works but is limited.

felipediel commented 2 years ago

Ah, I understand now. I though you wanted to query the power state of the TV. A ping is ok to check the device, you could also use check_temperature() or any method that queries the state.