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

Post Reply
User avatar
FireWizard
Posts: 1889
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,

@n4rs

Thanks for the clear explanation.

It is clear that it is different in every country.
To give you an idea, in The Netherlands, you pay during daytime approx. 0.22 Euro/kWh and in the night and weekends it is 0.205 Euro/kWh.
It differs a little bit and depends on the contract. But the difference is much smaller than in your case.
And as said we receive the same amount as we pay. That goes automatically.

I understand that you look for a solution that is much more efficient.

I would first test it by a manual switch to see what the electrical effect is, when I move solar panels between the different phases.
But to create a circuit, where three sets of solar panels can be switched to three different phases, dependent on the consumption's is complex.
Also you should avoid that it is a continuously switching between phases, e.g. if there is a cloud or when some equipment is switched on.

But this has in fact nothing to do with APSystems Solar panels, but more with efficient use of it.

Regards
n4rs
Posts: 5
Joined: Tuesday 28 April 2020 11:11
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Portugal
Contact:

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

Post by n4rs »

That's what I said in the original post I made.
I already installed a system to change between phases with some contactors and a Sonnof 4 channel switch. I've been using it for 3 months.
I was looking into this post "how to add APSystems ECU-3 solar inverter monitor", so I can more efficiently monitor and change phases automatically (example: when I turn on a pump, or to turn on or of equipment in some phases depending on the weather).

That's why I gave the suggestion if monitoring directly with the CT's on the Raspberry Pi would be more efficient than the result of this post so far by using the data from the ECU.
User avatar
FireWizard
Posts: 1889
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,

Yes. It is more real time and probably also more accurate.

I agree with you that pulling the data from the ECU is not the best way to do it.

Regards
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

Does anybody have experience with pulling data from the ECU-R Rev4.2 unit? In this thread I have read about v4.1 and an older version. However, my unit does not respond on http://localip/index.php/home neither on http://localip/cgi-bin/home

best regards
User avatar
FireWizard
Posts: 1889
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,

According to what I see in the documentation the ECU-3 and the ECU-R are different units.
What is the URL you enter in your webbrowser, if you want to read data?

Regards
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

Hi, the ECU-R is brand new, and was supplied as monitoring device with my 5 QS1 inverters. I had not realized that the ECU-3 is a different unit. Perhaps ECU-R does not allow local inspection of the data using a web browser.
The basic functionality of ECU-R is as follows: you connect to the ECU-R once with the APS-ECU app, by connecting to the ECU WIFI hotspot. Using this smarthphone app, you can set the id's of the inverters, which communicate via Zigbee. Probably, a web server is used to serve data to the APS-ECU app using the wifi hotspot network interface. However I do not know the URL. I also do not know whether a web server is exposed through my regular LAN interface.


You can either connect the ECU-R to LAN or WLAN, and the ECU-R will transfer your Pv data to EMA. Regular inspection of data can then be done using the APS-EMA app on the smartphone. However, I would like to capture the data from the ECU-R directly.

Regards,
Benneton
Posts: 114
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,

Can you try to just type in the IP of the ECU-R in your browser and see what it returns?
Webpage with navigation or maybe an error message?
When communication is done for Zigbee from converters to ECU-R can you not add them directly via a Zigbee controller?

Regards,
Bernard
User avatar
FireWizard
Posts: 1889
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

@buzztext

I found the following at tweakers: https://gathering.tweakers.net/forum/li ... es/1990056

There seems to exist a Python script that sends the results to PV Output. This can be read by Domoticz.
Perhaps it is even possible to modify this script, in order to collect the data local.

The way, it has been done with the ECU-3, will not be possible with the ECU-R, as this unit does not provide a local web interface.
So web scraping is not possible.

It will have an IP address on your local network, as soon as you have configured it with your app.
An app to find all your IP addresses is "Fing". However there doesn't seems to be ports opened.

If you need some support, just ask.

Regards
User avatar
FireWizard
Posts: 1889
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,

@ Benneton

You wrote:
Can you try to just type in the IP of the ECU-R in your browser and see what it returns?
Webpage with navigation or maybe an error message?
It seems that the new ECU-R has no webpage available. At least I cannot find it in the documentation.
See: https://static.reto.media/focusecom/upl ... l_nl-1.pdf

Actually it means that APSystems closes its system more and more. With the ECU-3, we were able to monitor the Solar panels locally from a webpage. That is what we used for integration into Domoticz. This is not possible anymore with the newer ECU-R.
It is a small step for APSystems to launch a paid service, either for their mandatory apps or to have access to their portal.
Not what most users want, I think.
When communication is done for Zigbee from converters to ECU-R can you not add them directly via a Zigbee controller?
Why didn't we discussed that last year? By the way, does it still functioning, to your satisfaction?
Would Zigbee2MQTT be a good solution? See: https://www.zigbee2mqtt.io/.

