nsheldon wrote:Hi Mike.asw24b wrote:Question: The docs say that the call takes an interval parameter:
<LocalCommand>
<Name>get_summation_values</Name>
<MacId>0xFFFFFFFFFFFFFFFF</MacId>
<Interval>{enumeration}</Interval>
<SummationType>{enumeration}</SummationType>
</LocalCommand>
I don't see that being sent; Doesn't it matter ?
Nope. It doesn't matter actually. It appears to assume a "day" Interval and a "delivered" SummationType. As you can see from the XML output you posted, the EAGLE is reporting readings for every hour (you have to convert the Timestamp values from hex to integer (which is seconds from UNIX epoch)). If you calculate the difference between consecutive Timestamps, you'll notice each interval is 3600 seconds (60 minutes) apart. So it looks like the plugin and EAGLE are talking okay.
Good thinking, adding that debug code. However, if you look at the XML output you posted, the last 2 readings (the only 2 readings for today) both show a Value of "0.0", so when they're added up by the plugin, the accumEnergyToday shows up as "0.0". The EAGLE appears to take a couple hours to actually generate the summation data for the first hour or two of new days. So, if you look at the EAGLE's summation data within an hour or two after midnight, you'll just see zeros for midnight and 1:00 AM. They eventually populate, but in this case, they don't help debug the problem. If you were to show debug logging now, I'll bet the accumEnergyToday value would increase with each hourly reading that falls on today.
Try enabling debug logging again, now that it's been a few hours after midnight, and see if the accumEnergyToday value increases as is expected. I'm betting that it does. One of the reasons the trigger may not be firing very quickly is because it seems it takes the EAGLE at least 15 minutes to update the hourly consumption value for the current hour. What's your trigger definition look like? Any conditions set?
It's working now !
Thanks !!