Energy EAGLE Discussion

Posted on
Tue Sep 24, 2013 5:02 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Wow! That's odd that they just up and replaced your meter. :?

In any case, thanks for the info!

Posted on
Fri Sep 27, 2013 2:37 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Version 0.9.11 Posted

Changes from 0.9.9:
  • Fixed bug that misinterpreted negative instant demand values (for those with solar or other grid-contributing energy sources).
  • Another attempt to fix a bug that causes a UnicodeDecodeError in certain circumstances where non-ASCII characters appear in the XML output from the EAGLE.
  • Fixed a bug that could cause the plugin to crash if unable to connect to the EAGLE.

Posted on
Sat Sep 28, 2013 4:10 pm
rhanson offline
Posts: 193
Joined: Apr 30, 2013

Re: Energy EAGLE Discussion

Nathan,

Almost there..

Line 1380: don't divide by 2, we need to compare the whole value to 2^31-1, not half of it .. I think you're compensating for the signed int twice in your mind :-)

Also, on 1386: pretty sure you want ~ instead of - (the result is the same for 0xfff... but not any other number)

Code: Select all
1380: if int(energyInput1, 16)  > 0x7fffffff:
1386:  energyInput1 = float(int(energyInput1, 16) | ~0xffffffff) * float(int(multiplier, 16)) / float(int(divisor, 16))


Then it works as expected.

Thanks for this plugin!

Posted on
Sun Sep 29, 2013 1:58 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Thanks for catching that. It was late. ;-)
rhanson wrote:
Line 1380: don't divide by 2, we need to compare the whole value to 2^31-1, not half of it .. I think you're compensating for the signed int twice in your mind

Also, on 1386: pretty sure you want ~ instead of - (the result is the same for 0xfff... but not any other number)

Posted on
Sun Sep 29, 2013 1:59 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Version 0.9.12 Posted

Changes from 0.9.11:
  • Corrected negative demand calculation code.

Posted on
Sat Oct 05, 2013 6:24 pm
richy240 offline
Posts: 111
Joined: Jul 08, 2012

Re: Energy EAGLE Discussion

Is the value of the "Change in Current Load (kW)" property the same as the value of "energyInput1Delta" device state?
Last edited by richy240 on Sat Oct 05, 2013 6:57 pm, edited 2 times in total.

Posted on
Sat Oct 05, 2013 6:53 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

richy240 wrote:
Is the value of the "Change in Current Load (kW)" property the same as the value of "energyInput1Delta" device state?

Yup. :-)

Posted on
Sat Oct 05, 2013 6:58 pm
richy240 offline
Posts: 111
Joined: Jul 08, 2012

Re: Energy EAGLE Discussion

I'm getting some weird results when I use "Change in Current Load (kW)" as a condition. Even when I set the condition to be greater than 0, the trigger only fires when the value is below 0. The "Current Load (kW)" property seems to work ok as a condition, but I can't seem to get the Change to work. Am I doing something wrong?

I'm trying to do something like this: if the current load is above 5kW after the most recent change, and the change in draw was +1kW, perform this action. Am I on the right track here?

EDIT: Never mind, I'm an idiot. :?

Posted on
Sat Oct 05, 2013 8:22 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Ha! No. Actually, I've seen some odd behavior when using the Change in Current Load as a condition as well. The apparent reason is that the Change in Current Load changes a few milliseconds after the Current Load, as the plugin goes through the XML. Indigo triggers on the Current Load and processes the conditions before the Change in Current Load value is populated into the device's state. I haven't decided on the best way to work around this. When I figure it out I'll let you know.

Posted on
Sun Oct 06, 2013 9:35 am
richy240 offline
Posts: 111
Joined: Jul 08, 2012

Re: Energy EAGLE Discussion

nsheldon wrote:
Ha! No. Actually, I've seen some odd behavior when using the Change in Current Load as a condition as well. The apparent reason is that the Change in Current Load changes a few milliseconds after the Current Load, as the plugin goes through the XML. Indigo triggers on the Current Load and processes the conditions before the Change in Current Load value is populated into the device's state. I haven't decided on the best way to work around this. When I figure it out I'll let you know.

