Read sensor 24 hours ago

Moderator: Mattk

Post Reply
jzapater
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Fri Jan 06, 2012 1:11 pm

Read sensor 24 hours ago

Post by jzapater »

Hello,

I'm writting a software for display in a led, temperature and other data from meteohub.

I'd like read the temp 24 hours ago, not only min and max.

How to do this from http read?

Thanks.

P.D. I probe with http://meteohub/meteolog.cgi?type=xml&m ... a&end=YYYY... (now - 24h) but is very slow or get error
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: Read sensor 24 hours ago

Post by skyewright »

I'm note sure if it would suit your requirement but I use the html template mechanism for a similar purpose (i.e. to grab sensor data which I then display in a small LED panel). For what I'm doing the values provided by the html template variables are fine.
jzapater
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Fri Jan 06, 2012 1:11 pm

Re: Read sensor 24 hours ago

Post by jzapater »

The problem is how get the sensor 24 hours ago. I think that is impossible. :(

I get up in the morning and want to know the current temperature and 1 days ago at the same time.
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: Read sensor 24 hours ago

Post by skyewright »

jzapater wrote:The problem is how get the sensor 24 hours ago. I think that is impossible. :(
I get up in the morning and want to know the current temperature and 1 days ago at the same time.
Perhaps you could do regular HTML template calls from the computer that you are running your software and, record the result (e.g. once an hour and store the result in some structure that has 24 locations, one for each hour in the last day?). Then you could use that for your "24 hours ago" figure?
jzapater
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Fri Jan 06, 2012 1:11 pm

Re: Read sensor 24 hours ago

Post by jzapater »

Thanks skyewright,

It's clear, is one option.

It would be best, meteohub, to save the data in database.
What a pity !
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Read sensor 24 hours ago

Post by admin »

meteoplug.com does it with a true database and does give you more options to access data from it.
But running mysql on a USB stick driven by a NSLU2 is not really an option ;-)
skyewright
Platinum Boarder
Platinum Boarder
Posts: 873
Joined: Fri Jan 25, 2008 6:27 pm
Location: Isle of Skye, Scotland

Re: Read sensor 24 hours ago

Post by skyewright »

admin wrote:meteoplug.com does it with a true database and does give you more options to access data from it.
For Meteohub users who haven't tried out Meteoplug, I strongly recommend you take the 30 day trial using your Meteohub as the data feed. The charting and template options are great. I hardly use native Meteohub charts nowadays... :D
jzapater
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Fri Jan 06, 2012 1:11 pm

Re: Read sensor 24 hours ago

Post by jzapater »

admin wrote:meteoplug.com does it with a true database and does give you more options to access data from it.
But running mysql on a USB stick driven by a NSLU2 is not really an option ;-)
And other hardware like iConnect or better?

I prefer process my data.
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re: Read sensor 24 hours ago

Post by admin »

Hard to say how well flash storage (we already fight with it in normal file-based operation) will handle ongoing data base operation. Apart from that changing that would mean a major rework of central parts and to cut off parts of the user base and to split development. Things I really don't like to do.
jzapater
Fresh Boarder
Fresh Boarder
Posts: 9
Joined: Fri Jan 06, 2012 1:11 pm

Re: Read sensor 24 hours ago

Post by jzapater »

Yes, I will save the data in external database.

What is the best way?

Thanks.
Post Reply