nhapometro
by Juan Ramón Sixto Anello (https://github.com/jotasixto/)
Requirements
-
Arduino IDE
-
$ sudo apt install python-serial
config
- clientAdaFruit.py
# Set to your Adafruit IO key & username below.
ADAFRUIT_IO_KEY = ''
ADAFRUIT_IO_USERNAME = '' # See https://accounts.adafruit.com
# to find your username.
- nhapometro.py
# Set to your Adafruit IO key & username below.
ADAFRUIT_IO_KEY = ''
ADAFRUIT_IO_USERNAME = '' # See https://accounts.adafruit.com
(twice)
respuesta = requests.post("https://xxxxxxxx/xxxxx/xxxxxx.php", data=payload)
Install
- install logrotate file
aespinosa@xxxx:~/nhapometro/nhapometro (master) $ sudo cp nhapometro.log /etc/logrotate.d/ && sudo chown root: /etc/logrotate.d/nhapometro.log
- install systemd service
$ sudo cp nhapometro.service /etc/systemd/system/
$ sudo service nhapometro start
$ sudo service nhapometro status
Disclaimer
All software and hardware by Juan Ramón Sixto Anello.
Only logrotate and systemd service by Alexandre Espinosa Menor.