Monitor Effekta inverter via RS232

This flow queries the Effekta M1 5000 inverter via RS232 or USB It makes use of the axpert-monitor npm package: https://www.npmjs.com/package/axpert-monitor

You have to install the package via npm and afterwards include the package into your settings.js and restart node-red. functionGlobalContext: { AxpertMonitor:require('axpert-monitor') },

[{"id":"be0cef79a38afd48","type":"inject","z":"9d7999937b9bb4f4","name":"every 5 minutes","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payloadType":"date","x":160,"y":140,"wires":[["da8d0468a7732dd8"]]},{"id":"da8d0468a7732dd8","type":"function","z":"9d7999937b9bb4f4","name":"AxpertMonitor get data","func":"let AxpertMonitor = global.get('AxpertMonitor')\n\nconst options = {\n      port: \"/dev/ttyUSB1\",\n      //hid: \"/dev/hidraw0\"\n};\n\nlet axpert;\n\ntry {\n    axpert = new AxpertMonitor(options);\n    const response = await axpert.get.generalStatus();\n    //const response = await axpert.get.deviceRating();\n    msg.payload = response;\n} finally {\n    axpert.stop();\n}\n\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":500,"y":140,"wires":[["3b074e3cad7cb7ef","0db29d9d00df4c77","90c8e86546d03954"]]},{"id":"3b074e3cad7cb7ef","type":"debug","z":"9d7999937b9bb4f4","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":1050,"y":140,"wires":[]}]

Flow Info

Created 3 years, 4 months ago
Rating: 4 4

Owner

Actions

Rate:

Node Types

Core
  • debug (x1)
  • function (x1)
  • inject (x1)

Tags

  • Effekta
  • RS232
  • USB
  • inverter
  • monitoring
  • Axpert
  • MPPTech
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option