Thanks for your query.
I've created 2 bash scripts using the Hive v6 API:
1. hive2domo.sh - this gets the current and target heating temperatures from Hive, and sends these to dummy temperature devices in Domoticz; it also sends the current temperature as the setpoint to a dummy thermostat device. In addition, it sends the heating status (On / Off) to a dummy switch, by reading stateHeatingRelay in the API, so that I can see at a glance when the boiler is actually switched on for heating (I also graph all these variables using emoncms - see below).
To use this, you'll need to set up the following devices in Domoticz:
- dummy temperature device for current temperature
- dummy temperature device for target temperature
- dummy thermostat
- dummy switch for heating status
and find their idX values in the Settings > Devices tab of domoticz, and substitute their values for the <angle brackets> in the sketch below (e.g., replace <CURR TEMP> with 50). You'll also need to insert your Hive URL and password, again substituting the <angle brackets>.
I run this script every 5 minutes via crontab.
- Spoiler: show
Emoncms graph example:
2. hive_boost.sh - this is a stand-alone script, which initiates a heating boost for a predetermined temperature (default: 22°C) and time (30 minutes) - these 2 parameters are held as user variables in Domoticz, and so can be changed there. To use, set up 2 user variables with the values you want in the Settings > User variables tab in Domoticz, and note their idX's, then replace <BOOST TEMP> and <BOOST TIME> in the script below.
To run, type ./hive_boost.sh from the directory where the script is stored (or you could store the script in one of the folders in your PATH, e.g., /usr/local/bin).
- Spoiler: show
I'm sure there are better ways of writing these scripts, but they work for me! Good luck!