April 01, 2024

IVT, Bosch heat pump easy integration, NodeRed

If you are running the IVT Anywhere or the Bosch Easy remote app you probably also can retrieve its data with for example NodeRed. 

With the nice application Bosch XMPP you can set up an integration with the cloud service supplied by your vendor.


Prerequisites
I'm using a Raspberry Pi and since the application is using JavaScript you have to install Node.js and in my case NodeRed for displaying the data.

The XMPP protocol, in this case, uses HTTP POST and GET. After some hours of Googling I found some of the root addresses that can be scanned, GET, to find data.

/application

/dhwCircuits

/gateway

/heatingCircuits

/heatSources

/notifications

/solarCircuits

/recordings https://github.com/matsdune/node-red-contrib-bosch-heatpump-decrypt/wiki/Recordings

/system


Installation

Node.js installation is done with


curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash

sudo apt install nodejs
sudo npm install -g npm@latest

and the actual application 

sudo npm i -g bosch-xmpp

The credentials for the cloud service is made up of 3 parts

--serial=SERIAL          Device serial number (on some devices called "login name")
--access-key=ACCESS_KEY  Device access key (on some devices called "password")
--password=PASSWORD      Device password (on some devices, the user-configured                                                                                 password)

In my case the IP module in the heat pump had a label with information

Loginname:    08nnnnnnn            => --serial

Passwort:     nH3N-xxxx-xxxx-xxxx  => --access-key      


and for the IVT Anywhere app 

Personal password:    nnnnnnnn     => --password

Now you can test if you can access the cloud data using the command line interface(CLI)

bosch-xmpp --serial=08nnnnnnn --access-key=nH3N-xxxx-xxxx-xxxx --password=nnnnnnnnn ivt get /gateway/DateTime


Then use the root addresses above to learn about your device or test out the NodeRed flow below.

NodeRed
Install instructions is found here

Instead of using the CLI, above, you can set upp the application as a bridge. With command 

bosch-xmpp --serial=08nnnnnnn --access-key=nH3N-xxxx-xxxx-xxxx --password=nnnnnnnnn ivt bridge 3001

which will start up a http server at port 3001. Test it with 

curl http://localhost:3001/bridge/gateway/DateTime

import the flow and test with NodeRed and you will get data as picture above.

Remarks
Debug
If you get problem you can execute with 

env DEBUG=* bosch-xmpp .........


Retrieve root addresses
Some devices will accept ".... get /", but didn't work on our IVT pump.

Additional root adresses
The following root addresses were not found on our heat pump but found Googling. 
/devices
/energy
/events
/programs
/zones
/ecus

systemd autostart for the bridge 
If you want to autostart, at boot or at failure, setup the following service. Create a file with 

sudo nano /etc/systemd/system/IVT.service


containing 

[Unit]
Description=IVT bridge server
After=syslog.target network-online.target

[Service]
Type=simple
User=root
ExecStart=/usr/bin/bosch-xmpp --serial=08nnnnnnn --access-key=nH3N-xxxx-xxxx-xxxx --password=nnnnn ivt bridge 3001
Restart=on-failure
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target 

Activate with 

sudo systemctl daemon-reload

and 

sudo systemctl enable IVT && sudo systemctl start IVT


No comments:

Post a Comment

Feel free to leave a comment ! ... but due to a lot of spam comments I have to moderate them. Will reply ASAP !