Catatumbo is an Adaptive Smart Home Lightning project that lets your home indicate information of relevance for you. It aims to build up light components (led strips) that are distributed across the appartement. Each device being addressed via network or KNX in the future. While each device can foresee a different scene, in special cases they can also act together - e.g. for indicating an alarm situation in the whole appartment. Special focus is on adaptive lightning scenes which indicate real world information via color codes - e.g. stock prices, weather forecasts, social media states. Just by having your hall stand illuminated in bright blue may indicate that you better take the umbrella along. Let yourself be dragged into the fascination of Catatumbo - Happy weather watching!
This is supposed to be the first PoC of a HTML5 based app to configure and see the status of the Catatumbo device. No data extraction is planned. The PoC focuses on UI capability for the required configuration.
current color concept with strip schema (GRB, GRBW, ...) dependent representation is non-trivial. color schema needs to be initalized to return right color values, e.g. 0,255,0 for GRB representation versus 0,255,0,0 for GRBW representation. this can be confusing in case of neopixel_multibase modules, when the module is just a wrapper for multiple led strip instances.
seeking a better solution...
This class shall provide the basis for a scene in which a share price is correlated to its leading index and indicate positive or negative trends via a clear speaking color coding which allows a human viewer to interpret whether urgent action may be required. the length of the led strip represents the trend over the period of time of a day, gradually filling up during the day (of the corresponding stock exchange). The color space may be restricted to indicate the most important trends due to led color capabilities.
The Neopixel Multibase class (https://github.com/MBizm/Catatumbo/blob/master/src/adafruit/core/neopixel_multibase.py) shall act as the basis as it will provide fundamental functionality, like reading configuration file, identify current location, state transition for scene switch. The implementation of the Neopixel Forecast class (https://github.com/MBizm/Catatumbo/blob/master/src/adafruit/controller/forecast/adafruit_forecast.py) can serve as a reference.
The current divider implementation in Catatumbo/src/adafruit/controller/forecast/adafruit_forecast.py$setPixelBySampleboard(self, sampleboard, mask = -1) is rather bulky. Code simplification and the coverage of day shift in cases where bit mask covers whole day is required.
Catatumbo/src/test/visualizeTk/forecast/CityBarChart.py
In case location is not maintained, the current location shall be derived from IP address and taken for further processing.
the module Catatumbo/src/adafruit/controller/forecast/adafruit_forecast.py shows temperature ranges via led color values. the current temperature representation does not make a difference between summer and winter time. it is to restricted in winter time, not providing enough information whether its going to be a hard or a mild winter day.
if activated via properties file, the color scale shall be adapted based on summer/winter time of defined location.
Catatumbo lib currently traces states and processing via standard out using print statements. A proper logging framework shall be used to trace all internal states.
running the module Catatumbo/src/adafruit/controller/forecast/adafruit_forecast.py will constantly update the weather forecast for the selected location and represent color values on the attached strips.
It may be desired to have the led strips increasing brightness during the day and lowering brightness at night, e.g. based on local sunrise/sunset information.