It took some time but I think I have found and solved the errors in the ENVOY PV read-out plug-in by elordude
I have modified the files D_ENVOY.json and I_ENVOY.xml
As far I could check today the figures Current power, Energy today, Energy this week and Energy lifetime are correct imported.
I also managed to show the first tree figures in the device
There is still a field “System uptime” that is empty but I did not spend any time on that yet
Installation of the attached files via:
APPS/Develop APPS/Luup files
Upload the files from your computer
Check the box “Restart Luup after upload”
Then:
APPS/Develop APPS/Create device
Fill in the name of your device e.g. Envoy in the field Description
Fill in D_ENVOY.xml in the field Upnp Device Filename
Finally fill in the IP address of your Envoy in the appropriate field in the new created device
This is awesome! Thanks for fixing my crappy code - works much better now - I was learning how to code in Lua (still learning) while creating this plugin. This plugin + Datamine are the best
Is there a way to expose the variables such that they can be used a triggers in a scene?
It would be nice to do something like
If power>1000 then turn on X
I don’t live in a net metering state so I need to match my power production to consumption. So if my power production exceeded my base usage I could turn on various appliances while my production is high enough.
Hi,
I added the Life time and System up time readings and made some better handling incase some values are in Wh instead of KWh. Also made the control look a little cleaner with UI5.
As this was my first ever lua coding it took me hours more than I expected, but it works
elordude, Jacob, reneboer:
Thank you so much for sharing your efforts with the rest of us.
I’m using the latest files uploaded here, but there appears to be a bug with “This Week” and “Lifetime Energy” numerical values being the same (“This Week” not correct). Can anyone confirm/fix? Thanks.
I have the same issue i will take ca look at the code and come up with a fix - it might take me few days since I have to test it during the day when there is solar power
I remember seeing this for a short moment as well, but it cleared for some reason ???. Are you still seeing it after a reload?
The only minor tweak I made since this version is on the uptime string, adding - 1, but that is just cosmetic:
local SysUpDate = string.sub(ENVOY_Raw,s_end,ut_end - 1)
I am still seeing it after reboot. The way I installed it was to follow Jacob’s instructions, using two of those files, and the other two from reneboer’s post.
I’m excited to get my Enphase solar tied in with my Vera. I uploaded the four files (and the two updates), created the generic device, added the device name and IP address of the Envoy… but still nothing. I added the DataMine app, still nothing. I feel like such a NOOB.
Could someone step through the install of everything ??? … slowly?
I got my Enphase/Envoy system installed yesterday and was thrilled to see you guys have developed this. I tried to follow these instructions to the letter:
[quote=“Jacob, post:21, topic:171972”]Hi,
It took some time but I think I have found and solved the errors in the ENVOY PV read-out plug-in by elordude
I have modified the files D_ENVOY.json and I_ENVOY.xml
As far I could check today the figures Current power, Energy today, Energy this week and Energy lifetime are correct imported.
I also managed to show the first tree figures in the device
There is still a field “System uptime” that is empty but I did not spend any time on that yet
Installation of the attached files via:
APPS/Develop APPS/Luup files
Upload the files from your computer
Check the box “Restart Luup after upload”
Then:
APPS/Develop APPS/Create device
Fill in the name of your device e.g. Envoy in the field Description
Fill in D_ENVOY.xml in the field Upnp Device Filename
Finally fill in the IP address of your Envoy in the appropriate field in the new created device
Regards,
Jacob[/quote]
But when I restart the system I see the following error:
Envoy[113] : Startup Lua Failed
The device shows the today power in kWh but no data is shown for the Power or This week. I am running UI7 right now and am pretty new to device creation and luup. What am I doing wrong? Any help will be greatly appreciated.
I just worked on installing the same plugin and had the same issue. Finally sorted it out to a change in the formatting of the web site reporting the data figures. I have made corrections to the I_Envoy.xml file.
Also, while researching the issue discovered that an API call now exists for the monitor locally - provided you have upgraded the firmware. Site address is
http:///api/v1/production
This would be a much cleaner way to get the data. I plan on making the change to this code when I have time.
There is a significant difference between UI5/6 and UI7 in this. Before the default width of a scene group was 3 button witdths, i.e. “x”: “3” even if you set it to 1, 2 or 6. And if you want to make it wider, the device on the panel had to get wider as well (“x”>“4” in the top definition) else the values would not be shown.
However, with the new UI7 layout, the width of the device is fixed. Now the scene group x means the number of columns you like to use and you can make it 1, 2, 3 or 15. The higher the number of columns, the narrower they get. If you now position a control in the control group mapping to that scene group you place the control relative of the number of columns. Example will help;
SceneGroup “x”: “1”, means you can use a value between 0 and 1 from left to right.
SceneGroup “x”: “3”, means left 0 -1 is first column, 1-2 is second and 2-3 is third, but still on that same left to right width.
I think the quickest and most compatible change is to SceneGroup with “id”: “1” and change “x”: “6” to “x”: “3”. I cannot test my assumption right now, but give it a shot.