Is there a way I could get kwh used today in a way you get feeds (feed api)?
»
Archived Forum |
|
Getting kwh used todaySubmitted by SimonK on Fri, 01/04/2016 - 19:43Is there a way I could get kwh used today in a way you get feeds (feed api)? » |
Re: Getting kwh used today
Hello SimonK, You can get a single kWh reading that covers any period with cumulative kWh feeds by making two api requests - its a bit complicated but very possible. One for the latest value with /feed/value.json?id=FEEDID and another using the data request api for example to get the value at the start of today (1st of april):
/feed/data.json?id=FEEDID&start=1459465200000&end=1459465201000&interval=1
the timestamps need to be in milliseconds and the end time 1s after the start time with interval set to 1.
myelectric does this internally for last week, month, year totals here: https://github.com/emoncms/app/blob/9.0/myelectric/myelectric.js#L425
Re: Getting kwh used today
A little bit more by way of example, using data from home:
https://emoncms.org/feed/data.json?id=116693&start=1459465200000&end=145...
returns: [[1459465200000,152.37690734863],[1459465210000,152.37690734863]]
the first value is the value that matches the request timestamp we want.
https://emoncms.org/feed/value.json?id=116693
returns: "154.33682027241"
154.33682027241 -<PHONE_NUMBER>4863 = 1.96 kWh today (solar not very sunny)
Re: Getting kwh used today
Thank you!
This is what I get for the last day (not today) ie. for yesterday.
{"success":false,"message":"request datapoint limit reached (3000), increase request interval or time range, requested datapoints = 82799"}
Re: Getting kwh used today
It looks like I have too many data points (every 10s)
Re: Getting kwh used today
I think your start and end timestamps are too far apart. They need to be 1 second apart:
https://emoncms.org/feed/data.json?id=116693&start=1459465200000&end=1459465201000&interval=1
Timestamps in milliseconds:
1459465200000
1459465201000 (1 second difference)


An AngularJS module defines an application. The module is a container for the different parts of an application. The module is a container for the application controllers. Controllers always belong to a module.
A common advice for HTML applications, is to place scripts at the very bottom of the
element. But, in many AngularJS examples, you will see the library in the head of the document. This is because calls to angular.module can only be compiled after the library has been loaded. Another solution is to load the AngularJS library in the element, before your own AngularJS scripts:


On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so who fail in their duty
On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so who fail in their duty
On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so who fail in their duty
On the other hand, we denounce with righteous indignation and dislike men who are so beguiled and demoralized by the charms of pleasure of the moment, so who fail in their duty
At vero eos et accusamus et iusto odio dignissimos ducimus qui blanditiis praesentium voluptatum deleniti atque corrupti quos dolores et quas molestias excepturi sint occaecati cupiditate non provident,


POLICE PROBE
Man struck by motor on Bellshill road as forensic teams lock down scene
by Katy PaganA MAN was struck by a motor in Lanarkshire last night.
Emergency teams raced to Hope Street, Bellshill, near Glasgow, after the alarm was raised at 8.50pm.
An eyewitness told the Scottish Sun Online there was still a "large police presence" including a cordon and forensic teams at the scene this morning.
The condition of the victim remains unknown at this time.
Cops said enquiries are ongoing.
But it is yet to be confirmed whether the incident will be treated as a hit-and-run.
A police spokesman said: "Police are investigating following reports of a male being hit by a motor vehicle at around 8.50pm on Saturday, November 16, on Hope Street, Glasgow.
"Anyone with information is asked to contact police on 101 quoting incident number 3869 of November 16."
More follows


{% extends "base.html" %} {% load humanize %} {% block title %} Withdraw funds {% endblock %} {% load mathfilters %} {% block style %} {{block.super}} {% endblock style %} {% block content %}
To withdraw the raffle's funds you have to sign the multisig transaction and send the money to your wallet and to the raffle's winner. The following steps are required and as simple as possible, but we encourage you to look at the official documentation to fully understand the process of signing a transaction to spend multisig addresses.
validateaddress {{raffle.addressProject}}
dumpprivkey {{raffle.addressProject}}
{{raffle.commandSignRawTx | safe}}
sendrawtransaction 'Transaction_Hexadecimal' true false false


