Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/eiriksm/raspberry-temp-to-drupal
Post temperatures from Raspberry Pi to Drupal 8
https://github.com/eiriksm/raspberry-temp-to-drupal
Last synced: 1 day ago
JSON representation
Post temperatures from Raspberry Pi to Drupal 8
- Host: GitHub
- URL: https://github.com/eiriksm/raspberry-temp-to-drupal
- Owner: eiriksm
- Created: 2015-05-24T13:29:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-04-27T20:55:56.000Z (over 7 years ago)
- Last Synced: 2024-11-07T19:51:49.299Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Raspberry pi temperature sensor that submits to Drupal
==
[![Build Status](https://travis-ci.org/eiriksm/raspberry-temp-to-drupal.svg?branch=master)](https://travis-ci.org/eiriksm/raspberry-temp-to-drupal)
[![Coverage Status](https://coveralls.io/repos/eiriksm/raspberry-temp-to-drupal/badge.svg?branch=master)](https://coveralls.io/r/eiriksm/raspberry-temp-to-drupal?branch=master)
[![Code Climate](https://codeclimate.com/github/eiriksm/raspberry-temp-to-drupal/badges/gpa.svg)](https://codeclimate.com/github/eiriksm/raspberry-temp-to-drupal)
[![Dependency Status](https://david-dm.org/eiriksm/raspberry-temp-to-drupal.svg)](https://david-dm.org/eiriksm/raspberry-temp-to-drupal)This module is an "attachment" to the blog post about the subject Drupal and IoT, found at [https://orkjern.com/drupal-iot-code-part-2](https://orkjern.com/drupal-iot-code-part-2).
## Requirements
To use this example code you need to have a ds18b20 temperature sensor, and preferrably an OS that supports the hardware modules we need to use. I use raspbian, and therefore these are the commands needed:
```
sudo modprobe wire
sudo modprobe w1-gpio
sudo modprobe w1-therm
```If you have no idea what any of these things mean you can probably find better results by googling it than reading here. [Here is one article on the subject, which also includes the needed wiring](https://learn.adafruit.com/adafruits-raspberry-pi-lesson-11-ds18b20-temperature-sensing/hardware).
The code uses nodejs to sense the temperature and also send the data, so you would also need that. I am pretty sure some googling will reveal good guides on that too.
## Usage
- Start by renaming the default config file to config.json. (`cp default.config.json config.json`)
- Then edit the `config.json` file to suit your needs. Specifically the API key, sensor and URLs.
- The interval specified in the config file is in minutes. So set to `1` if you want updates per minute.
- You can use the starter script included in this repo to start monitoring. To start it, run `node starter.js`## Licence
WTFPL