I have a Mother-device+4 cookies https://sen.se/store/mother/ up and running and can publish the device/sensor data in an indigo device in a plugin.
I would need some feedback on how to design this:
Some constraints you should be aware of.
1. you need to apply as a developer to get access to your information: https://sen.se/developers/register/
2. all data goes to a web server and must be picked up from there. No direct access to the mother device.
3. turn around time for a request to the web server is about 1 second
4. the "cookies" have sensors for temperature/ movement + state "connected" + signal strength. from that the web server calculates several states like how much time has been active, how was sleep and presence/ absence etc
5. the time to go from present (i.e. the mother device gets signals from the cookies) to absent takes about 3 minutes
6. the time its needs to go from absent to present is about 5 to15 seconds.
7. There is a maximum of 100 requests per minute
8. there is unfortunately not a single webpage that delivers all data. It is a complicated structure /User/cookie/sensor/data one has to traverse.
I can "easily" setup the following:
per sensors for each cookie
- temperate / timestamp of last change
- movement / timestamp of last change
- present/absent/ timestamp of last change
- signal streng for each data point
It would likely not make sense to poll temperature every second - ~ 1/ minute is likely enough.
For the other two a 2 second poll interval would be the fastest doable
!!! But if you have 4 cookies, and each cookie/sensor takes 1 seconds round trip to get the data from the server the fastest polling time is 8 seconds per cookie& sensor.
That would send a data request to the web server every second.
any comments / suggestions welcome.
Karl