Thank you for this link. The guys already wrote exactly what I wanted. The thermostat is now pinging to my Mosquitto.
MQTT Bridge:
//edit: pasting my installation procedure from the other forum for you to see:
You need Python2 on your device running the script. So if you’ve installed it (make sure you also have the right python setuptools) you will need to install the broadlink python API fork from github.
- Clone this repository
- Execute “sudo python2.7 setup.py install”
Then you’re ready to download the MQTT bridge:
- Download this repository
- Execute “sudo pip install paho-mqtt”
- Edit the “broadlink-thermostat.conf” to your needs
Now you can start it via “python2.7 broadlink-thermostat.py” and it should start the discovery and push all discovered devices and their state to MQTT. If you wanna control it from HASS for example you can send MQTT messages to the following topic:
/[topic]/[mac]/cmd/[command]
The command can be one of the following:
‘set_temp’ with the float value in the body
‘switch_to_auto’
‘switch_to_manual’
I also installed a systemd file so the bridge starts automatically and set the loop to around 3 seconds to let it update faster.