Hi everybody!
I am trying to get a ground source heat pump integrated into my system. I got this brand new prototype heat pump for free, but with no functioning controller board. Small model, just 8 kW max output. I intend to reuse the pre-installed pressure and temperature sensors and relays to get it up and running.
There is an open-source heat pump controller here: https://github.com/openhp
I flashed the code to an Arduino Uno and will interface it through USB. From Visual Studio I was able to read the serial interface, that is, printout of status and sensors readings. So it seems to work. I won't use the described hardware and display from github, just the serial interface.
From Domoticz I need, as a minimum, to set a target temperature and a target differential temperature, and read back all sensors.
I find that when I connect the Arduino to my RaspberryPi 3B+ (Domoticz), the Arduino (or AliExpress lookalike) appears on ttyUSB0 ("lsusb" lists it as Bus 001 Device 008). So we are connected. And the rpi and heat pump will be located near each other.
From there, I am quite helpless. I believe I may need:
- a serial/USB gateway?
- a Python script (or dzvents, LUA) (example python code on the github link)
- virtual sensors/switches
For information, I do have a 350 meter hole in the ground and brine loop ready. I also have an old, but functioning air to water heat pump which can run in parallel in my heating system. In a year or two, I will replace the old heat pump with a bigger ground source heat pump, but keep the small one in parallel.
Norway is freezing cold right now, and I would appreciate your help to get this controller up and running.
Heat pump controller on Arduino via USB
Moderator: leecollings
- waltervl
- Posts: 5859
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Heat pump controller on Arduino via USB
If you install a MQTT broker on your Domoticz server (if not already installed) and add Mqtt messaging to your Arduino code you can communicate with Domoticz without coding within Domoticz.
See for example viewtopic.php?t=38155
For MQTT (no need for Mqtt Autodiscover) within Domoticz check wiki https://www.domoticz.com/wiki/MQTT
See for example viewtopic.php?t=38155
For MQTT (no need for Mqtt Autodiscover) within Domoticz check wiki https://www.domoticz.com/wiki/MQTT
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 8
- Joined: Thursday 21 October 2021 15:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Heat pump controller on Arduino via USB
Thank you for the reply!
I have Mosquitto MQTT on the rpi, and use it for most actuators and sensors in the house.
Is this also a viable solution over the usb port?
I have Mosquitto MQTT on the rpi, and use it for most actuators and sensors in the house.
Is this also a viable solution over the usb port?
- waltervl
- Posts: 5859
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Heat pump controller on Arduino via USB
Yes, indeed USB seems to be an issue. Pehaps this would be a solution? https://www.metacodes.pro/funcodes/blog ... _and_mqtt/
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 8
- Joined: Thursday 21 October 2021 15:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Heat pump controller on Arduino via USB
Thanks!
Could be possible, but seems more complicated than I was hoping for. Maybe I have two other options:
- install an ethernet or wifi shield on the Arduino Uno and try connecting to the MQTT broker with your first tip
- translate code to an ESP32 and use that built-in wifi to connect to MQTT
- write some code in Domoticz and use serial communication (RX/TX or USB)
What do you think?
Could be possible, but seems more complicated than I was hoping for. Maybe I have two other options:
- install an ethernet or wifi shield on the Arduino Uno and try connecting to the MQTT broker with your first tip
- translate code to an ESP32 and use that built-in wifi to connect to MQTT
- write some code in Domoticz and use serial communication (RX/TX or USB)
What do you think?
- waltervl
- Posts: 5859
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Heat pump controller on Arduino via USB
I think the Ethernet/wifi shield or use an esp32 would be indeed the best option.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 8
- Joined: Thursday 21 October 2021 15:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Heat pump controller on Arduino via USB
Thanks.
There are also two other options with ESP32:
ESPEasy: Rules can do some operations, however with very limited number of characters for code. Easy integration with Domoticz on MQTT.
Tasmota: Scripting with Berry is powerful and could do the control job. Also easy integration with Domoticz on MQTT.
There are also two other options with ESP32:
ESPEasy: Rules can do some operations, however with very limited number of characters for code. Easy integration with Domoticz on MQTT.
Tasmota: Scripting with Berry is powerful and could do the control job. Also easy integration with Domoticz on MQTT.
- waltervl
- Posts: 5859
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2024.7
- Location: NL
- Contact:
Re: Heat pump controller on Arduino via USB
I have no knowledge about that.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
- Posts: 8
- Joined: Thursday 21 October 2021 15:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Heat pump controller on Arduino via USB
The ESP32 has a lousy reputation for its ADC, and I will need it.
I know believe a faster track is to acquire an ethernet shield for the Arduino Uno, use the original code for the heat pump controller and integrate the ethernet code to reach the MQTT broker.
I know believe a faster track is to acquire an ethernet shield for the Arduino Uno, use the original code for the heat pump controller and integrate the ethernet code to reach the MQTT broker.
Who is online
Users browsing this forum: No registered users and 1 guest