-
Notifications
You must be signed in to change notification settings - Fork 0
Sensors
Alarm sensor reads information exposed via programmable output pins of alarm control panel. In my case there are two output pins, one of them indicates whether alarm is armed, second whether some intrusion has been detected.
There are no software prerequisites required to run plugin.
To properly run plugin, you need to properly set pin numbers in constants in alarm.py:
ALARM_ARMED_PIN = XX
ALARM_ALERT_PIN = XX{
"armed": true,
"alert": false
}DHT sensor uses information from DHT-11 humidity sensor, which comes also with thermometer. Currently it uses solution described here.
For sensor to run properly it's required to follow all steps in link above. After cloning GitHub sources there, you should copy script: ./tools/dht_reader.py to examples directory. Out of the box, I assume that you have cloned Adafruit_Python_DHT sources to /usr/src/, if that assumption isn't valid, then please update following variable in dht.py:
HUMIDITY_READ_CMD_FORMAT = 'python /usr/src/Adafruit_Python_DHT/examples/dht_reader.py {sensor} {pin}'There are two variables to adjust in hygrometer.py to run properly:
-
SENSOR- should contain model of hygrometer that you've wired up: 11 for DHT-11, 22 for DHT-22, 2302 for AM2302. -
PIN- should point at pin number, to which sensor is connected.
{
"humidity": {
"value": 34,
"unit": "Percent",
"unit_symbol": "%"
},
"temperature": {
"value": 23.512,
"unit": "Celsius",
"unit_symbol": "C"
}
}Barometer sensor reads information from BMP180 device.
For sensor to run properly you need to clone this Adafruit repository to /usr/src/ directory. If you choose another directory, please update path in file barometer.py:
PRESSURE_READ_CMD = '/usr/src/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085/pressure_reader.py'Copy file from ./tools/pressure_reader.py to /usr/src/Adafruit-Raspberry-Pi-Python-Code/Adafruit_BMP085/, and your ready to go.
No further configuration is required.
Apart from atmospheric pressure, sensor outputs temperature read from barometer. As barometer is stored inside my box, temperature might be used to prevent box from overheating.
{
"value": 1018,
"unit": "hectopascal",
"unit_symbol": "hPa",
"internal_temperature": 26.5
}Weather forecast sensor reads information provided by http://www.worldweatheronline.com/ service.
To run sensor correctly, internet connection is required.
You should copy file from ./config/weather.ini to /etc/command_center/weather.ini and edit it according to following hints:
-
api_url- address of worldweatheronline API service. On the moment of writing it's: http://api.worldweatheronline.com/free/v2/weather.ashx -
location_query- location for which weather will be checked. In form "city,country", e.g. Cracow,Poland -
api_key- your API key generated via worldweatheronline portal
Output state consists of two parts:
- Containing information about current weather
- Containing forecast for next 8 readings, entries interval is 3 hours, so it makes 24h ahead.
Readings units are as follows. All values are integers.
- cloud_cover - percent
- humidity - percent
- temperature - Celsius degrees
- felt_temperature - Celsius degrees
- visibility - percent
- chance_of_rain - percent
{
"current": {
"cloud_cover": 23,
"humidity": 33,
"temperature": 20,
"felt_temperature": 24,
"visibility": 76
},
"forecast": [
{
"chance_of_rain": 2,
"temperature": 28,
"felt_temperature": 33,
"humidity": 32,
"cloud_cover": 5,
"visibility": 80
},
{
"chance_of_rain": 2,
"temperature": 28,
"felt_temperature": 33,
"humidity": 32,
"cloud_cover": 5,
"visibility": 80
},
...
]
}
- Home
- [Writing own plugins](Developing custom plugins)
- Built-in sensors
- Built-in motors