Author Topic: Enphase power monitoring  (Read 22074 times)

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #15 on: November 29, 2012, 02:38:46 pm »
Ha, Great, Thanks guy's.
Installed the plug-in and it work's

This is a good example for me to start learning the LUUP programming
I did have a problem with "Past week" and "Since installation" KWH

I modified the file I_ENVOY.xml

local s_start, s_end = string.find(ENVOY_Raw,"Today")
            local TPOWER = string.match(ENVOY_Raw,"%d+%p%d+",s_end)
            local s_start, s_end = string.find(ENVOY_Raw,"Past Week")
            local WPOWER = string.match(ENVOY_Raw,"%d+%p%d+",s_end)   Changed "TPOWER" to "WPOWER"
            local s_start, s_end = string.find(ENVOY_Raw,"Since Installation")
            local LFTPOWER = string.match(ENVOY_Raw,"%d+",s_end)             Changed "%d+%p%d+" into "%d+"

With 500 KWH the Lifetime value of my system returned the date 2007-2012 also on the Envoy web page

This gave the right figures.
I will now try to find out how to be prepared for decimals and installation of child devices

Thanks,
Jacob
« Last Edit: November 29, 2012, 02:43:39 pm by Jacob »

Offline wale636

  • Newbie
  • *
  • Posts: 16
  • Karma: +1/-3
Re: Enphase power monitoring
« Reply #16 on: December 17, 2012, 12:40:56 am »
Thanks for this plugin, it worked like a Charm. Are you going to create a plugging app for this?
« Last Edit: January 06, 2013, 03:48:40 am by wale636 »

Offline scott in NH

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +3/-1
Re: Enphase power monitoring
« Reply #17 on: December 30, 2012, 04:05:11 pm »
Can someone describe the install process for this plug in?  Thanks so much!

Scott

Offline strangely

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3722
  • Karma: +34/-2
  • Vera 1,3 & V light
Re: Enphase power monitoring
« Reply #18 on: January 08, 2013, 04:44:35 pm »
Ha, Great, Thanks guy's.
Installed the plug-in and it work's

This is a good example for me to start learning the LUUP programming
I did have a problem with "Past week" and "Since installation" KWH

I modified the file I_ENVOY.xml

local s_start, s_end = string.find(ENVOY_Raw,"Today")
            local TPOWER = string.match(ENVOY_Raw,"%d+%p%d+",s_end)
            local s_start, s_end = string.find(ENVOY_Raw,"Past Week")
            local WPOWER = string.match(ENVOY_Raw,"%d+%p%d+",s_end)   Changed "TPOWER" to "WPOWER"
            local s_start, s_end = string.find(ENVOY_Raw,"Since Installation")
            local LFTPOWER = string.match(ENVOY_Raw,"%d+",s_end)             Changed "%d+%p%d+" into "%d+"

With 500 KWH the Lifetime value of my system returned the date 2007-2012 also on the Envoy web page

This gave the right figures.
I will now try to find out how to be prepared for decimals and installation of child devices

Thanks,
Jacob

So I made these changes, and presuming  I changed them correctly... while it fixed the display glitches where text was overlapping, it seems that Energy Week and Today are showing the same figure (Today's generation).

Anyone else have Last Update being populated?
Kwickset locks, HA01C, HA14C, HA02C, HA03C, HA05C, HA04C, HA07C, HA09C, Aeon HEM, GE 45604, 45606, 45609, ZDP100, VRF01-1LZ, WDTC-20, HA18WD, WDHA-12R, HRDS1, HM-TS001, AC1-ZW, TV-IP110, BL-C210A, LUUP control- EtherRain8, DSC Alarm, HDMI matrix, HR24-200, Panasonic TV, SQblaster

Offline Peter

  • Jr. Member
  • **
  • Posts: 95
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #19 on: January 21, 2013, 05:44:39 pm »
Same here, today and "energy this week" are always the same :(

Offline Jacob

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +1/-4
Re: Enphase power monitoring
« Reply #20 on: February 10, 2013, 01:02:38 pm »
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

Offline elordude

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +1/-0
Re: Enphase power monitoring
« Reply #21 on: May 28, 2013, 10:20:23 pm »
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

regards
Harry

Offline rearden

  • Sr. Newbie
  • *
  • Posts: 48
  • Karma: +0/-0
Re: Enphase power monitoring
« Reply #22 on: October 16, 2013, 04:59:04 pm »
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.

Offline futzle

  • Beta Testers
  • Master Member
  • *****
  • Posts: 3258
  • Karma: +191/-9
Re: Enphase power monitoring
« Reply #23 on: October 17, 2013, 01:07:02 am »
Some combination of the Power Arithmetic plugin, PLEG and/or Combination Switch should do the job.

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #24 on: March 06, 2014, 11:17:18 am »
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  ;)

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

Online kkl

  • Sr. Member
  • ****
  • Posts: 343
  • Karma: +1/-1
Re: Enphase power monitoring
« Reply #25 on: April 15, 2014, 10:15:09 am »
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.


Offline elordude

  • Sr. Newbie
  • *
  • Posts: 39
  • Karma: +1/-0
Re: Enphase power monitoring
« Reply #26 on: April 15, 2014, 06:44:58 pm »
KKL,

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

regards
Harry

Offline reneboer

  • Beta Testers
  • Hero Member
  • *****
  • Posts: 1419
  • Karma: +80/-30
Re: Enphase power monitoring
« Reply #27 on: April 17, 2014, 04:51:55 am »
Hi kkl, elordude,

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)


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 #28 on: April 17, 2014, 08:11:22 am »
Hi gents,
I have not touched the plugin after the modification by reneboer and it is working perfectly
Jacob

Online kkl

  • Sr. Member
  • ****
  • Posts: 343
  • Karma: +1/-1
Re: Enphase power monitoring
« Reply #29 on: April 18, 2014, 12:07:00 am »
Are you still seeing it after a reload?
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.