Skip to content

works on my machine

¯\_(ツ)_/¯

  • Projects
  • Prototypes
  • Coding
  • HowTos
  • Pinouts
  • Story time

Links

Github
  • About
works on my machine
¯\_(ツ)_/¯
  • Better scratch your balls than your frozen windshield – MQTT warning for nightly low temperatures with Node-RED querying a weather API
    HowTos

    Better scratch your balls than your frozen windshield – MQTT warning for nightly low temperatures with Node-RED querying a weather API

    ByStefan February 16, 2023February 16, 2023

    I have a talent to forget to cover my car before a night with temperature below zero and the next morning I have to scratch away all the ice. As I really don’t like that I decided to build a warning mechanism for that. I already had a Node-RED flow querying the weather API to…

    Read More Better scratch your balls than your frozen windshield – MQTT warning for nightly low temperatures with Node-RED querying a weather APIContinue

  • Easy peasy – querying weather API in Node-RED and publishing the current temperature to a MQTT broker
    HowTos

    Easy peasy – querying weather API in Node-RED and publishing the current temperature to a MQTT broker

    ByStefan February 15, 2023

    Precondition: Have your lokal MQTT broker and Node-RED installed and setup or access to a remote one. I recently added a http request node querying a weather API to Node-RED. After extracting, the current temperature is then published on the local MQTT and can be used by all devices connected to the broker.In this example…

    Read More Easy peasy – querying weather API in Node-RED and publishing the current temperature to a MQTT brokerContinue

  • Where are they going? – int angle to direction mapping in Python
    Coding

    Where are they going? – int angle to direction mapping in Python

    ByStefan February 13, 2023February 13, 2023

    A little util to map direction angle from weather API to ‘NW’ (SHORT, default) or ‘north west’ (LONG). Supports english (default) and german. An example API call to the weather API I am using and mapping the current wind direction to readable format. All my weather related code at github https://github.com/worksonmymachine-de/weather.

    Read More Where are they going? – int angle to direction mapping in PythonContinue

  • It’s raining codes and docs. WMO weather interpretation code mapping and translation for english and german
    Coding

    It’s raining codes and docs. WMO weather interpretation code mapping and translation for english and german

    ByStefan February 10, 2023February 13, 2023

    Just wanted to let you know I wrote a little mapper / translation for WMO weather codes as the (free) API I use for current weather and forecast also provides it. An example API call to the weather API I am using and mapping the current weather code to readable format. The code is on…

    Read More It’s raining codes and docs. WMO weather interpretation code mapping and translation for english and germanContinue

  • I don’t like grilled cheese – a thresholded IoT (MQTT) DHT22 sensor on with a D1 mini written in MicroPython with circuit diagram, casing and installation
    Projects

    I don’t like grilled cheese – a thresholded IoT (MQTT) DHT22 sensor on with a D1 mini written in MicroPython with circuit diagram, casing and installation

    ByStefan February 6, 2023February 7, 2023

    TLDR: An IoT sensor for temperature and humidity sending its values to a local MQTT server. Measuring interval and thresholding easy to configure. So much to write about a pretty small device and less than 100 lines of code including configuration, prints and comments. Hope you enjoy it! 🙂 I really like building and writing…

    Read More I don’t like grilled cheese – a thresholded IoT (MQTT) DHT22 sensor on with a D1 mini written in MicroPython with circuit diagram, casing and installationContinue

  • Making sure it’s cozy – IoT Neopixel LED stripe ambient light with DHT22 Temp/Hum sensor with MicroPython on a NodeMCU v3
    Projects

    Making sure it’s cozy – IoT Neopixel LED stripe ambient light with DHT22 Temp/Hum sensor with MicroPython on a NodeMCU v3

    ByStefan February 3, 2023October 4, 2023

    TLDR: Measures temp&hum in a configurable interval and with variable thresholds. Publishes to a mqtt server. Neopixels react to json data at a mqtt topic it is configured to subscibe. Single thread async implementation. Robust wifi and mqtt routines. Code at my github: https://github.com/worksonmymachine-de/iot_temptumsensor_ambilight This device is placed behind my main monitor and reads temperature…

    Read More Making sure it’s cozy – IoT Neopixel LED stripe ambient light with DHT22 Temp/Hum sensor with MicroPython on a NodeMCU v3Continue

  • YFNWG – your friendly neighbourhood washroom guard. IoT thresholded Temp/Hum/Open sensor with MicroPython on a D1 mini
    Projects

    YFNWG – your friendly neighbourhood washroom guard. IoT thresholded Temp/Hum/Open sensor with MicroPython on a D1 mini

    ByStefan January 25, 2023January 30, 2023

    It measures the temperature, humidity and open status of a window and send the values to the local MQTT broker if the values have changed (enough). The D1 got a nice housing on a solderable breadboard. The sensor cables can be plugged and unplugged into sockets on the breadboard. So I can easily exchange the…

    Read More YFNWG – your friendly neighbourhood washroom guard. IoT thresholded Temp/Hum/Open sensor with MicroPython on a D1 miniContinue

  • Take small bites, chew long and eat slow, but this time it is obeyed – Splitting message in Node-RED containing a JSON object

    Take small bites, chew long and eat slow, but this time it is obeyed – Splitting message in Node-RED containing a JSON object

    ByStefan January 24, 2023

    This sounds trivial – and it is. When you know how to do it 🙂 There’s an example on the Node-RED homepage splitting a message generated from CSV, but this isnt the case here. I somehow did miss the point – if there is one made in the documentation – of how to split a…

    Read More Take small bites, chew long and eat slow, but this time it is obeyed – Splitting message in Node-RED containing a JSON objectContinue

  • Multitasking: “Fucking up multiple things at the same time!” – MicroPython uasyncio howto
    Coding

    Multitasking: “Fucking up multiple things at the same time!” – MicroPython uasyncio howto

    ByStefan January 24, 2023January 25, 2023

    Most code for simple IoT devices is a script with an endless loop with the code for the connected hardware like reading a sensor or polling something from the network followed by a delay. Keeping that pattern in mind helps to write new or convert your existing code for asynchronous execution. If you want to…

    Read More Multitasking: “Fucking up multiple things at the same time!” – MicroPython uasyncio howtoContinue

  • Food delivery for the blood sucker – publishing temp/hum values read from DHT22 connected to NodeMCU v3 with MicroPython to Mosquitto MQTT server via WiFi
    Prototypes

    Food delivery for the blood sucker – publishing temp/hum values read from DHT22 connected to NodeMCU v3 with MicroPython to Mosquitto MQTT server via WiFi

    ByStefan January 11, 2023January 26, 2024

    a.k.a. longest post title ever 😛 This is the Python code for a NodeMCU v3 running MicroPython 1.19.1. It will measure temperature and humidity at the connected DHT22 with breakout board every 30 seconds, connect to WiFi and publish to a MQTT server.The first code block will be the necessary as simple and clear as…

    Read More Food delivery for the blood sucker – publishing temp/hum values read from DHT22 connected to NodeMCU v3 with MicroPython to Mosquitto MQTT server via WiFiContinue

  • “These ARE the devices you are looking for” – a MAC based identifier in Python, Micropython and C++
    Coding

    “These ARE the devices you are looking for” – a MAC based identifier in Python, Micropython and C++

    ByStefan January 11, 2023May 8, 2023

    TLDR: Code for MAC address in (Micro)Python and C++ for D1 Mini, Raspberry devices and NodeMCU. I was looking for a unique static identifier to handle my IoT devices without baking the mqtt publish topics, name and location into the code. The code on identical devices should be the same, the the individual configuration should…

    Read More “These ARE the devices you are looking for” – a MAC based identifier in Python, Micropython and C++Continue

  • Know what temp/hum to complain about – a DHT22 sensor on a NodeMCU v3 with very simple MicroPython code
    Prototypes

    Know what temp/hum to complain about – a DHT22 sensor on a NodeMCU v3 with very simple MicroPython code

    ByStefan January 10, 2023January 11, 2023

    My first NodeMCU v3 board. Connected a DHT22 (includes PCB with breakout board) to 3V, ground and data pin to D1 (which is Pin 5). Kept Python code for measuring loop as simple as possible. You will find a fitting pinout at RandomNerdTutorials. This code measures the temperature and humidity every 30 seconds and prints…

    Read More Know what temp/hum to complain about – a DHT22 sensor on a NodeMCU v3 with very simple MicroPython codeContinue

Page navigation

Previous PagePrevious 1 2 3 4 5 Next PageNext

© 2025 works on my machine

Privacy Policy

Scroll to top
  • Projects
  • Prototypes
  • Coding
  • HowTos
  • Pinouts
  • Story time
Search