Posts

A newer approach.

    In the last post, I developed a way to use a python script to control my HUE porch lights (front and back porch) to turn on and off at dawn and dusk using 'sunrise' and 'sunset' calculations for my given latitude and longitude.    I tend to be persistant in my searches for answers and knowledge, and, not surpiisngly, I continued the search for rise/set control of my HUE lights.    Success. After a lot of digging and reading and thinking, I came up with a way to program using the HUE bridge's internal 'Daylight' sensor.     Now, all I need to do is use cURL or the CLIP debugger to program the bridge to turn the lights off/on at dawn and dusk.     The 'Daylight' sensor does what my programming does: calculates sunrise and sunset for a given day and latitude/longitude. A boolean variable is set to true or false depending on the time of day and the rise/set times. 'Daylight' is false for night and true for day. There is an offs...

A change in porch light control approach.

     Up to this point, I had, tentatively, decided to use python and bash scipting to create a sysemd service and timer to control the front, and back porch lights, using calculated sunrise and sunset times on a daily basis. The calculations woiuld be done using a python script I translated from a NOAA Excel spreadsheet, years ago. The same script is used to calculate the solar elevation and azimuth plotted in the online graphs..    I've discovered, after extensive searching on the web, there is a ''virtual' sensor in the HUE bridge that performs the same calculations using GPS coordinates supplied by me. I previously discovered how to enter those coordinates and have done so. This morning, I worked to enter the rest of the necessary code.    The success of my efforts remains to be seen.    Tonight the code will be activated for the first time.

Porch lighting schedule upgrade

     The porch lights are on a fixed schedule of 6AM-8PM on/off. The date now is June 5th. Summer is here and the sun sets later than any other time of the year.    In the cominng December, winter, the sun will set earluer than any other time of the year.    The thought occurred to me that the python script I use to calculate solar elevation and azimuth based on time of day, would also be useful for calculating the surise and sunset times for any given day.    Years ago, I downloaded an excel spreadsheet from a NOAA website. That spreadsheet contains formulas for a number of astronomical variables useful in atronomy and weather forecasting.    I stranslated the formulas from the Excel language into the Python language equivalents and placed them in a python script.    I decided to write, and install, a systemd service that calculates the sunrise and sunset times each day. The service then calls curl to write the new schedu...

HUE reset and intro to ESP8266/ESP32

     When I bought the HUE bridge, the bridge was used and accompanied by seven used HUE color changing bulbs.     I've learned, in the interim, a lot about programming the bridge and bulbs. But not only that, different ways to do the programming. Typically, the bridge has a web page designed esppecially for programmers and debugging. That page is one way to proogram the system.    Another method for programming uses the cURL command, most common in Linux/Unix systems, but possible in Microsoft Windows. In Windows, a version of curl can be downloaded and installed. Alternatively, WSL (Windows Subsystem for Linux) can be installed in Windows and some version of Linux installed in that software environment. I have two versions of Ubuntu which is very similar to the debian operating system I use on the Raspberry Pi 4b in my solar power station, hence no learning curve, a plus.    The bridge had been user programmed by the previous owner and...

Introduction and first post

    This blog is about IoT (Internet-of-Things) in the home, my home.    Tech pervades the modern hoome, and the presence of technology will increase and the role become increasingly important.    Currently, I have a solar power station that incorporates high tech, and a home entertainment center that also incorporates high technology. But details on those can be foind in my blogs on those subjects.    A new addition is the installation, and learning/programming of the Philips HUE system.     That system consists of a 'bridge', similar to a hub in concept, and accessory units, e.g. lights, temperature sensors, light sensors, etc..My use specifically,oinvolves the HUE lights. I have seven throughout my home and I recently learned enough about them to put them to good use.    The lights are color variable. The lights' hue (color), lightness/value, and saturation (purity/intenity), temperature (Kellvin) are variable and can b...