The Micro-inverters of APSystems are not in the list of supported devices. I did not expect that, but they could be added.
If they are supported by Zigbee2MQTT, the ECU is not needed anymore and you are completely free from APSystems.
That would be an interesting option, at least for users of Home Automation Systems. What is your idea?

Regards
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

Thanks for all the feedback. I performed a port scan and there is no open port. Perhaps I should replace the ECU-R with a ECU-3 module? Does the ECU-3 support QS1 inverters?

I have been successful to pull the 5min timestamps from the EMA database into PVoutput, so I could load into Domoticz from PVoutput, or modify the script to copy from EMA into Domoticz.

I do have a zigbee stick in my Synology server, but so far it does not see the inverters.

best regards,
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

Perhaps it is better to look a bit into the APsystems EMA web client to understand their API calls (so far we can only query 5 min total energy timestamps, whereas the web client can access the individual panel data)
User avatar
FireWizard
Posts: 1889
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,

@ buzztext
Perhaps I should replace the ECU-R with a ECU-3 module? Does the ECU-3 support QS1 inverters?
I'm afraid it will not support the QS1, if it is still available. The QS1 can handle up to 4 solar panels, while the YC500i can only handle 2 panels.
I have been successful to pull the 5min timestamps from the EMA database into PVoutput, so I could load into Domoticz from PVoutput
So you are able to receive the production (via PVoutput) in Domoticz?

I would invest time to get it with that script into Domoticz or to implement MQTT. That saves the route via PVOutput.
I do have a zigbee stick in my Synology server, but so far it does not see the inverters.
The QS1 is probably not recognized by your Zigbee stick. It is the same with Zigbee2mqtt, but maybe it could be made.
Perhaps it is better to look a bit into the APsystems EMA web client to understand their API calls
Have a look at an app called "Packet Capture", to be installed on the same device as your EMA app.

Regards
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

Thanks @FireWizard.

Yes, my data is uploading to PVO by a python script (apstopvoutput.py) in crontab every 5 minutes.

Is there a python script available that sets up the domoticz sensors etc. on which I could build (basically merging both scripts)?

perhaps I could learn from your post on Monday 23 September 2019 12:05 to set up sensors. But I have no experience in connecting a datastream to these sensors.


I could look at Packet Capture, but I could also look at the HTML code of the desktop web interface (js based, seems rather complex)


best,
User avatar
FireWizard
Posts: 1889
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 »

@buzztext

You said:
Yes, my data is uploading to PVO by a python script (apstopvoutput.py) in crontab every 5 minutes. Is there a python script available that sets up the domoticz sensors etc. on which I could build (basically merging both scripts)?
Can't you use the Domoticz "hardware". which is natively available in Domoticz.
Then you do not need an extra Python script.

Screenshot_PVoutput.png
Screenshot_PVoutput.png (180.69 KiB) Viewed 3128 times

Regards
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

@FireWizard: that worked and saved me time! Is there a custom solution for a virtual sensor to compute my power consumption per 5 minutes by adding the PVO value to my reported P1 energy consumption value (which is negative in case I produce more than I consume)?

I am still considering to get real time production data using current clamps and a Flukso module (but I need two more clamps).

regards!
User avatar
FireWizard
Posts: 1889
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 »

@buzztext,

You wrote:
Is there a custom solution for a virtual sensor to compute my power consumption per 5 minutes by adding the PVO value to my reported P1 energy consumption value (which is negative in case I produce more than I consume)?
I would do that with MQTT and Node Red, as I have that system up and running, but it is a little bit overkill, specially if you don't have Mosquitto and Node Red installed. It would surprise me, if @waaren wouldn't have this solution on "stock" in a dzVents script. This is much simpler.

Regards
Last edited by FireWizard on Monday 27 July 2020 19:39, edited 1 time in total.
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post by waaren »

buzztext wrote: Monday 27 July 2020 16:54 @FireWizard: that worked and saved me time! Is there a custom solution for a virtual sensor to compute my power consumption per 5 minutes by adding the PVO value to my reported P1 energy consumption value (which is negative in case I produce more than I consume)?
Happy to look into this but first need to better understand what the question is. Can you give a bit more details. and the domoticz devices (id, types, subtypes)
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
buzztext
Posts: 7
Joined: Saturday 25 July 2020 14:37
Target OS: NAS (Synology & others)
Domoticz version: 2020.1
Location: Netherlands
Contact:

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

Post by buzztext »

@waaren

I have a P1 smart meter device, subtype energy, providing the net power consumed from the power grid. (updates every second ). The other device is PVO Solarmain, giving the produced energy of my PV panels per 5 minutes. I want to create perhaps two other virtual sensors: one: the consumed energy over 5 minutes (same interval) and another one combining both in the energy (per 5 min) consumed in my house.