I KNEW I WASN'T CRAZY! Although I was going back and forth on it - sometimes it seemed to work ok, and sometimes it was giving me some REALLY weird behavior.

I guess the temporary workaround would be to trigger the action based on any change of Change in Current Load instead of any change of Current Load. That seems to render more reliable results for me, provided I'm not crazy. ;)

Posted on
Sun Oct 06, 2013 12:28 pm
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Yup. That's one of the workarounds I was thinking of but hadn't tested yet. Glad that works more reliably for you.

Another I was thinking of was using code in an embedded Python script action to test the energyInput1Delta state. I've tested that method and found it to work (probably because there's a bit more delay to start executing the embedded Python code, allowing the Change in Load to update before the code tests it), but it does require more coding. Your solution doesn't. ;-)

Posted on
Wed Oct 23, 2013 10:55 pm
davidw offline
Posts: 8
Joined: Oct 23, 2013

Re: Energy EAGLE Discussion

Hello Nathan! I'm an SCE customer with a solar array, and just received my Eagle today. Thanks for the great plug in!

I tried to Use Advanced Pricing and put in my tiered rates, and got this error:

Energy EAGLE Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 637, in runConcurrentThread
File "plugin.py", line 1583, in eagleSummationValues
<type 'exceptions.TypeError'>: can't compare datetime.datetime to unicode

Energy EAGLE Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


As promised in the final line, it repeats about every 10 seconds.

For now I've just turned off Advanced Pricing, but is this something I've configured incorrectly or...?

Posted on
Thu Oct 24, 2013 12:32 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Hi David.

I'm glad you're getting some use from the plugin. As far as I'm concerned, even bad input shouldn't cause a crash like that, so thanks for reporting it. I'll see if I can track it down with the information you've provided. If not, I'll let you know and I can get some debug logs from you. However, I should also say that, while the RFA-Z109 EAGLE does support gathering the raw data, the plugin's Advanced Pricing doesn't currently support solar or other energy production sent back to the power company (adding that functionality adds quite a bit more complexity which I've been hesitant to tackle as of yet). Currently, the best way to get your current bill estimate is through one of the free "cloud" services supported by the EAGLE (Bidgley and Wattvision). I'll get the bug fixed, but even after it's fixed, you won't get an accurate total cost estimate from the Energy EAGLE plugin, though the estimate would fairly accurately show how much you would have paid without the solar panels. :-)

davidw wrote:
Hello Nathan! I'm an SCE customer with a solar array, and just received my Eagle today. Thanks for the great plug in!

I tried to Use Advanced Pricing and put in my tiered rates, and got this error:

Energy EAGLE Error Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
File "plugin.py", line 637, in runConcurrentThread
File "plugin.py", line 1583, in eagleSummationValues
<type 'exceptions.TypeError'>: can't compare datetime.datetime to unicode

Energy EAGLE Error plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


As promised in the final line, it repeats about every 10 seconds.

For now I've just turned off Advanced Pricing, but is this something I've configured incorrectly or...?

Posted on
Fri Oct 25, 2013 10:38 pm
davidw offline
Posts: 8
Joined: Oct 23, 2013

Re: Energy EAGLE Discussion

Got it, thanks. Had some trouble getting my Eagle to communicate with Bidgely, but after a couple of resets things seem to be working. I don't suppose you're planning to write a plugin to read the data from Bidgely, are you? :D

And possibly worse than that, while browsing your posts for a Bidgely connection, I've learned that I could make my Hue lights change color depending on my rate tier or consumption. My guests already think the lighting in my house is random enough, as much of it controlled via Berkinet's AD2USB plugin. They might just start to bring flashlights so they know what to expect.

Posted on
Sat Oct 26, 2013 3:07 am
nsheldon offline
Posts: 2469
Joined: Aug 09, 2010
Location: CA

Re: Energy EAGLE Discussion

Hey David.

No plans on a Bidgely plugin, but that isn't a bad idea.

Ha, yea. Keep your guests guessing. Funner that way. ;-)

Page 6 of 11 1 ... 3, 4, 5, 6, 7, 8, 9 ... 11

Who is online

Users browsing this forum: No registered users and 3 guests