mqtt_for_digitalstrom

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
mqtt_for_digitalstrom [29.01.2018 10:06] – [what I want to add] Pascal Sutermqtt_for_digitalstrom [29.01.2018 10:08] (current) – [the script] Pascal Suter
Line 25: Line 25:
   * so far the whole solution isn't very stable. when i re-scan the devices on my digitalSTROM bus via the web-interface of the DSS, it will loose the connection to my virtual device. I need to re-start the node.js script to re-connect to the vdcd which provides the API, but as soon as i disconnect the API-Client (my node.js script) the vdcd segfaults. this can of course be solved by simply running it via something like systemd, which whill then simply restart it, but the main issue here is, that my node.js script is not informed, that the connection has been lost by the DSS or that it wants to re-scan all devices. So unless i notice the malfunction personally and fix it manually, my node.js script will not stop and re-initiate the connection.    * so far the whole solution isn't very stable. when i re-scan the devices on my digitalSTROM bus via the web-interface of the DSS, it will loose the connection to my virtual device. I need to re-start the node.js script to re-connect to the vdcd which provides the API, but as soon as i disconnect the API-Client (my node.js script) the vdcd segfaults. this can of course be solved by simply running it via something like systemd, which whill then simply restart it, but the main issue here is, that my node.js script is not informed, that the connection has been lost by the DSS or that it wants to re-scan all devices. So unless i notice the malfunction personally and fix it manually, my node.js script will not stop and re-initiate the connection. 
  
 +The upside, that makes it all worth doing: 
 +  * NO LAG! which leads to a high WAF (Wife Approval Factor) of the installation :) 
  
 ===== Current Stats of this project ===== ===== Current Stats of this project =====
Line 159: Line 161:
  JSONaction=`  JSONaction=`
 { {
-'message':'${type}'+"message":"${type}"
-'id':'${id}'+"id":"${id}"
-'value':100, +"value":100, 
-'tag':'${tag}',+"tag":"${tag}",
 }` }`
  client.write(JSONaction);  client.write(JSONaction);
Line 179: Line 181:
  JSONaction=`  JSONaction=`
 { {
-'message':'${type}'+"message":"${type}"
-'id':'${id}'+"id":"${id}"
-'value':${message}, +"value":${message}, 
-'tag':'${tag}',+"tag":"${tag}",
 }` }`
  client.write(JSONaction);  client.write(JSONaction);
  • mqtt_for_digitalstrom.1517216795.txt.gz
  • Last modified: 29.01.2018 10:06
  • by Pascal Suter