Skip to content
This repository has been archived by the owner on Oct 12, 2021. It is now read-only.
Gianluca Serao edited this page Aug 27, 2021 · 2 revisions

Node

Each node contains three resources: a temperature sensor, a humidity sensor, and a radiator. All those resources are CoAP observable resources. Data between the cloud application and the devices are exchanged in JSON format.

Sensor

The sensor measures the humidity or the temperature based on the sensor type. To offer a realistic behaviour during the simulation, the sensors measure the quantity (temperature or humidity) by randomly extract it from an interval (min/max). This kind of measure is done periodically. It is possible to read the actual value in the sensor with a get request and change the interval with a post request.

Radiators

The radiator has three states: off, on, and max. Each status corresponds to a led, in particular: off (red), on (green) and max (yellow). It is possible to read the radiator status with a get request and change it with a post request. A temperature value in the post request lets set a threshold and starts the auto mode. In auto mode, the radiator will change its status based on the difference between the actual temperature and the threshold. For simulation purposes, the status change corresponds to a temperature and humidity interval change. In particular: off causes a decrease in temperature and an increase in humidity, on and max causes an increase in temperature and a decrease in humidity. The amount of variation is chosen randomly in the interval [1,8]. It is sufficient to change the status to on, off, or max to stop the auto mode.

Clone this wiki locally