I see I’m getting the exact same error.
Could you try to change that to
log.trace "Querying DB for yesterday's data…"
def powerData = device.statesBetween("power", startOfToday - 1, startOfToday, [max: 288]) // 24h in 5min intervals should be more than sufficient…
// work around a bug where the platform would return less than the requested number of events (as June 2016, only 50 events are returned)
if (powerData.size()) {
while ((newValues = device.statesBetween("power", startOfToday - 1, powerData.last().date, [max: 288])).size()) {
powerData += newValues
}
}
(and probably do the same for the today history as well) and let me know whether that solves the issue?
That’s exactly what I’m doing, but now I get problems with the adds afterwards…
2:23:21 PM: error java.lang.NullPointerException: Cannot invoke method add() on null object
Oh isn’t coding fun? Especially when rusty. 
I’m almost there though. Can either do pull request when finished, OR send to you, your choice.
Fixed. Pull next.
Awesome - thanks!
Pull request submitted. Please look over if you can, I am definitely a rusty coder, and groovy was not my specialty. While the changes are mostly benign, the littlest things sometimes…
It is working right now on my system. The root cause is probably the scheduler killing my poll engine (CoRE), which emptied the state table of graph-able data. I believe that won’t happen again.
Mainly I just checked for zero size tables, and skipped building graph data when there was no data to graph.
I don’t see it
Did you submit it to my repo or another fork?
Considering that my CoRE poller for my Envoy has died five out of the last seven days I would not hold me breath on that - the scheduler is completely broken these days ![]()
Darn it, pulled here, betting it isn’t yours: strelitzia123:master
Let me go looking further, rushed that one.
Nope - mine would be https://github.com/ahndee/Envoy-ST
Ok, submitted. Copy paste, so again please take a look. Didn’t really document changes a lot in code, they were meant to be (and were) simple. That code is working on my system.
Thanks - I looked through the PR and rather than using it changed the code directly. Still not fully clear on GitHub and that way I could made some minor mods as well - I init the state variables to an empty array even if there is no previous data. This should prevent the history from being queried every single time if there is none.
Could you please update to the latest version from my GitHub and verify that it is still working?
Seems to be working. No graphs, and I think my fix may have let the graph start again. Could be my imagination too, so don’t count on that. I’ll see if the graph shows up tomorrow when I have full data tables.
Edit: Graphs are back too!
You guys are lucky, mine won’t display any data, just a spinning circle.
Don’t delete your device thinking you can just recreate it, that is what I did several weeks ago and it hasn’t worked since

Rick
Updated the code and mine is back! Thanks guys!
Something else wrong, this works too well. Maybe try again, maybe ST issues at the time you did it. Do your logs show anything on installation?
Screenshots of your device in the IDE might help us help you.
Hey Brian,
It hasn’t been working for nearly 3 weeks now. Andreas believes it has something to do with the new caching that ST implemented a few months back. He has reached out to support with no response. In my case it started when i accidentally deleted my device and once I recreated it, it won’t work.
I can’t get logs until mon/tues next week as I need to reconfigure my solar box since I installed a new wifi router
More to follow
Rick
Tried to get pollster to poll device again and keep getting failed to save default page any ideas how to fix
Use CoRE. It’s awesome.
just installed core haven’t been following the thread at all been using smart rules, how would I set up a piston to refresh solar device? Thanks in advance for helping
This is the way I do it, but I use a virtual switch called “the sun” to do some other things including the restriction.
You could restrict it by hours or between sunrise and sunset or mode or whatever, but I recommend edit:not polling at night to reduce load and api calls.
Use date time happens at to start the rule.
