Microinverter Solar Bosswerk Mi300/600

This flow extracts the data from the Bosswerk Mi300/600. You have to set your IP-Adresse and perhaps the Auth-Data.

The flow grabs the subframe "status.html" of the http://192.168.x.x/index_cn.html

looks for the javascript-code-Blocks and in this part are the relevant data for the solar inverter.

This idea comes from the Python-script: https://github.com/Skarabaen/BosswerkMI600

[{"id":"7c00030.90620fc","type":"change","z":"ab14ae78.f73078","name":"SetAuth","rules":[{"t":"set","p":"headers","pt":"msg","to":"{\t   \"Authorization\": 'Basic ' & $base64encode(\t       payload.username & ':' & payload.password\t   ) \t}","tot":"jsonata"}],"action":"","property":"","from":"","to":"","reg":false,"x":280,"y":2360,"wires":[["4d0a40e9.3f6378"]]},{"id":"4d0a40e9.3f6378","type":"http request","z":"ab14ae78.f73078","name":"http://192.168.x.x/status.html","method":"GET","ret":"txt","paytoqs":"ignore","url":"http://192.168.x.x/status.html","tls":"","persist":false,"proxy":"","authType":"","x":560,"y":2360,"wires":[["28465499.ed1edc","db279a41.8e0db"]]},{"id":"4dc9e253.df82cc","type":"inject","z":"ab14ae78.f73078","name":"","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"30","crontab":"","once":true,"onceDelay":0.1,"topic":"","payload":"{\"username\":\"admin\",\"password\":\"admin\"}","payloadType":"json","x":130,"y":2360,"wires":[["7c00030.90620fc"]]},{"id":"7b090cd.6f087f4","type":"html","z":"ab14ae78.f73078","name":"Extract \"script\"-blocks from HTML","property":"payload","outproperty":"payload","tag":"script","ret":"html","as":"multi","x":200,"y":2420,"wires":[["d99c247b.aa86e"]]},{"id":"d99c247b.aa86e","type":"switch","z":"ab14ae78.f73078","name":"Get \"Script\"-Block with \"webdata_sn\"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"webdata_sn ","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":530,"y":2420,"wires":[["56afb18b.9d11e"],[]]},{"id":"56afb18b.9d11e","type":"split","z":"ab14ae78.f73078","name":"split by /n","splt":"\\n","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":780,"y":2420,"wires":[["3ce1ec21.781a3c"]]},{"id":"3ce1ec21.781a3c","type":"switch","z":"ab14ae78.f73078","name":"Search vor \"webdata_*\"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"webdata_now_p","vt":"str"},{"t":"cont","v":"webdata_today_e","vt":"str"},{"t":"cont","v":"webdata_total_e","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":4,"x":170,"y":2480,"wires":[["a4aee74.1e38018"],["afe8b3db.2076"],["cdbe07d7.3832d8"],[]]},{"id":"9dac889b.f3565","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":890,"y":2480,"wires":[]},{"id":"a4aee74.1e38018","type":"split","z":"ab14ae78.f73078","name":"split by "","splt":""","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":520,"y":2480,"wires":[["fd123c3b.283a28"]]},{"id":"fd123c3b.283a28","type":"switch","z":"ab14ae78.f73078","name":"","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"1000000000","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":2480,"wires":[["9dac889b.f3565"],[]]},{"id":"b98fd0ad.7706e8","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":890,"y":2540,"wires":[]},{"id":"afe8b3db.2076","type":"split","z":"ab14ae78.f73078","name":"split by "","splt":""","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":520,"y":2540,"wires":[["402f1ea2.694d18"]]},{"id":"402f1ea2.694d18","type":"switch","z":"ab14ae78.f73078","name":"","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"1000000000","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":2540,"wires":[["b98fd0ad.7706e8"],[]]},{"id":"a0803922.df41","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":890,"y":2600,"wires":[]},{"id":"cdbe07d7.3832d8","type":"split","z":"ab14ae78.f73078","name":"split by "","splt":""","spltType":"str","arraySplt":1,"arraySpltType":"len","stream":false,"addname":"","x":520,"y":2600,"wires":[["2e6469c.e9a1c96"]]},{"id":"2e6469c.e9a1c96","type":"switch","z":"ab14ae78.f73078","name":"","property":"payload","propertyType":"msg","rules":[{"t":"btwn","v":"0","vt":"num","v2":"1000000000","v2t":"num"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":690,"y":2600,"wires":[["a0803922.df41","b4e2b9b1.4c679"],[]]},{"id":"28465499.ed1edc","type":"switch","z":"ab14ae78.f73078","name":"","property":"payload","propertyType":"msg","rules":[{"t":"cont","v":"Error","vt":"str"},{"t":"else"}],"checkall":"true","repair":false,"outputs":2,"x":780,"y":2360,"wires":[[],["7b090cd.6f087f4","fa20ccc9.d6dda8"]]},{"id":"fa20ccc9.d6dda8","type":"change","z":"ab14ae78.f73078","name":"\"Online\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Online","tot":"str"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2380,"wires":[["6ad2c644.cdee9"]]},{"id":"87414b9c.b0b82","type":"change","z":"ab14ae78.f73078","name":"\"Offline\"","rules":[{"t":"set","p":"payload","pt":"msg","to":"Offline","tot":"str"},{"t":"delete","p":"error","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":960,"y":2340,"wires":[["6ad2c644.cdee9"]]},{"id":"6f7b265f.25ab5","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":890,"y":2660,"wires":[]},{"id":"b4e2b9b1.4c679","type":"chronos-change","z":"ab14ae78.f73078","name":"GetAcutalTIme","config":"c12228b.6ca44d8","rules":[{"action":"set","target":{"type":"msg","name":"payload"},"type":"now"}],"x":460,"y":2660,"wires":[["78e89099.0aa968"]]},{"id":"78e89099.0aa968","type":"moment","z":"ab14ae78.f73078","name":"","topic":"","input":"payload","inputType":"msg","inTz":"Europe/Paris","adjAmount":0,"adjType":"days","adjDir":"add","format":"","locale":"de-DE","output":"payload","outputType":"msg","outTz":"Europe/Paris","x":680,"y":2660,"wires":[["6f7b265f.25ab5"]]},{"id":"db279a41.8e0db","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":550,"y":2300,"wires":[]},{"id":"8a24cf3e.3d703","type":"catch","z":"ab14ae78.f73078","name":"","scope":["4d0a40e9.3f6378"],"uncaught":false,"x":820,"y":2300,"wires":[["87414b9c.b0b82","7bcae03c.46f05"]]},{"id":"7bcae03c.46f05","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"error.message","targetType":"msg","statusVal":"","statusType":"auto","x":1010,"y":2300,"wires":[]},{"id":"6ad2c644.cdee9","type":"debug","z":"ab14ae78.f73078","name":"","active":false,"tosidebar":true,"console":false,"tostatus":true,"complete":"payload","targetType":"msg","statusVal":"payload","statusType":"auto","x":1130,"y":2360,"wires":[]},{"id":"c12228b.6ca44d8","type":"chronos-config","name":"Bischofsheim","sunPositions":[]}]

Flow Info

Created 2 years, 8 months ago
Rating: 1 1

Owner

Actions

Rate:

Node Types

Core
  • catch (x1)
  • change (x3)
  • debug (x7)
  • html (x1)
  • http request (x1)
  • inject (x1)
  • split (x4)
  • switch (x6)
Other

Tags

  • solar
  • inverter
  • http
  • request
  • bosswerk
Copy this flow JSON to your clipboard and then import into Node-RED using the Import From > Clipboard (Ctrl-I) menu option