Weather Station
Some trivia:
|
Washing Machine Monitoring using Power Data & Streaming
- A smart Plug (I use the Avatar AWP07Lv2) flashed with Tasmota sends its Power Reading to my MQTT broker (1/min when "on").
- Whenever a reading arrives, a python client pushes it into a python "Streamz"-Stream
- Inside the stream, the data is filtered and extracted.
- Finally, the Sink checks if the moving average of the power has dropped to the "idling" level and then triggers a browser push-message on my phone (using Notify-Run in my case for the time being).
While this works nicely, I am currently fiddling on improvements. Mainly I think about using a control loop that retrieves dynamic readings of the Power meter to more accurately detect the idling level (can be +-1minute at the moment). But deployment to my friends place comes first.
Using AMS2301 (DHT21) on a Raspberry Pi
While the DHT11 and DHT22 temperature sensors work fine on the Raspberry Pi using default (Adafruit) libraries, the AMS2301/DHT21 I intended for the outdoor measurements did not. At first, I suspected the sensor to be faulty, but then discovered that the sensor worked fine when using an Arduino with c-libraries. Not the sensor, then.
More investigation showed a strange behaviour: On the Arduino, both a DHT22 and the DHT21 sensor worked by using the same configuration (according to the specs, they actually use the same serial protocol, so this is normal). On the Raspi, however, the DHT22 worked fine but the DHT21 delivers nonsense-readings despite using exactly the same configuration and libraries for both sensors.
So why?....Well, it is due to the way the reading of the signals is implemented in the Adafruit circuitpython libraries for the Raspi and the AMS2301 sending some undocumented(!) dummy data at the end of its actual signal.
The light agent
After getting the 3rd Smart Bulb, toggling them individually did no longer suffice and using openHab became a bit clunky for my taste. So I decided to put the RasPi to work as the Head of a little light automation. More precisely, I had 3 use cases:
- Steer my Tasmota-flashed light bulbs color in flexible groups (e.g. all at the same time or just the ones in the office, etc)
- Triggering predefined sequences of color changes (e.g. sunset/sunrise) and allowing ad-hoc additions to said sequence on the fly.
- Going through colors continuously, where each step is either determined by a certain logic or the result of some random distribution of colors.