Page 1 of 1

Change to the HTTP Datalogging protocol

Posted: Mon Apr 06, 2009 8:37 am
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

Re:Change to the HTTP Datalogging protocol

Posted: Mon Apr 06, 2009 8:38 pm
by admin
Good idea, will be part of next update.

Re:Change to the HTTP Datalogging protocol

Posted: Fri Apr 10, 2009 3:27 pm
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

Re:Change to the HTTP Datalogging protocol

Posted: Fri Apr 10, 2009 3:57 pm
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"

Re:Change to the HTTP Datalogging protocol

Posted: Sun Apr 12, 2009 1:36 pm
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.

Re:Change to the HTTP Datalogging protocol

Posted: Tue Apr 14, 2009 11:11 am
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).

Re:Change to the HTTP Datalogging protocol

Posted: Sun Apr 19, 2009 1:02 pm
by admin
Yes, you are right. Will be fixed with the next update (4.2c).