Besides wood for use in my wood gasifier (an Attack SLX 40 Lambda Touch) and masonry fireplace (a NunnaUuni Hestia Solo PL) , I also run a heat pump for Spring and Autumn when I still have enough sun but need heating.
The heat pump is a monoblock air to water unit, specifically a PowerWorld PW030-DKZLRS-B/S. It’s an 8kW (smallest) version, which can run on my 3kVA Multiplus II inverter. It’s R32, but R290 versions are also available right now. These can reach higher temperatures, but I didn’t need that and the R32 version was cheaper.
The device is Tuya compatible, and I interface with it using TinyTuya. In its simplest form, you can do something like this:
import tinytuya
d = tinytuya.Device('Device ID', 'Local LAN IP Address', 'Local Key', version=3.3)
data = d.status()
print('Device status: %r' % data)
# Turn On
d.turn_on()
# Turn Off
d.turn_off()
The Device ID is available in the App (or in the Devices tab once you complete the next step). Getting the Local Key is a bit of a pain. You first have to create a Tuya account at http://platform.tuya.com/ and create a cloud application. You also need the Tuya app (or Smart Life app) with the heat pump linked to it, which you can then link with the project (devices tab –> link app account). Then you can go to ‘Cloud -> API explorer’ and under ‘Device Management’ find ‘Query Device Details’, and fill in the Device ID and click the ‘submit request’ button. You should then see a bunch of info, including the local_key field which contains the key.
You can do more than just turn the device on and off though code. You can control all settings and read all variables. For example the following line changed the work mode to heating:
payload = d.generate_payload(tinytuya.CONTROL, {'5': 'heat'})
d._send_receive(payload)
Here, the number ‘5’ is the dp_id of the setting. You can find out about those, what they do and what arguments they take through the API explorer on the Tuya site under API explorer -> Device Control -> Query Properties and API Explorer -> Device Control (Standard Instruction Set) -> Get the instruction set of the device.