Ceci est une ancienne révision du document !
cd /tmp wget http://downloads.raspberrypi.org/raspbian_latest -O raspbian.zip 7z x raspbian.zip dd bs=4M if=2014-01-07-wheezy-raspbian.img of=/dev/mmcblk0 sync
Se connecter le raspberry PI via l'interfarce reseau, ensuite se connecter via SSH pi@adresse.ip avec le mot de passe raspberry
sudo raspi-config Change User Password (xxxx) Advanced Options Hostname (audiocar) Memory Split (16Mo) Internationalisation Options Change Locale (fr_FR.UTF-8) Change Timezone (Europe/Paris) Expand Filesystem
sudo apt-get update sudo apt-get upgrade sudo apt-get install python-pip supervisor sudo pip install serialkiller-plugins
sudo nano /etc/supervisor/conf.d/check_sensors.conf
[program:check_sensors] command=python /usr/local/bin/check_sensors.py user=root autostart=true autorestart=true
git clone https://github.com/tomp/python-metar.git cd python-metar python setup.py install
#!/usr/bin/env python # -*- coding: utf-8 -*- import os import time from skplugins import addValuePlugin, addEventPlugin, addValue, addEvent from skplugins.weather.skmetar import skmetar server = '192.168.1.1' while True: # Check metar for LFMT station result = skmetar(cachefile='/tmp/metar_34.cache', station='LFMT') addValue(server, 'city:weather:temp', 'float', result.results['result']) addValue(server, 'city:weather:dewpt', 'float', result.results['dewpt']) addValue(server, 'city:weather:humidity', 'float', result.results['humidity']) addValue(server, 'city:weather:pressure', 'float', result.results['pressure']) addValue(server, 'city:weather:wind_chill', 'float', result.results['wind_chill']) addValue(server, 'city:weather:wind_speed', 'float', result.results['wind_speed']) addValue(server, 'city:weather:visibility', 'ushort', result.results['visibility']) #Sleep time.sleep(5)