regards,
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

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

Post by waaren »

buzztext wrote: Monday 27 July 2020 21:06 I have a P1 smart meter device, subtype energy, providing the net power consumed from the power grid. (updates every second ). The other device is PVO Solarmain, giving the produced energy of my PV panels per 5 minutes. I want to create perhaps two other virtual sensors: one: the consumed energy over 5 minutes (same interval) and another one combining both in the energy (per 5 min) consumed in my house.
Sorry but I still do not completely understand what the two new virtual sensors should show. That's why I did not implement the updating of these new virtual sensors yet in below script but for now only print some values in the log.

Can you please describe in more detail what you want ?

In below script I calculate the average Power usage and in house Energy usage (grid + solarpanels) between the updates of the PVO SolarMain device assuming the PVO SolarMain does show all energy generated by your solarpanels.

Can you please check the execution of the script and report back with your findings?

When not yet familiar with dzVents please start with reading Get started Before implementing (~ 5 minutes). Special attention please for "In Domoticz go to Setup > Settings > Other and in the section EventSystem make sure the checkbox 'dzVents enabled' is checked. Also make sure that in the Security section in the settings you allow 127.0.0.1 to not need a password. dzVents uses that port to send certain commands to Domoticz. Finally make sure you have set your current location in Setup > Settings > System > Location, otherwise there is no way to determine nighttime/daytime state."

Code: Select all

return
{
    on =
    {
        devices =
        {
            'PVO SolarMain',
        },
    },

    data =
    {
        grid =
        {
            initial = 0,
        },
        PVO =
        {
            initial = 0,
        },
        dDate =
        {
            initial = 0
        }
    },

    logging =
    {
        level = domoticz.LOG_DEBUG, -- change to domoticz.LOG_ERROR when all works OK
        marker = 'PVO - P1' ,
    },

--[[

I have a P1 smart meter device, subtype energy, providing the net power consumed from the power grid. (updates every second ).
The other device is PVO Solarmain, giving the produced energy of my PV panels per 5 minutes.

I want to create The consumed energy over 5 minutes (same interval)      -- Can you elaborate a bit on this ?
Combining both in the energy (per 5 min) consumed in my house. -- Is this what you see in the log ?

]]--

    execute = function(dz, item)
        local P1 = dz.devices('Power')             -- Change the string between quotes to name of your smartMeter device
        local PVO = dz.devices('PVO SolarMain').WhTotal -- Change the string between quotes  to name of your PVO Solarmain device

        local grid = P1.usage1 + P1.usage2 - P1.return1 - P1.return2

        local function getDelta(grid, PVO, dDate)
            local tDelta = {}
            tDelta.grid = grid - dz.data.grid
            tDelta.PVO = PVO - dz.data.PVO
            tDelta.dDate = dDate -  dz.data.dDate
            return tDelta
        end

        local function updatePersistentStorage(grid, PVO, dDate)
            dz.data.grid = grid
            dz.data.PVO = PVO
            dz.data.dDate = dDate
        end

        local delta = getDelta(grid, PVO, dz.time.dDate)

        if delta.dDate == dz.time.dDate then
            dz.log('No history yet. Script wil be effective next execution', dz.LOG_DEBUG )
            return
        end

        local inHouseConsumption =  delta.grid + delta.PVO
        local calculatedAveragePowerSinceLastRun = dz.utils.round(inHouseConsumption * ( 3600 / delta.dDate ))

        dz.log('Total in House usage (from grid + solarpanels) ' .. delta.dDate .. ' seconds: ' .. ( inHouseConsumption / 1000 ) .. ' kWh',dz.LOG_FORCE)
        dz.log('Calculated average power use in last ' .. delta.dDate .. ' seconds: '  .. calculatedAveragePowerSinceLastRun .. ' Watt',dz.LOG_FORCE)

        updatePersistentStorage(grid, PVO, dz.time.dDate)

    end
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Benneton
Posts: 114
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 wrote: Sunday 26 July 2020 14:29 Hello Bernhard,

@ Benneton

You wrote:
When communication is done for Zigbee from converters to ECU-R can you not add them directly via a Zigbee controller?
Why didn't we discussed that last year? By the way, does it still functioning, to your satisfaction?
Would Zigbee2MQTT be a good solution? See: https://www.zigbee2mqtt.io/.

The Micro-inverters of APSystems are not in the list of supported devices. I did not expect that, but they could be added.
If they are supported by Zigbee2MQTT, the ECU is not needed anymore and you are completely free from APSystems.
That would be an interesting option, at least for users of Home Automation Systems. What is your idea?

Regards
Hi FireWizard,

We did discuss this but my panels are updating ECU-3 via the power cable and the ECU-3 is reading panel data from it.
The solution build works still very well :) Happy user here.

Regards,
Bernard
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest