Back to Smartcitizen.me

Notifications/alerts

Is it possible to create a specifical alert for a particular sensor (i.e. when the temperature drops below 25ºC or when PM2,5 reaches 25 ppm)?

Thanks,

Ferran

Not at the moment via the website. But you could create your own shell script to query the API every X minutes and parse the values.

Example:

  1. You could use cronjob on a linux server to call the script every X minutes or hour.
  2. The script can use curl to get the data.
  3. Then you could use jq to parse the json data. See jq tutorial

Quick example you can try in a terminal:
curl https://api.smartcitizen.me/devices/5353 | jq '.data.sensors[2].value'

1 Like