Reflashing Xiaomi Mijia LYWSD03MMC allows you to read the environment data easily via BLE. Here is are 2 small Nodejs programs to simplify this a lot.
Category Archives: microcontroller
ESP8266 and LEDs
After the short excurse with Blynk in the previous post I wanted to do the same without a company between. After all, controlling an LED is rather simple. So back to basics: MQTT it is. Got a Mosquitto instance on the Internet with the following docker-compose.yml definition: Very basic configuration. No TLS, but I definedContinue reading “ESP8266 and LEDs”
Blynk and M5Stack
Using my M5Stack with Blynk makes sense: it has plenty sensors and a display and LEDs. Update M5Stack firmware to v1.7.0 via the M5Burner Have ampy installed Download BlynkLib.py from https://github.com/vshymanskyy/blynk-library-python Set your M5 into “APP Mode” to be able to use the REPL reliably (boot, hit Setup button, select mode, reboot) Upload BlynkLib.py: NowContinue reading “Blynk and M5Stack”
Blynk IoT Platform
Yesterday I read an article about blink(1) which is essentially a USB connected and controlled RGB LED light. I got some ESP8266 and some WS2812 LEDs to do the same, and it even can connect via WiFi and the Internet. So that’ll what do on Sunday. Somehow I arrived at Blynk which is a totallyContinue reading “Blynk IoT Platform”
ESP8266’s smaller brother: ESP8285
I forgot I bought one of those a while ago! To flash Espruino software on it: Files from https://www.espruino.com/binaries/espruino_2v05_esp8266/. Source: http://forum.espruino.com/conversations/319660/ although that speaks of 40MHz. I have not seen any issues with 80MHz. Needless to say, it works fine:
MicroSD Cards Performance
I read about this “A1” specification on microSD cards: it’s supposed to be “App Performance” and is technically a minimum read and write IOPS. So I got one to find out how much of a difference it makes in an OrangePi Zero running Armbian. Simple test: Prepare an existing microSD card (I-O Data, Class 4,Continue reading “MicroSD Cards Performance”
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”
OrangePi Zero + DS18B20
Making my OrangePi Zero useful (again) with updating it to the latest Armbian and connecting a 1-Wire DS18B20 temperature sensor to it. Installing Get a microSD card and install the latest Armbian image for your Zero. Boot and do the usual setup: set root password, create a new user, copy ssh keys etc. Hardware RelatedContinue reading “OrangePi Zero + DS18B20”
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”