Author Topic: Enphase power monitoring  (Read 22073 times)

Offline hmspain

  • Hero Member
  • *****
  • Posts: 526
  • Karma: +16/-8
Re: Enphase power monitoring
« Reply #30 on: July 10, 2014, 07:30:26 pm »
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? :-)

Thanks!
VeraPlus, Nest Cameras (6), Siren, Hue Bulbs/Strips/Blooms (65), Fan Dimmer (6), Aeon 4-in-1s (10), Water Sensors (3), Z-Wave Switches (20), Nest Smoke/CO Protects (5), Ecobee 3, HEM Gen2s (2)

Offline gEEk

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #31 on: September 20, 2014, 01:36:30 am »
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:

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

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.

Cheers
« Last Edit: September 20, 2014, 01:41:59 am by gEEk »

Offline robertgabrielson

  • Sr. Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #32 on: February 18, 2015, 03:43:07 pm »
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://<your monitor up>/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.

Offline robertgabrielson

  • Sr. Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #33 on: February 18, 2015, 04:27:18 pm »
Well, I went ahead and made the changes to use the new API - much cleaner without all of the error handling needed for units.

« Last Edit: February 19, 2015, 12:08:39 am by robertgabrielson »

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #34 on: February 21, 2015, 08:17:44 am »
Thanks Robert,

This is a lot cleaner interface indeed.

Cheers Rene
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline elordude

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +1/-0
Re: Enphase power monitoring
« Reply #35 on: February 21, 2015, 05:14:41 pm »
This is great - I was not aware of the local API - thanks for cleaning up my code ;)

Harry

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #36 on: February 22, 2015, 06:04:26 am »
@robertgabrielson

I have installed your file and it works perfect
However there is a lay-out error in the Devices view (UI7)

I tried to correct this in the D_Envoy.json file but so far without succes.
Im I looking in the right direction?

"Control": [
            {
               "ControlGroup":"1",
               "ControlPair":"1",
               "ControlType":"label",
               "top": 0,
               "left": 0,
               "text_align": "left",
               "Label": {
                  "lang_tag": "power",
                  "text": "Power :"
               },
               "Display": {
                  "Top": 60,
                  "Left": 50,
                  "Width": 85,
                  "Height": 20
               }
            },
            {
               "ControlGroup":"1",
               "ControlPair":"1",
               "ControlType":"variable",
               "top": 0,
               "left": 0.5,
               "text_align": "right",
               "Display": {
                  "Service": "urn:micasaverde-com:serviceId:EnergyMetering1",
                  "Variable": "Watts",
                  "Top": 60,
                  "Left": 190,       // should this be modified?
                  "Width": 55,
                  "Height": 20
               }
            },
            {
               "ControlGroup":"1",
               "ControlPair":"1",
               "ControlType":"label",
               "top": 0,
               "left": 1.5,
               "text_align": "left",
               "Label": {
                  "lang_tag": "watts",
                  "text": "W"
               },

Offline robertgabrielson

  • Sr. Newbie
  • *
  • Posts: 27
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #37 on: February 22, 2015, 10:32:50 am »
Noticed this too, i'm a Lua newbie so trying to figure it out myself.  Yes, I believe thats the right area.  Ill keep plugging away at it.

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #38 on: February 22, 2015, 05:29:48 pm »
I Think I have found it.
The control group column controls the location

   {
               "ControlGroup":"1",
               "ControlPair":"1",
               "ControlType":"variable",
               "top": 0,
               "left": 1,                       // Changed from 0,5 to 1 resulted in better positioning
               "text_align": "right",
               "Display": {
                  "Service": "urn:micasaverde-com:serviceId:EnergyMetering1",
                  "Variable": "Watts",
                  "Top": 60,
                  "Left": 190,         // This one controls the location on the detailed display
                  "Width": 55,
                  "Height": 20
               }

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #39 on: February 23, 2015, 07:13:55 am »
Hi,

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.

Cheers Rene.
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #40 on: February 23, 2015, 12:49:10 pm »
Bingo,
Thanks Rene.
I have set the scene groups from "6" to "3"
After that it still was not correct and I modified the control group 2 and 2 "left" from "0.5" to "1" and "1.5" to "2"
Result as you predicted
Chapeau,
Jacob

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #41 on: February 23, 2015, 12:51:42 pm »
This is the updated file

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #42 on: February 24, 2015, 05:03:19 pm »
Hi,

25 Feb, updated I_EnvoyPower1.xml to use standard dkjson library making file smaller.

I took the latest api from you guys and took a bit of a different approach. To turn a standard looking PowerMeter device into one that shows the Envoy data. Why? Because both the Vera and more so all mobile apps are good at displaying the standard devices, but not at any non-standard ones. For example the Envoy so far would not even show in ImeriHome or with very limited options in AutHomationHD or the Vera app. You will also get all the Notification and Scene trigger options of the standard PowerMeter for free. Last bonus is no JSON layout problems  ;D.

Cons; it looks like a standard PowerMeter so you will only see the current power and a KWH value. For the latter I used the daily production value, but you could map it to the week or lifetime values if you like by tweaking the code. To see the Week KWH and LifeTime values you have to look at the Advanced settings.

So how to install?
- Upload the I_EnvoyPower1.xml file attached here.
- Then Create device with the following:
  • Description = Envoy (or what you like)
  • Upnp Device Filename = D_PowerMeter1.xml
  • Upnp Implementation Filename  = I_EnvoyPower1.xml
  • IP Address = Your Envoy's IP address (you can also set it later)

Reload your device and done. This can be used in parallel with the ENVOY plugin. I tried this on UI5/6 and UI7.

Let me know what you think about this approach.

Cheers Rene
« Last Edit: February 25, 2015, 03:19:34 pm by reneboer »
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #43 on: February 25, 2015, 10:13:18 am »
Hi Jacob,

I just wanted to search on your Enphase forum about the http://<your monitor up>/api/v1/production API to find that the forum is gone  ???. Bummer as I could find a lot of useful information there also from your answers, even to my questions  ;). Critical views as well just as it this forum, but that keeps a company on its tows I think.

Any way, do you know what the update frequency of the current power is? Is that updated each 60 seconds just as on the web page?

Cheers Rene
 
2xVeraLite, VeraEdge, openLuup, ALTUI, 20 switches, 10 dimmers, 20 sensors, 10 scene controllers, 1 Harmony Hub, many plug-ins. Not enough time.

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #44 on: February 25, 2015, 12:30:40 pm »
Hello Rene,
Yes your right the forum is gone?
I did not visit is for quite a while.
I am not home during the week so I can't check but I thought the update to the Internet is 5min
I think the Envoy update is the same.
Ill check during the weekend
Also then Ill install and test your different approach
Jacob