webRunes/WRIO-InternetOS

Prepare 4 static sensor feed. Total hours: 20

Closed this issue · 2 comments

We are going to use x1 temperature and x1 humidity sensors (Zolertia Re-Mote) and x2 RM090 to go through A to Z to prepare our PoC. Check what kind of sensor info they can provide and prepare their initial (static) feed like
https://iot.wr.io/demo/feed
We'll add real data from testbed into these feed pages later.
Every feed must contains only 48 24 records - 1 record per hour.

[Done]

Use https://github.com/WRIO-Hubs/imec.wr.io for feed and dashboard pages. Check #1581 p.12 about "?feed" and "?dashboard" keys and update the code to load pages. We need these pages:
https://imec.wr.io/testbed (https://imec.wr.io/index.html loads it, the code is already in the json-ld file)
this page loads 4 sensors from
https://imec.wr.io/testbed/sensor_ID1, https://imec.wr.io/testbed/sensor_ID2, https://imec.wr.io/testbed/sensor_ID3, https://imec.wr.io/testbed/sensor_ID4
use https://imec.wr.io/testbed/sensor_ID dir as an example.
Every dir must contain
https://imec.wr.io/testbed/sensor_ID#/feed
Take real sensor's GUID for each directory names.

[Done]

  1. There no need in "last-seen" block, use "dateModified" info to display this info.
  2. "name" is not a mesurement, it's an invariable and must be in the main json-ld block, see p.3 below.
    The same for guid.
  3. Now we are ready to separate json-ld into two blocks: static and dynamic.
    Move static into main sensor page, use for other pages the example:
https://imec.wr.io/testbed/1bc6c4e6-63b2-433b-90f7-db1910e05dc0/

A proper json-ld block has been added to the page, check the page code. Display data as key:value just as text, e.g.

productID: [guid]
Name: [name]

etc.
What is left is a dynamic part -- sensor mesurements itself: temperature, humidity, and so on. Some data were deleted to simplify the feed and the dashboard table.
State has been updated to "Enabled/Disabled".
For simplicity there is only 3 items for now: state, temperature and battery.

https://github.com/WRIO-Hubs/imec.wr.io/edit/gh-pages/testbed/1bc6c4e6-63b2-433b-90f7-db1910e05dc0/feed/index.html

Has two mesurements as an example, add other 22 to get 24 records: 1 per hour.
Please note: last record is on top.
Display these 3 item in time group in format:

[time]
State: [data]
Temperature : [data]
Battery: [data]

Update the dashboard table according this info. Show only: ID, Name, State, Last seen, Last mesurement (we have only one: temperature, no need in dropdown), Device battery


[Estimation: 8h] UPD: +2h + 10h