This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
My first Live demo of a Wifi solar- and battery monitor in OpenPlotter
#1
It took some time but i gotit to run. The Live Demo is available at

http://arztde.dynvpn.de/epsolar/

All description is in German but i let translate it with robots to 30 languages
To get the COM data of my EPsolar Tracer into the Raspberry Pi i did not use a RS485 USB UART cable. I did solder a Wifi connection desription here:

http://donau-grundel-schiff.de/2017/08/0...p8266.html

For the connection to the Raspberry Pi i use a virtual COM port.

The links go often to english resources including GIT.
How to do is a description here:
http://donau-grundel-schiff.de/2017/07/2...video.html

I did install at the raspberry a mysql database and a Nginx webserver. Scriptlanguage is php for now.

Ideas how to go on:
1. I use as switches Sonoff SV so the idea is to go on this way and install Alexa Echo at the raspberry.
2. Read about MQTT and Node Red to learn how to transfer the data from the database directely into Signal K

I hope the idea with the virtual COM Port is usefull for others. In general you an onect anything that way.

I hope also that in discussion someone help me for better integration. There exist a code for node red but i do not know how to handle it and how to work with it because never used node red. Maybee someone can guide me for the first steps. I do use now Openplotter 0.10.x alpha beause i fear the updates from last time.

Code:
[
   {
       "id": "540ef0ed.76002",
       "type": "mysql",
       "z": "41bc4e86.a2c73",
       "mydb": "4c3e4c8a.898584",
       "name": "Solardata",
       "x": 442,
       "y": 1418,
       "wires": [
           [
               "dab8ec4a.48d97"
           ]
       ]
   },
   {
       "id": "97a4a648.fd044",
       "type": "inject",
       "z": "41bc4e86.a2c73",
       "name": "",
       "topic": "SELECT SUM((SELECT `Battery voltage` FROM stats WHERE Controller = 1 ORDER BY `timestamp` DESC LIMIT 1) + (SELECT `Battery voltage` FROM stats WHERE Controller = 2 ORDER BY `timestamp` DESC LIMIT 1))/2 AS `Battery Voltage`, SUM((SELECT `Battery charging power` FROM stats WHERE Controller = 1 ORDER BY `timestamp` DESC LIMIT 1) + (SELECT `Battery charging power` FROM stats WHERE Controller = 2 ORDER BY `timestamp` DESC LIMIT 1)) AS `Battery Charging power`, SUM((SELECT `Load power` FROM stats WHERE Controller = 1 ORDER BY `timestamp` DESC LIMIT 1)) AS `Load power`",
       "payload": "",
       "payloadType": "str",
       "repeat": "60",
       "crontab": "",
       "once": true,
       "x": 209,
       "y": 1347,
       "wires": [
           [
               "540ef0ed.76002"
           ]
       ]
   },
   {
       "id": "8d0012a4.32f418",
       "type": "ui_gauge",
       "z": "41bc4e86.a2c73",
       "name": "Battery Voltage",
       "group": "9f358bc8.315728",
       "order": 1,
       "width": "6",
       "height": "6",
       "gtype": "gage",
       "title": "Battery Voltage",
       "label": "Volts",
       "format": "{{value}}",
       "min": "10",
       "max": "15",
       "colors": [
           "#b50012",
           "#00e606",
           "#ca3838"
       ],
       "seg1": "11",
       "seg2": "14.3",
       "x": 1100,
       "y": 1275,
       "wires": []
   },
   {
       "id": "143a1fa7.c76eb",
       "type": "debug",
       "z": "41bc4e86.a2c73",
       "name": "",
       "active": false,
       "console": "false",
       "complete": "false",
       "x": 1041,
       "y": 1476,
       "wires": []
   },
   {
       "id": "dab8ec4a.48d97",
       "type": "function",
       "z": "41bc4e86.a2c73",
       "name": "parse data",
       "func": "var voltage = msg.payload[0]['Battery Voltage'].toFixed(2);\nvar power = msg.payload[0]['Battery Charging power'].toFixed(2);\nvar loadpower = msg.payload[0]['Load power'].toFixed(2);\n\nmsg.topic = \"Voltage\";\nmsg.payload = voltage;\n\nvar msg1 = {topic:\"Charging Power\", payload: power};\nvar msg2 = {topic:\"Load Power\", payload: loadpower};\nvar msg3 = {topic:\"Voltage\", payload: voltage};\n\nreturn [msg, msg1, [msg1,msg2,msg3]];",
       "outputs": "3",
       "noerr": 0,
       "x": 625.9794921875,
       "y": 1332.0484619140625,
       "wires": [
           [
               "8d0012a4.32f418",
               "143a1fa7.c76eb"
           ],
           [
               "143a1fa7.c76eb",
               "b1566728.7253b"
           ],
           [
               "91e58ef9.5d602"
           ]
       ]
   },
   {
       "id": "91e58ef9.5d602",
       "type": "ui_chart",
       "z": "41bc4e86.a2c73",
       "name": "Performance",
       "group": "9f358bc8.315728",
       "order": 3,
       "width": "6",
       "height": "5",
       "label": "Recent Performance",
       "chartType": "line",
       "legend": "false",
       "xformat": "HH:mm",
       "interpolate": "linear",
       "nodata": "",
       "ymin": "0",
       "ymax": "",
       "removeOlder": "36",
       "removeOlderPoints": "",
       "removeOlderUnit": "3600",
       "cutout": 0,
       "colors": [
           "#1f77b4",
           "#aec7e8",
           "#ff7f0e",
           "#2ca02c",
           "#98df8a",
           "#d62728",
           "#ff9896",
           "#9467bd",
           "#c5b0d5"
       ],
       "x": 1120,
       "y": 1391,
       "wires": [
           [],
           []
       ]
   },
   {
       "id": "b1566728.7253b",
       "type": "ui_gauge",
       "z": "41bc4e86.a2c73",
       "name": "Charging Power",
       "group": "9f358bc8.315728",
       "order": 2,
       "width": "6",
       "height": "6",
       "gtype": "gage",
       "title": "Charging Power",
       "label": "Watts",
       "format": "{{value}}",
       "min": "0",
       "max": "750",
       "colors": [
           "#00e606",
           "#00e606",
           "#ca3838"
       ],
       "seg1": "",
       "seg2": "700",
       "x": 1105,
       "y": 1323,
       "wires": []
   },
   {
       "id": "4c3e4c8a.898584",
       "type": "MySQLdatabase",
       "z": "",
       "host": "192.168.123.10",
       "port": "3306",
       "db": "solardata",
       "tz": ""
   },
   {
       "id": "9f358bc8.315728",
       "type": "ui_group",
       "z": "",
       "name": "Solar Stuff",
       "tab": "ff53e552.1dc31",
       "order": 2,
       "disp": true,
       "width": "18"
   },
   {
       "id": "ff53e552.1dc31",
       "type": "ui_tab",
       "z": "",
       "name": "Home",
       "icon": "dashboard"
   }
]
Reply


Messages In This Thread
My first Live demo of a Wifi solar- and battery monitor in OpenPlotter - by tocan - 2017-08-15, 10:12 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)