how to add APSystems ECU-3 solar inverter monitor

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard and other interested readers.

As I have returned from holiday and have access to my Node Red editor again, I have created a start of the flow to scrape the data for the AP Systems Solar Panels.

So far I have created the following:

Screenshot_APS-NodeRed-1.png
Screenshot_APS-NodeRed-1.png (27.37 KiB) Viewed 1652 times

The first node in the flow is an "inject" node.This is one of the core nodes.
For details, see: https://nodered.org/docs/user-guide/nodes

During development of the flow, I have "unticked" the "Inject" box, but if everything is functioning alright, you could "tick" it again.
As you informed me the ECU update frequency is 5 minutes. Therefore it does not make any sense to have a more frequent poll time.
If it turns out, that there is a faster (or slower) update frequency, you can change it accordingly.

The timer node I have left out for this moment. But, if you want that functionality, we can put that in later.

The second node is a "HTTP request" node, which should poll the IP address of your ECU.
As I don't have access to your ECU, I have used the URL, that you published in this thread:
https://mbernard.home.xs4all.nl/youless ... medata.htm.


Screenshot_APS-NodeRed-2.png
Screenshot_APS-NodeRed-2.png (29.37 KiB) Viewed 1652 times

Question 1: Please check that the output (screenshot published later) is exactly the same if you test the flow. Should be.
Question 2: Change the URL to your ECU URL. Probably: http://192.168.2.88/index.php/realtimedata.
and check that you have the same output as before (except the values).

If their are differences, please report these.

The third node is a "html" node to parse the inverter data.

Screenshot_APS-NodeRed-3.png
Screenshot_APS-NodeRed-3.png (18.97 KiB) Viewed 1652 times

The data of this "html" node is fed into a function node, in order to be able to loop over the inverters.

Code of the function node, see below.

Code: Select all

var i;
for (i = 0; i < msg.payload.length/9; i++) {
var InverterIDA = msg.payload[9*i+0];
var CurrentPowerA = msg.payload[9*i+1];
var GridFreq = msg.payload[9*i+2];
var GridVoltageA = msg.payload[9*i+3];
var GridTemp = msg.payload[9*i+4];
var GridReportTime = msg.payload[9*i+5];
var InverterIDB = msg.payload[9*i+6];
var CurrentPowerB = msg.payload[9*i+7];
var GridVoltageB = msg.payload[9*i+8];
newMsg = {payload: ([InverterIDA,CurrentPowerA,GridFreq,GridVoltageA,GridTemp,GridReportTime,InverterIDB,CurrentPowerB,GridVoltageB])}
node.send(newMsg);
}
The resulting output and the complete flow will be posted in the next post
Last edited by FireWizard on Friday 13 March 2020 18:17, edited 1 time in total.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

If everything is OK, you will see the following in the debug screen:

Screenshot_APS-NodeRed-4.png
Screenshot_APS-NodeRed-4.png (29.71 KiB) Viewed 1652 times
You will see an array of 9 elements. One array for each inverter.
So if you have more inverters, you will have more arrays, and vice versa.

Please check that the output is identical, when connected to your ECU.

Below you will find the flow:

Code: Select all

