I am certainly thrilled with IoT, but I prefer to keep as much as I can within the 'firewall'. This suite of bash
scripts managed were built under Ubuntu/Raspbian on a low power Raspberry Pi for 24-7/365 management of the Philips Hue lights in the home.
Modify hue.sched
for your lighting preferences
lightnames
: these are logical and can essentially be anything desired.lightclass
: describes type of light inlightnames
, currently eitherhue
or433mhz
.lightHueID
: ID used for the hue light in the API to the Hue Bridge.light433mhzON
andlight433mhzOFF
: 433mhz code for switching 433mhzON/OFF
sched
: Starting at0
, the ordinal light number of configuredlightnames
(0
is the first,1
is the second, and so on). Every logical light inlightnames
can have more than one schedule entry insched
.lightsON
: The date time (in Linux epoch) when the light is to come on.lightsOFF
: The date time (in Linux epoch) when the light is to go out.bynite
:TRUE
means the scheduled event should follow Sun up/down, otherwise set toFALSE
.bytv
:TRUE
means the scheduled event should follow state of another IOT device in the household, like a TV/Home Theater. Otherwise set toFALSE
.byvacation
:TRUE
means the scheduled event should follow state of being away (such as on vacation) for a longer period of time. Otherwise set toFALSE
.
lightstate
: should be initialized toOFF
.lightnames
,bynite
,bytv
,byvacation
andlightstate
must have the same number of elements equal to the number of lights you want to control.sched
,lightsON
, andlightsOFF
must have the same number of elements equal to the number of scheduledlightsON events
(andlightsOFF
) you prefer.
- TBD
Modify autoHue.sh
for local settings
- LOC
- IOTDIR
- VACA
Modify iotalive.sh
for your devices (if only a TV)
- _deviceID
- _deviceDNS
Copy/move hue.sched
to ${IOTDIR}
Add iotalive.sh
and autoHue.sh
to /etc/rc.local
TBD
Motivated and inspired by Risacher's Sunwait
program which provides celestial times for solar movement by GPS location. The version used pre-dates Risacher's current version of Sunwait now on GitHub (see Task List below).
- Debian/Ubuntu
- Place localizations, API keys in a configuration/parameters file
- Revise to work with Risacher's Sunwait (new version of sunwait from 2004)
- Move startup from /etc/rc.local to systemd
- Create a GUI to generate a schedule
- Port to work with BSD
date
- Port to php (takes care of BSD
date
)
circa 202208