Right now I'm sending temperature measurements to emoncms.org http://emoncms.org/parbar. Is it possible to read out the last supplied value from emoncms.org with the read only api?
In the API section there is a lot of "Visualisation API" that you can use to direct link to various diagrams, but now I need only the last reported measurement, if possible with time stamp.
The value is also found in the first tab "Inputs".
Thanks,
Pär
Re: Get last input value from emoncms.org
Pär
from your note I'm not sure if you want the last reported measurement within emoncms.org or outside.
If you want it outside of emoncms.org, you can use json export
The path and format is:
http://<server_and_path>/feed/data.json?&apikey=<API>&start=<UNIXSTARTTI...
(you can actually ignore the &res=<RESOLUTIONVALUE> bit)
This returns a json feed of the data between the two time values.
[[<timevalue1>,"<feedvalue1>"],[<timevalue2>,"<feedvalue2>"],...]
Luckily the latest reading is timevalue1 feedvalue1. So you can read the json feed into an array and read grab the last values.
If there is an easier way, I'll be as happy as you to find it :-)
Ukmoose
Re: Get last input value from emoncms.org
I use:
http://<server>/emoncms3/feed/value.json?apikey=<key>&id=<feedid>
but that only gives me the last value, while I am also interested how actual it is. The JSON method seems better
Re: Get last input value from emoncms.org
Thanks,
I tried the last one by mhariznav and it worked of course. The first I didn't try now as I need to figure out the UNIX TIMESTAMP part first....
I found http://www.appsgeyser.com and will try to do a android app. just inserting a link to http://<server>/emoncms3/feed/value.json?apikey=<key>&id=<feedid> works but the temperature is in very small text.
It is available from www.appsgeyser.com/getwidget/Data%20from%20emoncms.org but I think I need to do it another way.
/Pär
Re: Get last input value from emoncms.org
he,
I was also toying with the appsgeyser a week ago
But what I really need is that it runs as a WIDGET. using metawidget now.