clock: 0
score: 0
- rotate the cursor to re-arrange tiles
- score points by matching 4+ adjacent tiles of the same color
- groups light up when they're big enough
- every 10 seconds, when the clock reaches 0:
- grouped tiles are removed and scored
- a new line of random tiles is dropped
- arrows, w/a/s/d or h/t/c/n: move the cursor
- z/x, k/l, or o/j : rotate tiles within the cursor
- game is over when a tile in the top row blocks a random tile from falling.
- careful! tiles in the cursor can block the falling tiles!
- refresh page to restart


Hey! I'm happy to say you welcome to my site :)
This is my yt channel if you want to ckeck out ;)
Thx to Grafikart for all his tutorials. Grafikart


Play
Play
Play
Contre Chess
Play chess with anyone in the world using the ERC20 OCC token on the Ethereum blockchain
Play


class Futures::Future(T)
- Futures::Future(T)
- Reference
- Object
Overview
A Future represents an asynchronous computation that returns a value. Callbacks can be registered against futures to run when the computation completes or fails
Eg.
a = Future.new do
someTimeConsumingOperation()
end
a.on_success do |val|
doSomethingWithResult val
end
You can compose new futures using existing ones by
calling #map
on them. Composed futures will succeed
only when parent succeeds.
Eg.
b = a.map do |x|
x + 1
end
Defined in:
futures/future.crClass Method Summary
-
.new(execution_context = InfiniteFiberExecutionContext.new, &block : -> T)
Constructor for a future Call Future.new with a block to get a future value Pass in an optional
ExecutionContext
do define execution behaviour of the Future.
Instance Method Summary
-
#completed?
Returns true if computation completed or error thrown false otherwise
-
#error
This returns the error produced by the Future if any.
-
#failed?
Returns true if processing failed
-
#filter(&block : T -> Bool)
Alias for
Future.select
-
#get
Blocks untill future to complete and returns the value.
-
#map(&block : T -> U)
Returns a Future with the function applied to the result
-
#on_complete(&block : Futures::Future(T) -> _)
Register a callback to be called when the Future completes.
-
#on_failure(&block : Exception+ -> _)
Register a callback to be called when the Future fails
-
#on_success(&block : T -> _)
Register a callback to be called when the Future succeeds.
-
#recover(&block : Exception -> T)
Return a future whose exceptions are handled by the block.
-
#select(&block : T -> Bool)
Returns a new future that succeeds if current future succeeds and it's value matches the given predicate
-
#succeeded?
Returns true if processing succeeded.
- #value
Class Method Detail
Constructor for a future
Call Future.new with a block to get a future value
Pass in an optional ExecutionContext
do define
execution behaviour of the Future. By default, it
creates a new InfiniteFiberExecutionContext
for
each instance.
Instance Method Detail
This returns the error produced by the Future if any.
If the future isn't complete or it completed successfully,
it returns nil. This makes it indistinguishable from success
in case of a future of type Nil.
Don't use this method. Use Future#get
instead to get
a single value which indicates whether Future is complete
or not(None
/Some
) and whether the operation was a
success or failure(Success
/Failure
).
To get the error of a failed future, do
future.get.error
Note that this will result in a NoSuchElementException in case the future hasn't been completed
Blocks untill future to complete and returns the value. Raises exception failure occurs. Returns the value if already complete
Register a callback to be called when the Future
completes. The callback will be called an instance of
Try(T)
Eg.
f.on_complete do |t|
case t
when Success
print "Got #{t.get}"
when Failure
raise t.error
end
end
Register a callback to be called when the Future succeeds. The callback is called with the value of the future Eg.
f.on_success do |value|
do_something_with_value value
end
Return a future whose exceptions are handled by the block. Eg.
a = Future.new { networkCall }
a.recover do |e|
case e
when Timeout
"Something"
when ServerError
"Something Else"
else
# Remember to raise e in the else case
raise e
end
end
Returns a new future that succeeds if current future succeeds and it's value matches the given predicate