We are trying to do a project for our advanced sensor networks class
where we publish data results of video images and/or traffic congestion.
We are using python and the ZSI (Zolera Soap Infrastructure). We are using
the Data Hub Service at http://atom.research.microsoft.com/sensordatahub/service.asmx.
We can now successfully register the video camera sensor. But when we try to publish
using the SendBinaryData Api, it comes back with OK and the number of bytes published
but it doesn't update the image on sensormap. It works when we give specify a url other than the DataHub url but couldn't get it to work when no url is specified. I have a script to dump the sensor info using once it gets created and another to delete it (both use your Api fns).
So then I decided to make the experiment simpler and successfully registered a scalar sensor to see if I could update the readings. I did SendScalarData changing the temperature, but it we finally noticed it takes a long time to see the change reflected on SensorMap (note: the timestamps from the script are changing). I was thinking sensor data should published at the "sampling" rate to the datahub archive and the "reporting" rate is the number of seconds after which SensorMap fetches a new reading from this archive. I set this to both of these to 10 seconds so I would see the change right away but it still took a very long time. Lastly, I added to the script to perform a GetLatestScalarSensorData Api and it does indeed return
the data I just published with the SendScalarData.
I don't know if this problem relates to not setting the sensorinfoXML correctly somehow for the sensor or a lack of understanding on my part of something else I needed to do to for the initial setup. The sensorinfoXML for this scalar sensor is attached.
I did reload on my brower every time I made changes. Any help that you can give would be greatly appreciated. Other questions are:
+ What are the current SensorTypes and DataTypes supported? For SensorTypes I know there is "Video Camera", "Thermometer", "Traffic", "Parking" and "Generic". And for DataTypes there are "jpg","scalar". Are there any others?
+ Is binary data archived as well or is it only scalar data?
+ I noticed if I remove a sensor and readd it with the same name it keeps the old value that was last published and doesn't view it as a new sensor. Is this how it should work?
+ I noticed that if the sensor is removed and I do GetSensorDescriptionByName it says None (which it correct) but then if I do GetLatestScalarSensorData on that removed sensor that it reports the scalar data. Is this how it should work?
Thanks again if you can shed any light on these questions. Most importantly I'd like to understand if I can publish binary data without an url.
I and my colleague Seungweon also discovered that the same problem I was having in python is also occuring in C# under win xp with SendBinaryData. When there is no web camera driver and a single jpeg image file is trying to be published it doesn't do it (even after waiting for .5-1hr like we did for the scalar data). If I install a web camera server on linux and run
it, and specify the url then it publishes under "open in new window" like it does for Seungweon under win xp.
The sensorXML info is the following:
<?xml version="1.0" encoding="utf-8"?><Sensor xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.
/service.asmx</url><keywords>temperature</keywords><description>4th ave building</description><dataType>scalar</dataType><sam
plingPeriod>10</samplingPeriod><reportPeriod>10</reportPeriod><entryTime>2007-05-29T23:56:08.153</entryTime></Sensor>Wednesday, June 13, 2007 7:35 PM