I didn't want to connect an Arduino to my Resol SLT because it already has a LAN interface.
This is how I connected my Resol device to Domoticz by using vbus over lan with Node Red and MQTT.
It should work with other vbus devices as well
1) install Resol library from
https://github.com/danielwippermann/resol-vbus
npm install --save resol-vbus
2)
git clone
https://github.com/danielwippermann/resol-vbus.git
cd resol-vbus
npm install
3) install /compile json live data server
See:
https://github.com/danielwippermann/res ... ata-server
cd /resol-vbus/examples/json-live-data-server
copy config.js.example to config.js
nano config.js
Change your ip and password
<code>
/*! resol-vbus | Copyright (c) 2013-2018, Daniel Wippermann | MIT license */
'use strict';
var path = require('path');
var config = {
/**
* The port number for the HTTP server to listen to.
* @type {Number}
*/
httpPort: 3333,
/**
* The inteval in milliseconds between two writes of the logging file.
* @type {Number}
*/
loggingInterval: 10000,
/**
* The filename of the logging file.
* @type {String}
*/
loggingFilename: path.resolve(__dirname, 'live-data.json'),
/**
* The name of the `Connection` subclass to use for connecting to the VBus.
* @type {String}
*/
connectionClassName: 'TcpConnection',
connectionOptions: {
/**
* The host name / IP address of the VBus/LAN or Datalogger device.
* @type {String}
*/
host: '192.168.178.41',
/**
* The password for the VBus/LAN or Datalogger device.
* @type {String}
*/
password: 'vbus',
},
};
</code>
4) Check if web server works
Start live data server:
sudo node resol-vbus/examples/json-live-data-server/index.js
Open page in browser:
http://192.168.178.32:3333/api/v1/live-data/
Should look like
<code>
[
{
"id": "00_0010_1001_10_0100_000_4_0",
"name": "System date",
"rawValue": 564698061
},
{
"id": "00_0010_1001_10_0100_004_2_0",
"name": "Temperature sensor 1",
"rawValue": 12
},
{
"id": "00_0010_1001_10_0100_006_2_0",
"name": "Temperature sensor 2",
"rawValue": 23
},
etc.
</code>
6) Automatic start up the live data server
crontab -e
add following line
@reboot sudo node resol-vbus/examples/json-live-data-server/index.js
7)
Add couple of dummy/virtual devices.
I used 5 temperature, one counter device for the PWM pump and one switch for the heating assistant valve
The idx's of these sensors must be used later.
8) Import in Node red
<code>
[{"id":"22d84f5c.31346","type":"inject","z":"e8a6bafb.256b68","name":"GetSensorData","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":false,"onceDelay":0.1,"x":114.10685729980469,"y":679.4766540527344,"wires":[["b07b8430.15cc68"]]},{"id":"b07b8430.15cc68","type":"http request","z":"e8a6bafb.256b68","name":"","method":"GET","ret":"txt","url":"
http://192.168.178.32:3333/api/v1/live- ... 032,"wires":[["31962303.00ff2c"]]},{"id":"31962303.00ff2c","type":"json","z":"e8a6bafb.256b68","name":"","property":"payload","action":"","pretty":true,"x":451.1042823791504,"y":680.0079431533813,"wires":[["5d661853.27cd68"]]},{"id":"5d661853.27cd68","type":"function","z":"e8a6bafb.256b68","name":"FilterVBUSSensors","func":"var idlist = [\n \"004\",\n \"006\",\n \"008\",\n \"010\",\n \"012\",\n \"030\",\n \"031\"\n ];\n\ni=0;\ndo {\n id= msg.payload
.id.substr(21, 3);\n if(idlist.indexOf(id)==-1){\n msg.payload.id=id;\n msg.payload.splice(i,1);\n } else\n {\n msg.payload.id=id;\n i++;\n }\n} while (i<msg.payload.length)\n\nreturn msg;","outputs":1,"noerr":0,"x":616.0990600585938,"y":681.086109161377,"wires":[["1688f22d.03186e"]]},{"id":"1688f22d.03186e","type":"split","z":"e8a6bafb.256b68","name":"","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":798.0963096618652,"y":681.1616096496582,"wires":[["b12163cd.79176"]]},{"id":"b12163cd.79176","type":"function","z":"e8a6bafb.256b68","name":"IdentifySensor","func":"var devices = [\n [\"004\",1987], \n [\"006\",1988],\n [\"008\",1989],\n [\"010\",1990],\n [\"012\",1991],\n [\"030\",1992],\n [\"031\",1993]\n ]\n \nsensid=msg.payload.id;\n\nfor (i = 0; i < devices.length; i++) {\n if(sensid==devices[0]){\n msg.payload.idx=devices[1];\n msg.payload.svalue=msg.payload.rawValue.toString();\n }\n if(sensid==\"031\"){\n msg.payload.nvalue = 0 ;\n if(msg.payload.rawValue>0){\n msg.payload.switchcmd=\"On\";\n } else {\n msg.payload.switchcmd=\"Off\";\n }\n msg.payload.command =\"switchlight\";\n }\n}\nreturn msg;","outputs":1,"noerr":0,"x":783.6068649291992,"y":727.7579135894775,"wires":[["7aa248b.bcbe0b8","a792fd8f.4957b"]]},{"id":"7aa248b.bcbe0b8","type":"debug","z":"e8a6bafb.256b68","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":975.1068382263184,"y":713.6824169158936,"wires":[]},{"id":"a792fd8f.4957b","type":"mqtt out","z":"e8a6bafb.256b68","name":"test","topic":"domoticz/in","qos":"0","retain":"false","broker":"3cd8a35a.e2ae2c","x":946.9999732971191,"y":853.3332901000977,"wires":[]},{"id":"3cd8a35a.e2ae2c","type":"mqtt-broker","z":"","name":"Local","broker":"localhost","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"15","cleansession":true,"birthTopic":"","birthQos":"0","birthPayload":"","willTopic":"","willQos":"0","willPayload":""}]
</code>
9) Change Node red to your environment
a) Change node “http request” to match your IP
b) Change the node “FilterVBUSSensors” if you have different sensors. Use list of sensors from step 4
c) Change the node “IdentifySensor” to match the idx of your dummy/virtual sensors of Domoticz