enphase envoy with (HTTP) interface

Moderator: leecollings

TurboX
Posts: 40
Joined: Wednesday 07 September 2022 9:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by TurboX »

Ok thanks.

I only need to remove the domoticz.sh file or the whole of the dev-domoticz folder?
TurboX
Posts: 40
Joined: Wednesday 07 September 2022 9:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by TurboX »

I removed the folder, git pull, imported the modified enphase file and make. I confirm your code works.

Before you make the commit, is it possible for you to add a power device for production and consumption. It can be seen as a duplicated/useless sensor but with these power sensors, it calculate automatiquely the max power along the year and for me it's a guide to detect power losses or problem. Same request for a switch which represent if the gateway respond or not (to detect problem or reboot, then send notification). I know that it's possible with Dzvents but not so easy for all Domoticz users and probably less efficient
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

Commit is already done
No new devices will be added as we do not want duplicate devices. As you mention, this can be done via dzVents
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hello,
I have some issue with latest Enphase plugins because of firmware update recently to version 7
So I did update my Domoticz version to a recent one : 2023 .1 Hash : f9b9ac774.
I'm using NAS Synology and docker.

So With this update, I have noticed that the return value is not correct for production and net conso (even worst, the counter decrease when value are negative, so something wrong)

My Enphase is a metered one.
I wasn't able to post my log :( (from different JSON URL) I will try to attach a TXT file for it !

In older version of firmware I was also using an older Domoticz version with Node-RED that getting information all seconds (without breaking Envoy because this URL update itself), and here again, I can't post URL or log :(

This stream URL is fast, and the value are correct and update quickly.
Maybe this can be added to the plugins ?

Otherwise, I have installed the beta version from today on Windows (it's less difficult for me to test current beta code on Windows for me) but it doesn't work at all, and I'm getting those errors messages :

Thanks, I did try to build Domoticz from source on Windows, but It's missing something :(
I hope you can read the attached file :D

Seb.
Attachments
Domoticz_Post.txt
(11.99 KiB) Downloaded 501 times
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

In the latest beta versions, for the metered version we use the values of root["production"][1] instead of root["production"][0]
(See EnphaseAPI.cpp, function parseProduction)
Apparently was way more accurate.
Please give it a day and see if the values tomorrow are better. There seems to be a difference
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hi @gizmocuz,

I have tested the latest (Windows) beta version, but there is an error on JSON.
Did you look the attached txt at my previous post ?

It seems that I didn't have root["production"][1 in JSON return right?

Edit : Linux Docker version works but counter is decreasing when there is export to ouside the house.
Last edited by Sebastiii on Wednesday 12 July 2023 18:57, edited 1 time in total.
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

So I have installed, the latest beta on my NAS, and this time, the Enphase plugin works not like the Windows version.
I will let running to see how it goes, but something is very strange, when energy is exported out the grid like this (can't post image link, so I have attached it)

The counter decrease, in the photo, it gives (why I can't write values ???, on Enphase net-consumption, the counter increase the negative value), it shouldn't do that, if value are negative, the energy is give outside, in France, I give it for free, so this counter act like my current power consumed (from the night for ex) is decreasing, this is wrong :o

This counter should have the same value as my Linky counter, I eventually can understand that if I'm getting battery but even here I'm not sure.

Thanks.

@gizmocuz, I can't even quote your post, I have a warning about : "You can’t post image, email or url links that are external to this domain. Please remove EnphaseAPI."
Attachments
Domoticz-2023-07-12 173646.jpg
Domoticz-2023-07-12 173646.jpg (70.86 KiB) Viewed 25575 times
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hi :D ,

So it seems to work better on latest version, but, it could be nice to have an option on "Enphase net-consumpsion" to do not decrease the counter when it's negative (when doing export out the house).

On my side, this counter should have the same value as the Teleinfo Linky counter, when power is going outside, I don't keep it and have no fee on it.
Thanks.
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

Hi, sorry I don't have a metered Envoy. You mean that all negative values should be made positive?
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

gizmocuz wrote: Friday 14 July 2023 13:20 Hi, sorry I don't have a metered Envoy. You mean that all negative values should be made positive?
Don't worry, so in fact, the counter, the one that show (-0.038), It should be not decrease or increase when power is negative (like -300W for example), if values are negative or 0, then act like it 0, the counter should stay and don't decrease.

It could be nice to have an option for this, because, I pretty sure for other people for ex that have battery or sell power when going outside the house, want to have the counter decrease, to know the real net power.

Sorry about my language or explanation, I just that I'm enough clear :D
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

@Sebastii, could you check beta 15420.

In this version the net-consomption should be positive. It's strange that Enphase reports this as negative.
Sure it is a negative feeling, but it is what it is... just consumption.
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

gizmocuz wrote: Friday 14 July 2023 13:58 @Sebastii, could you check beta 15420.

In this version the net-consomption should be positive. It's strange that Enphase reports this as negative.
Sure it is a negative feeling, but it is what it is... just consumption.
I will test, but to be sure that we understand it right together, the negative value from the wattage is ok.

Image

In the above image, we can see that we have : "-1566 Watt" as reported, this is correct behavior, this means that there is export out the house and I use with a script to detect this negative value to know if I can start an electrical outlet to control a for ex air conditioner :)

So this value need to be reported as negative when is export 👍

But the counter where is indicated : "0.590 kWh" should not decrease when a negative watt is running (exporting power outside the house).
In fact, this counter (0.590 kWh) should have around the same counter number of LinkyStdMode : (7.715 kWh), right now, the counter mismatch because when the "Watt" is negative like right now, this counter decrease !

Image

As you can see while I'm writing the answer, the counter decrease again ! It's now "0.412 kWh" (in fact, it should not decrease when the Watt are negative)
So your latest change goes like I'm explaining above ?

Thanks for all already :D
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

Could you test with beta 15420? They should both be (normal) positive. As you can see in you current/old version graph, the chart never goes above 0
This is the value that your house consumes ... should be positive. You can check it with your script if it is above 0
(At least, I never have seen it above 0)
So with the latest beta, all is made positive here
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

gizmocuz wrote: Friday 14 July 2023 16:07 Could you test with beta 15420? They should both be (normal) positive. As you can see in you current/old version graph, the chart never goes above 0
This is the value that your house consumes ... should be positive. You can check it with your script if it is above 0
(At least, I never have seen it above 0)
So with the latest beta, all is made positive here
Thanks, I'm currently testing it, the value is positive now effectively, but the counter continues to decrease !

Image

After few seconds :

Image

We can see the counter decrease : from "-0.165 kWh" to "-0.181 kWh"

Btw, In my Enphase current configuration, I didn't set a zero profile export, because I want to export my production if I can't catch all, maybe this is why you didn't get negative value on your side.

So yes, know if we have above 0, it means it export or have power to be used from a power device. (but in fact not, if you look at my next post)
Are you able to not decrease the counter then now ?

Thanks ;)
Last edited by Sebastiii on Friday 14 July 2023 16:42, edited 2 times in total.
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

@gizmocuz

I have look into Enphase website (installer) the value is always reported as positive, but there are another indication, that make all the difference :
- Export to grid (when the value is detected as negative before your latest change in Domoticz)
- Import from grid (when the value is positive before your latest change in Domoticz)

Grid is an electrical supplier.

So the latest change is not correct because, we can't know if it's Export or Import from Domoticz.
The only way to know is to see the negative value, this means, we export to Network and in final the counter shouldn't move when we export to network.

Exporting to grid (so negative value)
Image

When I consume more than the production permit, it indicates : "Importing from Grid"

Image

If we keep value as positive, then we should indicate if it's an export or import, but to use on script, it will be worst to code I think !
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hello,
So I can confirm no negative value but that not correct finally because positive value can be exporting or importing, so we can't know it anymore !
I hope you are following me 🤞
Thanks.
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hello,
So maybe we have to do only this ?

Code: Select all

std::string szName = "Enphase " + itt["measurementType"].asString();
		int musage = abs(itt["wNow"].asInt());
		int mtotal = abs(itt["whLifetime"].asInt());
		if (mtotal > 0)
		{
			SendKwhMeter(m_HwdID, iIndex++, 255, musage, mtotal / 1000.0, szName);
		}
Only update counter when it's positive and let negative value because it's to indicate that we are exporting ! (because here we talk about net consumption and not production)

What do you think ?
Still, maybe this need on option because if in other country, all export is automatically sell as 1 kWh export = 1 kWh import then here it can be logic to have the counter decrease when we export !

On my side, I didn't sell it
Thanks.
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

Hello !
Like I can't build source on Linux, I'm trying on Windows and I can have a Domoticz.exe but when running it, I'm getting those errors :

Code: Select all

2023-07-17 08:52:32.941 Status: Enphase: Connected, serial: 122125XXXXXX, software: D7.6.175
2023-07-17 08:52:33.207 Error: Enphase: Error getting http data! (check_jwt)
2023-07-17 08:52:33.428 Error: Enphase: Error getting http data! (check_jwt)
2023-07-17 08:52:42.101 Error: Enphase: Invalid data received! (production/json)
2023-07-17 08:52:44.439 Status: [web:8080] Incoming connection from: 127.0.0.1
2023-07-17 08:52:50.786 Error: Enphase: Invalid data received! (production/json)
So I can't test the above code modification on my side, do you know why it doesn't work ?

PS : Official beta installer give the same as the build from source !
User avatar
gizmocuz
Posts: 2350
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: enphase envoy with (HTTP) interface

Post by gizmocuz »

Okey, I leave the counters as it is reported. Beta 15436 is not touching it anymore
Quality outlives Quantity!
Sebastiii
Posts: 33
Joined: Wednesday 12 July 2023 13:50
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Location: France
Contact:

Re: enphase envoy with (HTTP) interface

Post by Sebastiii »

gizmocuz wrote: Monday 17 July 2023 13:34 Okey, I leave the counters as it is reported. Beta 15436 is not touching it anymore
Great going to test right now and report back.
Thanks :D
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest