enphase envoy with (HTTP) interface

Moderator: leecollings

User avatar
gizmocuz
Posts: 2394
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 »

@Sebastiii, are you using firmware 7+?

As this call was not working last time I checked:

https://ENVOYIP/stream/meter

@AintBigAintClever ,

There was a extra kWh counter that was not necessary. That is why it has been removed.
You should have all available info from the hardware
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2394
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 »

TurboX wrote: Thursday 20 July 2023 13:20 There is this project too https://github.com/vk2him/Enphase-Envoy-mqtt-json
Why would you need this? The native hardware in Domoticz works correct and does even more ;)
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 31 July 2023 11:15 @Sebastiii, are you using firmware 7+?

As this call was not working last time I checked:

https://ENVOYIP/stream/meter
Hi 👍
Yes but was working too with 5 firmware before, it seems to be specific with Envoy S metered version.

Can you get information from URL (IVP)?
https://ENVOYIP/ivp/meters/readings

With this one but ned'ed to keep production.json too.
We have a proper counter for net power, it means when exporting counter as is.

Look at my post here :
viewtopic.php?p=304972#p304972

Thanks 🙏
User avatar
gizmocuz
Posts: 2394
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 »

Firstly, you are probably using a metered envoy.
The negative values you see are actually a one-on-one copy from the envoy.
It just reports this way.
I also don't think there is anything wrong with this.

Can you compile Domoticz yourself?
Change the code a bit, find the following line in the Enphase.cpp file

Json::Value reading = (bIsMeteredVersion) ? root["production"][1] : root["production"][0];

Now add this just before this line:

bIsMeteredVersion = false;

Then compile

This should bring back the previous behavior that someone wanted to be changed.

I also think that the "ivp" url calls need you to have installer rights, while the normal calls you can also execute with normal user rights.
Which is of most important to some users as you might understand.
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
Yes, I'm using metered version, sorry to didn't saying it.

On fact that would be great.
Is to have some configure option depend of hardware owner configuration.

Yes I'm able to compile not right now but I can test for sure and thanks.

I will be back to you after testing can take time because I'm in convalescence

Tapatalk
Last edited by Sebastiii on Monday 31 July 2023 14:37, edited 1 time in total.
User avatar
gizmocuz
Posts: 2394
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 »

@Sebastiii , thanks I will wait for your testing ;)
Hope you recover quickly!
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 »

Thank you @gizmocuz
I will surely do the testing in the week because I need to move a little and it will me force (in good way) kind of good motivation

Tapatalk
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 »

gizmocuz wrote: Monday 31 July 2023 11:17
Why would you need this? The native hardware in Domoticz works correct and does even more ;)
Hello,

I have explained my point of view here viewtopic.php?p=305064#p305064

Moreover the stream can give positive and negative cumulative energy for each Current Transformer. If I want to measure the voltage, it's easier to add by myself with this kind of plugin than modify and compile from source.
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 »

TurboX wrote: Tuesday 01 August 2023 10:31
gizmocuz wrote: Monday 31 July 2023 11:17
Why would you need this? The native hardware in Domoticz works correct and does even more ;)
Hello,

I have explained my point of view here viewtopic.php?p=305064#p305064

Moreover the stream can give positive and negative cumulative energy for each Current Transformer. If I want to measure the voltage, it's easier to add by myself with this kind of plugin than modify and compile from source.
Salut 😁
Hi, I can confirm that I'm able to have a proper counter value by creating a counter instant device configured as computed, to have it working at 100 % it's important to have data always filled.

But in computed mode when value is negative, the counter decrease, in this case for us, it's not correct.

So in final in a day with a lot of export the net counter doesn't match the linky enedis TIC information because the device created decrease.

And using IVT url, enphase give a counter that doesn't decrease like production.json (still need to test the code to compile that I didn't do yet)

So for now the node red configuration with stream and production and IVT permit to have something working on my side with my metered envoy.

So yes if we can have something to be able to setup in an advanced mode on default plug-ins, it would be great and avoid nodered/mqtt setup.

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 »

gizmocuz wrote: Monday 31 July 2023 11:33 Firstly, you are probably using a metered envoy.
The negative values you see are actually a one-on-one copy from the envoy.
It just reports this way.
I also don't think there is anything wrong with this.

Can you compile Domoticz yourself?
Change the code a bit, find the following line in the Enphase.cpp file

Json::Value reading = (bIsMeteredVersion) ? root["production"][1] : root["production"][0];

Now add this just before this line:

bIsMeteredVersion = false;

Then compile

This should bring back the previous behavior that someone wanted to be changed.

I also think that the "ivp" url calls need you to have installer rights, while the normal calls you can also execute with normal user rights.
Which is of most important to some users as you might understand.
I did quickly try but I'm not able to connect to enphase from Domoticz, I have noticed that when working on Node-Red, it's like token for commissioned device on Node-Red side has blocked the one from Domoticz and not sure why (except, that I'm generating a lot of token but it"s working on Node-Red) !

Image

Will retry later :)
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 :)
@gizmocuz

I wasn't able to make Enphase native plugin working anymore, it seems to be related to how token is getting on Node-RED, like it was renewed all 15 seconds, it breaks something.

Still I was able to look at production[0] or [1], and on metered version, I must use production[1] and consumption[1] too, the value in [0] are not correct, it doesn't match, If I didn't make an error.

And Enphase counter decrease !
berkrub
Posts: 4
Joined: Sunday 17 December 2023 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by berkrub »

Hi!

First of all, thank you for your work on this great home automation package!
I am a happy user for years now.

However, since july, my Enphase Metered is not reporting anymore, and yesterday I finally found the time to dive into it.
The below post set me on the right track.
gizmocuz wrote: Monday 31 July 2023 11:33 Firstly, you are probably using a metered envoy.
The negative values you see are actually a one-on-one copy from the envoy.
It just reports this way.
I also don't think there is anything wrong with this.

Can you compile Domoticz yourself?
Change the code a bit, find the following line in the Enphase cpp file

Json::Value reading = (bIsMeteredVersion) ? root["production"][1] : root["production"][0];

Now add this just before this line:

bIsMeteredVersion = false;

Then compile

This should bring back the previous behavior that someone wanted to be changed.

I also think that the "ivp" url calls need you to have installer rights, while the normal calls you can also execute with normal user rights.
Which is of most important to some users as you might understand.

Actually,

Code: Select all

root["production"][1]["whLifetime"]
return 47 in my case. I guess it ever had a reading but it is not updated.
But since it is > 0, domotics uses:

Code: Select all

root["production"][1]
instead of

Code: Select all

root["production"][0]
By changing the test to

Code: Select all

bIsMeteredVersion = root["production"][1]["whLifetime"].asInt() > 1000;
it works again for me.

My question is: can we find a solution that works for everybody?
The nicest way is if we would have a setting "Enphase Metered" in the hardware setup, which tells Domoticz to use the first or second array index.

I am willing to make a patch to implement something like that, I somebody can show me the direction where to add such a setting?
Otherwise, what would be an alternative approach?

Thanks again,
Berkrub
User avatar
gizmocuz
Posts: 2394
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 »

@Berkrub, that would indeed be a good solution... but it could break existing installations as now it is automatically being detected.
So to understand correctly, you do have a metered envoy, but you are not using CT Clamps?
You are on the latest firmware (7+) and also powered off and on the device ?

Feel free to make a patch. Please use Mode3 as its default 0 (and make 0 the value for the standard envoy)
Quality outlives Quantity!
berkrub
Posts: 4
Joined: Sunday 17 December 2023 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by berkrub »

Hi Gizmocuz,

Yes correct, I have a metered Envoy, and am not using the CT Clamps.
But no, the firmware version is D5-0-34. I have contacted Enphase support, but they wouldn't trigger an update since that is not available for my region.

I was thinking to make Mode3 default '1', and call it something like "Read metered values".
In that case nothing changes to the default, and in case it is not workng for somebody they can uncheck it.

A question for me: I made a branch of development. Is development the branch whene the beta releases are build from?
berkrub
Posts: 4
Joined: Sunday 17 December 2023 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by berkrub »

What I was just asking myself: is it all possible to define Mode3 with a default value other than 0?
Otherwise I'll flip the setting so that it disables reading measured values, if Mode3 is set.
User avatar
gizmocuz
Posts: 2394
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 »

Development is indeed the active branch
mode3 is currently 0, so when you use this, all current users have no issue

You should be able to update yourself to the latest firmware (V7)
Quality outlives Quantity!
berkrub
Posts: 4
Joined: Sunday 17 December 2023 13:30
Target OS: Linux
Domoticz version:
Contact:

Re: enphase envoy with (HTTP) interface

Post by berkrub »

Mode3 set to 'true' forces Domoticz now to read from 'production[0]', in case of a Envoy-S Metered.
I created a pull request for this change.
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: enphase envoy with (HTTP) interface

Post by Xavier82 »

Hi,

I have some strange behaviour since 2024.1 version.
I use the 2 hardware applications (Native Domoticz hardware and the Python Plugin with P1 meter).
Envoy_Domoticz_diff.png
Envoy_Domoticz_diff.png (18.78 KiB) Viewed 2179 times
The left one is the device from the Native hardware, the right one is the device based on the Python Plugin with P1 meter.
As can be seen on the left one it shows me a production of 30.706kWh.... There was no/very little sun today so this is not possible.
The right device (P1) shows the correct value.

Settings of the left device (native hardware):
Envoy_Domoticz_native_settings.png
Envoy_Domoticz_native_settings.png (18.42 KiB) Viewed 2179 times
Any body any idea what is going on here?
User avatar
gizmocuz
Posts: 2394
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 be a counter issue, as the native uses a different counter from the Envoy
Tomorrow it will be OK
Quality outlives Quantity!
Xavier82
Posts: 178
Joined: Tuesday 07 June 2016 22:09
Target OS: Raspberry Pi / ODroid
Domoticz version: 2023.2
Location: Netherlands
Contact:

Re: enphase envoy with (HTTP) interface

Post by Xavier82 »

Thanks for the quick reponse!
I will wait then till tomorrow.
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 0 guests