BME280 and Node.js on OrangePi

I got some more sensors, like an Bosch BME280 which uses I²C bus. Neat as it can measure temperature, air pressure and humidity. Using it on an OrangePi Zero is simple: Enable the I2C-0 module: in /boot/armbianEnv.txt add “i2c0” (or use i2c1 or i2c2) to the overlay. Create /etc/udev/rules.d/60-i2c-tools.rules with the following content: KERNEL==”i2c-0″ ,Continue reading “BME280 and Node.js on OrangePi”

Reading Temperatures from many DS18B20 via Node.js

The easiest way: harald@opz2:~$ cat /sys/bus/w1/devices/28-*/hwmon/hwmon/temp1_input 21812 22375 23375 The problem is that each sensor takes about 800ms (750ms according to data sheet) conversion time. Making this better and reading them concurrently via Node.js: That’s reading all in parallel (plus about 600ms startup time): harald@opz2:~$ node read-temp.js hwmon0 (28-80000004215e): 23.312 hwmon2 (28-0316884578ff): 21.812 hwmon1 (28-0316884fabff):Continue reading “Reading Temperatures from many DS18B20 via Node.js”

Logging via ElasticSearch

The Elastic Stack is a simple way to log “things” into ElasticSearch and make them nicely visible via Kibana. Since ELK can handle logs as well as time series data, I’ll use it for my own logging incl. performance logging. For pure time series data I’d use the TIG stack: Telegraf, InfluxDB and Grafana. InstallingContinue reading “Logging via ElasticSearch”

Create your website at
Get started