[{"id":"d243b84a.4ac438","type":"tab","label":"Test AP Systems","disabled":false,"info":""},{"id":"63bcbc31.eb708c","type":"http request","z":"d243b84a.4ac438","name":"HTTP AP Systems Production Request","method":"GET","ret":"txt","paytoqs":false,"url":"https://mbernard.home.xs4all.nl/youless/http%20_192.168.2.88_index.php_realtimedata.htm","tls":"","proxy":"","x":480,"y":240,"wires":[["c3df4a05.c383"]]},{"id":"9e970e24.f28508","type":"within-time-switch","z":"d243b84a.4ac438","name":"Day Timer","positionConfig":"2faec32b.cb2b74","startTime":"sunrise","startTimeType":"pdsTime","startOffset":"-30","startOffsetType":"num","startOffsetMultiplier":60000,"endTime":"sunset","endTimeType":"pdsTime","endOffset":"30","endOffsetType":"num","endOffsetMultiplier":60000,"propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","lastMsgOnStartOut":false,"lastMsgOnEndOut":false,"x":390,"y":180,"wires":[[],[]]},{"id":"d5e45a3a.244e5","type":"debug","z":"d243b84a.4ac438","name":"HTML Output","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":620,"y":340,"wires":[]},{"id":"8501a12b.61eb4","type":"inject","z":"d243b84a.4ac438","name":"5 MIn Tick","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":180,"y":240,"wires":[["63bcbc31.eb708c"]]},{"id":"c3df4a05.c383","type":"html","z":"d243b84a.4ac438","name":"Parse inverter","property":"payload","outproperty":"payload","tag":"td","ret":"html","as":"single","x":420,"y":300,"wires":[["d5e45a3a.244e5","80391cd8.5820d8"]]},{"id":"80391cd8.5820d8","type":"function","z":"d243b84a.4ac438","name":"Create Inverter Array","func":"var i;\nfor (i = 0; i < msg.payload.length/9; i++) {\nvar InverterIDA = msg.payload[9*i+0];\nvar CurrentPowerA = msg.payload[9*i+1];\nvar GridFreq = msg.payload[9*i+2];\nvar GridVoltageA = msg.payload[9*i+3];\nvar GridTemp = msg.payload[9*i+4];\nvar GridReportTime = msg.payload[9*i+5];\nvar InverterIDB = msg.payload[9*i+6];\nvar CurrentPowerB = msg.payload[9*i+7];\nvar GridVoltageB = msg.payload[9*i+8];\nnewMsg = {payload: ([InverterIDA,CurrentPowerA,GridFreq,GridVoltageA,GridTemp,GridReportTime,InverterIDB,CurrentPowerB,GridVoltageB])}\nnode.send(newMsg);\n}","outputs":1,"noerr":0,"x":640,"y":300,"wires":[["7d148fd5.6837a8"]]},{"id":"7d148fd5.6837a8","type":"debug","z":"d243b84a.4ac438","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","x":850,"y":300,"wires":[]},{"id":"2faec32b.cb2b74","type":"position-config","z":"","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]
Copy this flow to the clipboard and import it.

If you want to look forward, what the next steps will be, see my post:
https://www.domoticz.com/forum/viewtopi ... 00#p224400

Awaiting your reply,

Regards
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

It's now time to configure Domoticz.

As you said, you would like to have to following information:
It would be great to have per Panel:
- power
- voltage
- frequency
- temperature

This then with time/date stamp so that Domoticz can create graph and historical overview, like we have i.e. for temperature.
As you can see in the debug output the following information per inverter is available:

Element 0: Inverter ID; This will be used as the key, without "-A".

Element 1: Produced Current Power for the first Solar Panel; Virtual Sensor to be created.

Element 2: Frequency in Hz for the inverter.
As the inverter is connected to the grid (and not the solar panel) you can't have this info for each solar panel.
If you want to have it for a solar panel, you have to create two identical sensors. This is not useful.
Virtual Sensor to be created.

Element 3: Grid Voltage for the first Solar Panel; Virtual Sensor to be created.

Element 4: Temperature in degrees Centigrade for the inverter.
It is the temperature of the inverter and not the temperature of the solar panel.
Virtual Sensor to be created.

Element 5: Date/Time stamp of the latest report.
As Domoticz uses its own timestamp, as a sensor is updated, the difference between this value will not be more than the update frequency of the
sensor (poll time). Default 5 minutes. If you want a smaller difference between the two timestamps, you may use a faster time tick in the "inject"
node, e.g. 30 seconds.
Ignore this element.

Element 6: Same as element 1 and so to be ignored.

Element 7: Produced Current Power for the second Solar Panel; Virtual Sensor to be created.

Element 8: Grid Voltage for the second Solar Panel; Virtual Sensor to be created.

This means, that we have to create 6 virtual sensors for each inverter, so in this case we have 6 inverters and that means 36 virtual sensors.
A floorplan (roofplan) for the solar panels is highly recommended, in order to get a quick overview.

Create the virtual sensors as follows:

1. Go to "hardware" and create a new hardware device called Dummy (Does nothing, use for virtual switches only).
2. Give it a name, e.g. AP Systems inverters.
3. Create virtual sensor.
4. Give the sensor a name, e.g. Solar Panel 1.
5. As sensor type, select Electric (Instant+Counter).
6. Repeat step 3 to 5, as many times as you have number of solar panels.

So, if you have 12 solar panels, you have now created 12 virtual sensors of the type General and subtype kWh.

Go to the devices in the setup tab and look up your newly created devices.
For each created sensor, note their name and Idx.
You will need that later.

The next step is that you go to the Utility tab and look up the sensors just created.

Click on Edit and change the Type from Usage to Return.
Leave Energy read as Computed.
Press Update.
Do this for every created sensor.

Screenshot_IQ7-3.png
Screenshot_IQ7-3.png (17.75 KiB) Viewed 1648 times

You will see that the icon changes to a solar.

Next step is to create the Voltage sensor for each solar panel.
We do that under the same hardware, e.g. AP Systems inverters.
3. Create virtual sensor.
4. Give the sensor a name, e.g. Voltage Solar Panel 1.
5. As sensor type, select Voltage.
6. Repeat step 3 to 5, as many times as you have number of solar panels.

So, if you have 12 solar panels, you have now created 12 virtual sensors of the type General and subtype Voltage.

Go to the devices in the setup tab and look up your newly created devices.
For each created sensor, note their name and Idx.
You will need that later.

Next step is to create the Frequency sensor for each inverter.
We do that under the same hardware, e.g. AP Systems inverters.
3. Create virtual sensor.
4. Give the sensor a name, e.g. Frequency Inverter 1.
5. As sensor type, select Custom.
6. As Axis Label, you should fill in Hz
7. Repeat step 3 to 6, as many times as you have number of inverters.

So, if you have 6 inverters, you have now created 6 virtual sensors of the type General and subtype Custom Sensor.

Go to the devices in the setup tab and look up your newly created devices.
For each created sensor, note their name and Idx.
You will need that later.

Next step is to create the Temperature sensor for each inverter.
We do that under the same hardware, e.g. AP Systems inverters.
3. Create virtual sensor.
4. Give the sensor a name, e.g. Temperature Inverter 1.
5. As sensor type, select Temperature.
6. Repeat step 3 to 5, as many times as you have number of inverters.

So, if you have 6 inverters, you have now created 6 virtual sensors of the type Temp and subtype LaCrosse TX3.

Go to the devices in the setup tab and look up your newly created devices.
For each created sensor, note their name and Idx.
You will need that later.
You will find back these Temperature Sensors under the Temperature tab.

Once more, note down all created sensors, in this case 36.
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

In order to prepare the data to be accepted by Domoticz, I modified the function node slightly.
1. I removed the obsolete elements of the array (Inverter ID B and the date/time stamp, as we will use the Domoticz date/time).
2. Deleted the "-A" after the Inverter ID.
3. Removed all the "Units" after the value, such as: W, Hz, V, oC.
This creates a shorter array and is better suitable for Domoticz.

Screenshot_APS-NodeRed-5.png
Screenshot_APS-NodeRed-5.png (43.05 KiB) Viewed 1647 times
Please find the code below:

Code: Select all

var i;
for (i = 0; i < msg.payload.length/9; i++) {
var InverterIDA = msg.payload[9*i+0];
var CurrentPowerA = msg.payload[9*i+1];
var GridFreq = msg.payload[9*i+2];
var GridVoltageA = msg.payload[9*i+3];
var GridTemp = msg.payload[9*i+4];
var GridReportTime = msg.payload[9*i+5];
var InverterIDB = msg.payload[9*i+6];
var CurrentPowerB = msg.payload[9*i+7];
var GridVoltageB = msg.payload[9*i+8];
newMsg = {payload: ([InverterIDA.substr(0,12),CurrentPowerA.substr(0,1),GridVoltageA.substr(0,3),CurrentPowerB.substr(0,1),GridVoltageB.substr(0,3),GridFreq.substr(0,4),GridTemp.substr(0,2)])}
node.send(newMsg);
}
As earlier mentioned I suggested the following:
I suggest the following flow:

- inject node with 5 minute tick (can be faster, up to you), followed by timer node.
- timer node (moment), which will pass the flow (5 min. tick) between 30 minutes before sunrise until 30 minutes after sunset). It is useless to poll the inverters at night.
- next node will be the http request node, to poll the (local) url.
- html node to sort the received data.
- function node to prepare the data for domoticz.
- the last node will be mqtt-out to domoticz/in.
After studying the details I have decided not to use 1 function node, but 2. So we will have 7 nodes in the flow (beside optionally "debug" nodes).
The first function node is only used for handling the data, received from the web page and put it in an array.
The advantage is that:
- If the manufacturer (AP Systems) decides to change/update the web page, it only is necessary to do the changes in the first "function" node.
- This node can be untouched, regardless of the number of inverters and/or solar panels.

The second function node contains the conversion from the array to the suitable Domoticz commands.

The results you see below:

Screenshot_APS-NodeRed-7.png
Screenshot_APS-NodeRed-7.png (47.69 KiB) Viewed 1647 times

The result for the first inverter is shown.

See the code below:

Code: Select all

var msg1 = {};
var msg2 = {};
var msg3 = {};
var msg4 = {};
var msg5 = {};
var msg6 = {};

switch (msg.payload[0]) {

    case "404000191265": //Inverter 1
    msg1.payload = {"command":"udevice","idx":1001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":1002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":1003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":1004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":1005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":1006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

    case "404000191123": //Inverter 2
    msg1.payload = {"command":"udevice","idx":2001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":2002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":2003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":2004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":2005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":2006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

    case "404000193004": //Inverter 3
    msg1.payload = {"command":"udevice","idx":3001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":3002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":3003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":3004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":3005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":3006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

    case "404000191257": //Inverter 4
    msg1.payload = {"command":"udevice","idx":4001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":4002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":4003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":4004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":4005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":4006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

    case "404000192992": //Inverter 5
    msg1.payload = {"command":"udevice","idx":5001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":5002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":5003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":5004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":5005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":5006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

    case "404000191779": //Inverter 6
    msg1.payload = {"command":"udevice","idx":6001,"nvalue":0,"svalue":(msg.payload[1] + ";0")}; //Current Power A
    msg2.payload = {"command":"udevice","idx":6002,"nvalue":0,"svalue":(msg.payload[2])}; //Voltage A
    msg3.payload = {"command":"udevice","idx":6003,"nvalue":0,"svalue":(msg.payload[3] + ";0")}; //Current Power B
    msg4.payload = {"command":"udevice","idx":6004,"nvalue":0,"svalue":(msg.payload[4])}; //Voltage B
    msg5.payload = {"command":"udevice","idx":6005,"nvalue":0,"svalue":(msg.payload[5])}; //Frequency
    msg6.payload = {"command":"udevice","idx":6006,"nvalue":0,"svalue":(msg.payload[6])}; //Temperature
    break;

}
return [[msg1,msg2,msg3,msg4,msg5,msg6]];
In order to use this function node, each user has to made the following changes:

1. After each "case" statement, the user has to fill in its own Inverter ID/serial number (without the -A or -B suffix).
(Except Bernhard, he is a lucky guy :D )
2. Each user has to replace the idx number (?001 - ?006) for his own idx number.
You made a table, where the relation between Name of the Domoticz Sensor and serial number has been put, didn't you?
3. If you have more than 6 inverters, copy the block between case and break;.
4. If you have less inverters than 6, delete the obsolete block(s) between case and break;,

The final flow will look like:

Screenshot_APS-NodeRed-6.png
Screenshot_APS-NodeRed-6.png (38.15 KiB) Viewed 1647 times
If the output corresponds with the screenshot, above, and your own, correct number, of indexes, you can connect the output of the second "function" node to the input of the MQTT output node.
The description, how to configure the MQTT output node, you will find in this post, dated Saturday 21 September 2019 21:54.
https://www.domoticz.com/forum/viewtopi ... 14&t=29331.

The complete code, you will find below:

Code: Select all

[{"id":"d243b84a.4ac438","type":"tab","label":"Test AP Systems","disabled":false,"info":""},{"id":"63bcbc31.eb708c","type":"http request","z":"d243b84a.4ac438","name":"HTTP AP Systems Production Request","method":"GET","ret":"txt","paytoqs":false,"url":"https://mbernard.home.xs4all.nl/youless/http%20_192.168.2.88_index.php_realtimedata.htm","tls":"","proxy":"","x":660,"y":240,"wires":[["c3df4a05.c383"]]},{"id":"9e970e24.f28508","type":"within-time-switch","z":"d243b84a.4ac438","name":"Day Timer","positionConfig":"2faec32b.cb2b74","startTime":"sunrise","startTimeType":"pdsTime","startOffset":"-30","startOffsetType":"num","startOffsetMultiplier":60000,"endTime":"sunset","endTimeType":"pdsTime","endOffset":"30","endOffsetType":"num","endOffsetMultiplier":60000,"propertyStart":"","propertyStartType":"none","propertyStartCompare":"true","propertyStartThreshold":"","propertyStartThresholdType":"num","startTimeAlt":"","startTimeAltType":"entered","startOffsetAlt":0,"startOffsetAltType":"none","startOffsetAltMultiplier":60000,"propertyEnd":"","propertyEndType":"none","propertyEndCompare":"true","propertyEndThreshold":"","propertyEndThresholdType":"num","endTimeAlt":"","endTimeAltType":"entered","endOffsetAlt":0,"endOffsetAltType":"none","endOffsetAltMultiplier":60000,"tsCompare":"0","lastMsgOnStartOut":false,"lastMsgOnEndOut":false,"x":370,"y":240,"wires":[["63bcbc31.eb708c"],[]]},{"id":"d5e45a3a.244e5","type":"debug","z":"d243b84a.4ac438","name":"HTML Output","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":380,"y":380,"wires":[]},{"id":"8501a12b.61eb4","type":"inject","z":"d243b84a.4ac438","name":"5 MIn Tick","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":"","x":180,"y":240,"wires":[["9e970e24.f28508"]]},{"id":"c3df4a05.c383","type":"html","z":"d243b84a.4ac438","name":"Parse inverter","property":"payload","outproperty":"payload","tag":"td","ret":"html","as":"single","x":180,"y":320,"wires":[["d5e45a3a.244e5","80391cd8.5820d8"]]},{"id":"80391cd8.5820d8","type":"function","z":"d243b84a.4ac438","name":"Create Inverter Array","func":"var i;\nfor (i = 0; i < msg.payload.length/9; i++) {\nvar InverterIDA = msg.payload[9*i+0];\nvar CurrentPowerA = msg.payload[9*i+1];\nvar GridFreq = msg.payload[9*i+2];\nvar GridVoltageA = msg.payload[9*i+3];\nvar GridTemp = msg.payload[9*i+4];\nvar GridReportTime = msg.payload[9*i+5];\nvar InverterIDB = msg.payload[9*i+6];\nvar CurrentPowerB = msg.payload[9*i+7];\nvar GridVoltageB = msg.payload[9*i+8];\nnewMsg = {payload: ([InverterIDA.substr(0,12),CurrentPowerA.substr(0,1),GridVoltageA.substr(0,3),CurrentPowerB.substr(0,1),GridVoltageB.substr(0,3),GridFreq.substr(0,4),GridTemp.substr(0,2)])}\nnode.send(newMsg);\n}","outputs":1,"noerr":0,"x":400,"y":320,"wires":[["7d148fd5.6837a8","752a8421.e09cf4"]]},{"id":"7d148fd5.6837a8","type":"debug","z":"d243b84a.4ac438","name":"Output APS Array","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":650,"y":380,"wires":[]},{"id":"752a8421.e09cf4","type":"function","z":"d243b84a.4ac438","name":"Solar Production Inverters to Domoticz","func":"var msg1 = {};\nvar msg2 = {};\nvar msg3 = {};\nvar msg4 = {};\nvar msg5 = {};\nvar msg6 = {};\n\nswitch (msg.payload[0]) {\n\n    case \"404000191265\": //Inverter 1\n    msg1.payload = {\"command\":\"udevice\",\"idx\":1001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":1002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":1003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":1004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":1005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":1006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n    case \"404000191123\": //Inverter 2\n    msg1.payload = {\"command\":\"udevice\",\"idx\":2001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":2002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":2003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":2004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":2005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":2006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n    case \"404000193004\": //Inverter 3\n    msg1.payload = {\"command\":\"udevice\",\"idx\":3001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":3002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":3003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":3004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":3005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":3006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n    case \"404000191257\": //Inverter 4\n    msg1.payload = {\"command\":\"udevice\",\"idx\":4001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":4002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":4003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":4004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":4005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":4006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n    case \"404000192992\": //Inverter 5\n    msg1.payload = {\"command\":\"udevice\",\"idx\":5001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":5002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":5003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":5004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":5005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":5006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n    case \"404000191779\": //Inverter 6\n    msg1.payload = {\"command\":\"udevice\",\"idx\":6001,\"nvalue\":0,\"svalue\":(msg.payload[1] + \";0\")}; //Current Power A\n    msg2.payload = {\"command\":\"udevice\",\"idx\":6002,\"nvalue\":0,\"svalue\":(msg.payload[2])}; //Voltage A\n    msg3.payload = {\"command\":\"udevice\",\"idx\":6003,\"nvalue\":0,\"svalue\":(msg.payload[3] + \";0\")}; //Current Power B\n    msg4.payload = {\"command\":\"udevice\",\"idx\":6004,\"nvalue\":0,\"svalue\":(msg.payload[4])}; //Voltage B\n    msg5.payload = {\"command\":\"udevice\",\"idx\":6005,\"nvalue\":0,\"svalue\":(msg.payload[5])}; //Frequency\n    msg6.payload = {\"command\":\"udevice\",\"idx\":6006,\"nvalue\":0,\"svalue\":(msg.payload[6])}; //Temperature\n    break;\n\n}\nreturn [[msg1,msg2,msg3,msg4,msg5,msg6]];","outputs":1,"noerr":0,"x":720,"y":320,"wires":[["5bea947.a4ba1ec"]]},{"id":"5bea947.a4ba1ec","type":"debug","z":"d243b84a.4ac438","name":"Domoticz Input","active":false,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":1020,"y":380,"wires":[]},{"id":"fdfef99c.3962f8","type":"mqtt out","z":"d243b84a.4ac438","name":"Domoticz In","topic":"domoticz/in","qos":"2","retain":"false","broker":"f9f13036.e28b58","x":1010,"y":320,"wires":[]},{"id":"2faec32b.cb2b74","type":"position-config","z":"","name":"","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"},{"id":"f9f13036.e28b58","type":"mqtt-broker","z":"","name":"RPI1_ MQTT_Broker","broker":"192.168.10.51","port":"1883","clientid":"","usetls":false,"compatmode":true,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closePayload":"","willTopic":"","willQos":"0","willPayload":""}]
In order to get this all to work, it is essential that Bernhard (or someone else) changes the URL in the HTTP request node to a real value, such as:
http://< IP address ECU/index.php/realtimedata and checks the output of the "html" node.


It might be, that a small change in, either the "html" node or first "function"node is necessary.

Looking forward for reactions, comments or suggestions.

Best regards.
Last edited by FireWizard on Tuesday 24 September 2019 19:01, edited 2 times in total.
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

Finally a few moments time to get to work on this.
First of all a great thank you for all your effort.

I started to work on the Node Red part.

I have this created and noticed that the "day timer" gives an error.
Image
Image

To overcome I deleted it and deployed.

I have now the output in my debug window.
Image

When selecting all an event I see that I have all 6 converters and 12 panels

["404000191265-A","34 W","50.0 Hz","235 V","20 &#xB0;C","2019-09-24 15:15:25","404000191265-B","44 W","235 V",
"404000191123-A","46 W","50.0 Hz","235 V","22 &#xB0;C","2019-09-24 15:15:25","404000191123-B","47 W","235 V",
"404000193004-A","47 W","50.0 Hz","234 V","22 &#xB0;C","2019-09-24 15:15:25","404000193004-B","46 W","234 V",
"404000191257-A","48 W","50.0 Hz","234 V","20 &#xB0;C","2019-09-24 15:15:25","404000191257-B","48 W","234 V",
"404000192992-A","48 W","50.0 Hz","235 V","21 &#xB0;C","2019-09-24 15:15:25","404000192992-B","48 W","235 V",
"404000191779-A","48 W","50.0 Hz","234 V","22 &#xB0;C","2019-09-24 15:15:25","404000191779-B","47 W","234 V"]

So the scraping looks to me like it is working :)

Now I will go and do the next steps. Will need to check later when all is working why the Day Timer is not working. Could it be a Node-Red version thing or maybe I have a library not installed that provides this functionality.

Keep you posted on my progress.

Bernard
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

FireWizard YOU ARE A HERO!!!

It works like a charm, just needed to change in Node-red the IDX numbers to match my Domoticz virtual devices and update the "Domoticz in" my IP and user/passwd. Deploy the flow and when I check in Domoticz I see the data which is also available in the AP ECU.

Image

So now I have to make a back up of it all and then sort out why I do not get the day timer to work, deleted it for now as it was giving an error, see post above.

Again many many thanks for your support, effort and patience!

Kind regards,
Bernard
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

I searched the internet and found that time switch module can be installed

npm install node-red-node-timeswitch

I did this and restarted Node-red, unfortunately still unknown.

Will dig further.

Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard,

I saw your first post today and already concluded, that it should work, because you were able to fill an array with 54 elements (each inverter has 9 elements) As you have seen, I did simplify it a little and to bring it back to 6 element per inverter.

Had plan to answer, but you already used the last posts in the thread.

Now the timer.
That easy, because your simply missing a node, because it is not one of the core nodes.

To install:
1. Open your node red editor.
2. In the right upper corner you see the menu bar, just right of "Deploy". Open it by clicking on it.
3. Go down to "Manage palette"; click on it.
4. You will see two tabs, "Nodes" and "Install".
Under the first you will find your installed nodes, under the second you can search for nodes to install.
A huge number of nodes exists.
5. The node you need is : node-red-contrib-sun-position.
6. Goto to the "Install" tab and type: node-red-contrib-sun-position.
7. You will find it and install this node (it will take some time).
8. More info you will find: https://flows.nodered.org/node/node-red ... n-position.
9. I use the "within time" node.

Remember: This node is optional and only stops the polling of the ECU during night, when there is no production.
So you can leave it away, if you desire.
This type of nodes is important if you poll a URL that has a limit on the number of calls per day/week/month.
But as the unit is your own and on your local network, it doesn't matter.

But I'm curious as well.

I see a production at 19:42 h of 0 Watt. That looks correct, as my panels stopped producing around 19:10 h, today
However I see the Voltage of Panel 1, 2, 5, 6, 7, 8, 11 and 12 equals to 0 V, while Panel 3, 4, 9 and 10 equals 232 V.
Why is that and does it match the web page of the ECU?
Also the frequency of Inverter 1 and 3 is 0 Hz, while inverter 2 is 50.1 Hz.
The others I can't see, as well as the "Temperature" sensors., but does it match the webpage?

It's funny that you followed my naming suggestions, because, as you see in my screenshots, I use Dutch names for the sensors.

Another thing:

I found in the manual that on the Home Page might be more interesting info available, such as, but not limited to,
- Lifetime generation
- Last System Power
- Generation of Current Day

It is easy to add, but in that case you have to make that web page available to me, like you did with the inverters.
And you have to indicate, what you want.
I don't see in the manual. more useful information to present in Domoticz.

For those interested in it, below find some custom icons for solar panels.
Solar.zip
(9.9 KiB) Downloaded 52 times
I hope you can publish some day a screenshot with very nice production values of your solar panels.

Best Regards
Last edited by FireWizard on Friday 13 March 2020 18:24, edited 1 time in total.
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

I hope to post a picture tomorrow of my panels in domoticz with data :)
The reason you see for 2 inverters some data is that the ECU still is listing this on the page, refresh of page does not clear. Most likely a bug in the ECU.

Image

I have build this floorplan to have one overview of my inverters and panels.

Image

So tomorrow one with data!

I will post the details of the homepage tomorrow, would indeed be great to have those details too.
Also I will check the time thing in node-red.

Again many thanks for all you have done!

Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard,

Thanks for the info. It explains, why we have those different values and that it is not caused by the Node Red flow.

You can look to the info, that you think, might be useful in Domoticz and if you can make the web page available, it is a small job to make it complete.

Awaiting your results of the production of, what seems, to be a cloudy day.

Regards
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

This morning I noticed that for the current power, the flow is only submitting one digit to Domoticz.
I used the debug on each function to see that the parse inverter is submitting value correct. When data is handled by the create inverter array one of the digit is stripped.

I looked at the code and figured this:
CurrentPowerA.substr(0,1),GridVoltageA.substr(0,3)

Gridvoltage is 0,3 so 3 digits value ?
CurrentPower is 0,1 so 1 digit value ?

I amended the CurrentPower A and B to
CurrentPowerA.substr(0,3)

That solved it :)

I now have an overview in Domoticz that matches the ECU box (low values, it is raining, no sun :( )

Image

Image

I also noticed in the Flow that I copied that the 5 min tick is not set to push every 5 min, adjusted this and two things left to do.
1 get the timer installed, although not needed I believe it is good to have, so no data is scrapped between sundown (plus 30min) and sunrise (min 30min).
2 provide details on the mainpage, that holds the:
Lifetime generation
Last System Power
Generation of Current Day

I will keep you posted,
Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard,

You wrote:
This morning I noticed that for the current power, the flow is only submitting one digit to Domoticz.
I see the problem and this has been a stupid mistake from my side. You provide me with a link to your web page and the data contained only Power Production values, that consisted of 1 digit (7, 8 and 9 W). As I only wanted that digit, without the <space>W, I took that digit.
I did not realize and have never been able to test it, that someday the Power Production would contain 2 digits or, even better, 3 digits.
I used the debug on each function to see that the parse inverter is submitting value correct. When data is handled by the create inverter array one of the digit is stripped.
You will be soon a programmer. :D
I looked at the code and figured this:
CurrentPowerA.substr(0,1),GridVoltageA.substr(0,3)
CurrentPowerA.substr(0,1) means that I take 1 digit, starting at the first digit (position 0) and that explains that you have only 1 digit.
GridVoltageA.substr(0,3) means that I take 3 digits, starting from the first position, so "232", instead of 232 V.
The last one would be ok, as long as Voltage is higher than 100 V.
Gridvoltage is 0,3 so 3 digits value ?
CurrentPower is 0,1 so 1 digit value ?
As explained, you are correct.
I amended the CurrentPower A and B to
CurrentPowerA.substr(0,3)
I assume, you did the same for CurrentPowerB?
Now we have the situation, that you get always 3 digits.
So, if the production is less than 10W, you will always get the <space> and W, so "7 W" and in case you have two digits, it will be: "45 ".
If we pass the 100 W, we will see "123".

This is not, what we want. We want the value, regardless of the number of digits.

This may also happen with the other sensors, if the temperature or frequency changes.

It means, that we should not take the digits from the first position, but that we chop the unwanted characters starting from the last position.

So, for the Power Production, we should chop <space>W and so, 2 digits.
For the Voltage, also 2 digits, the frequency 3 digits and the temperature 8 digits.

I modified Line 12 in the first function node (Create inverter array).

Old line:

Code: Select all

newMsg = {payload: ([InverterIDA.substr(0,12),CurrentPowerA.substr(0,1),GridVoltageA.substr(0,3),CurrentPowerB.substr(0,1),GridVoltageB.substr(0,3),GridFreq.substr(0,4),GridTemp.substr(0,2)])}
New line 12:

Code: Select all

newMsg = {payload: ([InverterIDA.substr(0,12),CurrentPowerA.slice(0,-2),GridVoltageA.slice(0,-2),CurrentPowerB.slice(0,-2),GridVoltageB.slice(0,-2),GridFreq.slice(0,-3),GridTemp.slice(0,-8)])}
Please, correct this line in your flow.
The "slice" command chops the number of characters starting at the end.

You can see the result in the debug node, connected to the "Create inverter array".
It should always give, regardless of the number of digits, only the value between " ". without space or any other character.
I also noticed in the Flow that I copied that the 5 min tick is not set to push every 5 min, adjusted this
Sorry, that I did not mention that in my post. During the development I had stopped the 5 min. tick as it would give me uncontrolled output, which could be disturbing.
In the very beginning I wrote however:
During development of the flow, I have "unticked" the "Inject" box, but if everything is functioning alright, you could "tick" it again.
This was to long ago, or the thread became to long.
However it is solved by:
1. Set "Repeat" to interval, and
2. Tick the box, before "Inject once after".

You can change the time values, as you feel that it is better.

If you can post a link to that main web page, I will complete it.
But it looks already very nice.

Best regards for now,
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

I have updated the line 12 in the create inverter array.
Tested it and it looks okay to me, now returning no values:
0: "404000191265"
1: ""
2: ""
3: ""
4: ""
5: ""
6: ""

Thanks for sorting that in an even better way!

As said 2 things left and as with all the second one was the simplest, get code from:
"http://192.168.2.88/index.php/home"
Link to the file:
https://mbernard.home.xs4all.nl/youless ... me.htm.txt

Screen looks like this:
Image

It would be great to have the Lifetime generation, Last System Power and Generation of Current Day in Domoticz it will give the complete picture of what the system is doing. I take it these will be then again 3 new virtual sensors in Domoticz?

Next to this the page also shows me "environmental benefits" Would be really nice to have this too if simple enough. Will enable me to convert Gallons to liters (question is are these UK or US Gallons, manual is not clear, my guess is US).

Then point 1, add the in between timer.
I installed the node-red-contrib-sun-position node, this went fine.
Then I configured it to use sunrise -45 min and sunset +45 min as in between time.
I configured longitude and latitude as per my location.
connected the in between timer and deployed it.

When I deploy I get an error message in the debug window:
"Error: Latitude and Longitude is wrong!"
This tells me that it would not be able to determine my location and set sunrise/sunset
Strange thing is that sunrise -45 and sunset +45 is shown correct.
Image

So I do not understand where this is coming from? Googled it but on the node-red-contrib-sun-position page I could not find any reference to this error.
As I see the time correct next to the day-timer I thought lets insert a tick and see what happens.
When I do this node is in error state, error message:
"internal error within-time-switch:Cannot read property 'length' of undefined"
Image

Could it be related to the format of the timestamp submitted by 5 min ticker? Checked settings but could not see anything to adjust.
For now no in between timer, it works fine without :)

Thanks again for your support!

Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard,

You wrote:
I have updated the line 12 in the create inverter array.
Tested it and it looks okay to me, now returning no values:
0: "404000191265"
1: ""
2: ""
3: ""
4: ""
5: ""
6: ""
The elements 1 to 6 are empty now. Is that correct? Is the web page also empty? Or does it give "-".
What is presented in Domoticz? (Not the floor plan), 0 W, 0 Hz, 0 oC or whatever?
Is it to your satisfaction now?
It would be great to have the Lifetime generation, Last System Power and Generation of Current Day in Domoticz it will give the complete picture of what the system is doing. I take it these will be then again 3 new virtual sensors in Domoticz?
This is possible, but Domoticz has also its own counter, where it counts the daily production.
I think we should create, but you should compare it with the Domoticz counter.
If it is double or misleading, you can always delete it.

Next to this the page also shows me "environmental benefits" Would be really nice to have this too if simple enough. Will enable me to convert Gallons to liters (question is are these UK or US Gallons, manual is not clear, my guess is US).
I look to it. I think that it are US Gallons, Do you want to have it converted to liters?
Imperial gallons (UK) are not used in the UK, since January 1, 2000.
When I deploy I get an error message in the debug window:
"Error: Latitude and Longitude is wrong!"
This tells me that it would not be able to determine my location and set sunrise/sunset
After setting your lon/lat coordinates, did you click the red "Update" button?

See the screenshots below:

Screenshot_Day Timer Config2.png
Screenshot_Day Timer Config2.png (35.28 KiB) Viewed 1626 times
And:

Screenshot_Day Timer Config.png
Screenshot_Day Timer Config.png (44.14 KiB) Viewed 1626 times
It looks like the lat/lon is empty.
Try it once more.

Regards
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hi Bernhard,

Can you connect the flow below to the output of the "5 min tick timer"?

Check the debug, and publish the results.

Code: Select all

[{"id":"a1776ce7.3be728","type":"http request","z":"d243b84a.4ac438","name":"HTTP AP Systems Overview Request","method":"GET","ret":"txt","paytoqs":false,"url":"http://192.168.2.88/index.php/home","tls":"","proxy":"","x":320,"y":80,"wires":[["f9cd660b.5528c"]]},{"id":"f9cd660b.5528c","type":"html","z":"d243b84a.4ac438","name":"Parse inverter","property":"payload","outproperty":"payload","tag":"td","ret":"html","as":"single","x":620,"y":80,"wires":[["4f709cae.43ea9c"]]},{"id":"4f709cae.43ea9c","type":"debug","z":"d243b84a.4ac438","name":"HTML Output","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"payload","targetType":"msg","x":840,"y":80,"wires":[]}]
Regards
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

The values for longitude and latitude were not empty, checked again and did do update again.
Same issue, when deploying, still gives same error on values and an internal error as soon as the first Tick is received.
Need to check what I have overlooked.

indeed the values on the page are empty so I believe the output to be correct.
I check tomorrow when there is sunshine.

Attached the flows to the 5 min ticker, seems to work below output of the debug node:
0: "ECU ID removed"
1: "5709.28 kWh"
2: "0 W"
3: "3.8 kWh"
4: "2019-09-25 23:10:55"
5: "6"
6: "2"
7: "V4.1"
8: "Europe/Amsterdam"
9: "Mac Removed"
10: "Mac Removed"
11: "5"

Kind regards,
Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hi Berhard,

Are you able to export that node?
Copy the node to the clipboard.
Download it to a file and send this file or copy paste it.

Then I will look to it.

Regards
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hello FireWizard,


Yes ofcourse, done that, but when I copy keep this in mind:
Starting from Version 2.0 the coordinates are not saved as credentials due to privacy reasons. So they no longer part of the regular flow and will not part of the export! To update from a previous version save and re-deploy is necessary.

So I did an export, and saw indeed longitude and latitude on "0" I updated this to my coordinates and imported, still same issue.
when I check I see the coordinates filled in, update and done, re-deploy gives same error.

I checked to see that new way of stripping data is working. Cannot check value's of 3 digits as no sun.

Bernard
User avatar
FireWizard
Posts: 1745
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by FireWizard »

Hello Bernhard,

I did some more research, regarding the issue with the timer node.
Do not spend more time on it.

See: https://github.com/rdmtc/node-red-contr ... /issues/57

I assume, you use 0.4.9

As you can see I'm on version 0.4.7

Screenshot_node-sun position.png
Screenshot_node-sun position.png (4.86 KiB) Viewed 1617 times
I think there are more issues, as I tried to update to 0.4.9. The update failed.
It cannot find the source.
If I try it from the command line, it installs obviously version 0.4.8.

Code: Select all

pi@RPi1:~ $ npm install node-red-contrib-sun-position
npm WARN saveError ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN enoent ENOENT: no such file or directory, open '/home/pi/package.json'
npm WARN pi No description
npm WARN pi No repository field.
npm WARN pi No README data
npm WARN pi No license field.

+ [email protected]

added 21 packages from 14 contributors and audited 503 packages in 65.1s
found 0 vulnerabilities
So, this issue has to be solved first.

Regards
Last edited by FireWizard on Thursday 26 September 2019 13:58, edited 2 times in total.
Benneton
Posts: 111
Joined: Thursday 08 December 2016 9:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: how to add APSystems ECU-3 solar inverter monitor

Post by Benneton »

Hi FireWizard,

Thanks, will give up for now, until fix has been released.
I indeed run 0.4.9.

Bernard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest