Change to the HTTP Datalogging protocol

Requests for future functionality

Moderator: Mattk

Post Reply
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Change to the HTTP Datalogging protocol

Post by YJB »

I'm exploring the http datalogging protocol and use it as a load data source for pumping data into mysql.

Although I can work around this, it would be helpfull if a data request can specify a particular sensortype (or specific sensor)

"http://..../meteolog.cgi?mode=data&start=20080227183500&sensortype=thb"
Would return datarecords for all thb sensors

or
"http://..../meteolog.cgi?mode=data&start=20080227183500&sensor=wind0"
would return datarecords for windsensor wind0

Hope this makes sense
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re:Change to the HTTP Datalogging protocol

Post by admin »

Good idea, will be part of next update.
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:Change to the HTTP Datalogging protocol

Post by YJB »

I see that this is now implemented in 4.2b, it makes life simpler.

What I'm wondering is however, can I just select a group of sensors?

sensor=th
Gives me both th as well as the thb sensors. The thb sensors send more fields, with makes the output of this command not consistent.

sensor=thb
Works fine, as it gives me only all thb sensors.

Is there a way that I can select just all th sensors?

Thanks,

Ysbrand
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re:Change to the HTTP Datalogging protocol

Post by admin »

Hi, you would have to select all th sensors by name, like this:

http://..../meteolog.cgi?mode=data&start=20080227183500&sensor=th0&sensor=th1&sensor=th2&sensor=th4"
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:Change to the HTTP Datalogging protocol

Post by YJB »

Ok, I can live with this. I just need to make sure that I change my scripts when expanding sensors.

One thing that seems to work inconsistent:
http://...../meteolog.cgi?mode=data&start=20000101000000&sensor=thb0

Give me the 1st 500 records since logging started. (I'm using jan 2000 just to make sure that I'm at the start).

But for all the other sensor types I have to define a "real" time stamp to fetch data.

http://...../meteolog.cgi?mode=data&start=20000101000000&sensor=th0

Doesn't give any output, while
http://...../meteolog.cgi?mode=data&start=20090411000000&sensor=th0
Will give me 500 lines.

Same applies to rain and wind.

I've checked the logfiles, but I can't find any alarming messages that point towards a clue.

I know that you are on holidays right now, so no rush.

Also, if you need login details, feel free to contact me.
User avatar
YJB
Platinum Boarder
Platinum Boarder
Posts: 387
Joined: Thu Feb 19, 2009 5:53 pm
Location: Venhuizen, Netherlands
Contact:

Re:Change to the HTTP Datalogging protocol

Post by YJB »

I've given this some more thought, and I think that this is what is happening (correct me if I'm wrong):

meteolog still fetches 500 records, and ten filters the sensors based on the "sensor=" modifier. If there are no records that match the "sensor=" within the 500 records, one will simply not get an output.

So, I think that meteolog 1st needs to filter on the "sensor=" request and then limit by 500 records. Or, maybe simpler to implement, if the result set is 0, fetch another 500 records, until we've got at least a single record (or we've reached the current date).
User avatar
admin
Platinum Boarder
Platinum Boarder
Posts: 7854
Joined: Mon Oct 01, 2007 10:51 pm

Re:Change to the HTTP Datalogging protocol

Post by admin »

Yes, you are right. Will be fixed with the next update (4.2c).
Post Reply