Hey Bob,
Our POCO here in Australia has just implemented a Demand Tarriff system - this essentially means we get discounted electricity most of the time - but during the nominated Peak hours (3PM-9PM) we have a surcharge placed on any power we use.
The way this is calculated is to take the Highest 1/2 hour useage for the month (accumulated use during a 1/2 hour period) and then double that to give an hourly figure - then we are hit for that hourly figure times by the number of days in the month x the demand rate
So if during any 1/2 hour period i used 5Kwh of power - then my demand charge would be 10 x Days in Month x 36c
Is there any easy way to query the unit and get this - or would i have to run 12 queries (one for each 1/2 hour block) ?
To complicate it further - i would on most days be discharging my battery to the grid (as we get a bonus for selling during that time) - however if my battery runs flat etc then the demand could come into play.
I intend to present the number on a dashboard as once i have accumulated X amount of demand in any month - i may as well use that every day as i am essentially already paying for it.
Any ideas ? Or just the 12 queries to cover each block ?
Sorry should have mentioned i have 3 phase and have the 3 phases summed into a single output
![image](https://community.iotawatt.com/uploads/db6340/original/2X/9/9098ce85f2fc392e19d8c7381a57ec3b19be9fa7.png)
![image](https://community.iotawatt.com/uploads/db6340/original/2X/4/4845a7496b838c6bb4288b6281f63b34f7afeba6.png)
Craig
If you run a query with group=30m the response will be grouped by 30min intervals. Assuming your meter has the correct time, they should match up.
Because you have local generation, you would need to know if the POCO is using net kWh or imported kWh in the algorithm. If it’s imported, you will probably need to setup an integrator.
Hey Bob,
Thanks for the quick response.
The POCO ue imported Kwh so will need to setup the integrator - will have a look at that one.
Will try the query parameters you have suggested and report back
thanks for a briliant product and fantastic support !
I love my 3 IOTAWATTS
Craig
Hey Bob,
Sorry to bug you again - based on my reading of the doco this query to my Grid Integrator should work - but does not
(http://172.16.101.200/query?select=[Grid_Test]&begin=d+15h&end=s&group=30m&format=csv&header=yes)
But it gives me an error - essentially i am tryng to say give me all the readings from the output since 3PM today (and the current time is after 3PM)
However if i remove the +15h from the day qualifier - it does work
is a d+15h not the valid syntax to return all readings from today from 3PM ?
i am using this page for reference and note there is an example there of adding +h
(https://docs.iotawatt.com/en/master/query.html#time-specifiers)
regards
Craig
Looks like a bug. I’ll look into it.
Aah OK - no problems - in the meantime i will just craft the query up in Node Red based on date/time
thanks for your help
Craig
Hey Bob,
Just wondering if you had a chance to look at this yet (and confirm if it is a big or me being an idiot ?)
regards
Craig
Upon further examination, this is not easy to resolve in the firmware. The “+” sign is not making through the URL filtering, so “d+15h” arrives as “d 15h”. At this point I don’t know quite what to do except to change the syntax to something that passes through but is ultimately not intuitive.
But there is a workaround.
If you substitute the URL escape sequence %2b for the “+” sign, it should work fine.
(http://172.16.101.200/query?select=[Grid_Test]&begin=d%2b15h&end=s&group=30m&format=csv&header=yes)
Graph+ uses only - as a time modifier, and after years this is the first time it has been reported. So I may just document this substitution.
Good one thanks Bob - sorry to cause headaches with this one !
Will implement your workaround
regards
Craig