Personal automation apps (for Home Assistant as AppDaemon apps)
Some home automation tasks for my personal use, integrated with my personal config of Home Assistant, which is running 24/7 on a Raspberry PI 3 at home.
- enerpi_alarm.py: App for rich iOS notifications on power peaks (for custom_component enerPI current meter).
- kodi_ambient_lights.py: Set ambient light when playing something with KODI; also, send iOS notifications with the plot of what's playing and custom actions for light control.
- morning_alarm_clock.py: Alarm clock app which simulates a fast dawn with Hue lights, while waking up the home cinema system, waiting for the start of the broadcast of La Cafetera radio program to start playing it (or, if the alarm is at a different time of the typical emision time, it just plays the last published episode). It talks directly with KODI (through its JSONRPC API), which has to run a specific Kodi Add-On: plugin.audio.lacafetera. It also runs with Mopidy without any add-on, to play the audio stream in another RPI. Also, with custom iOS notifications, I can postpone the alarm (+X min) or turn off directly.
- motion_lights.py: App for control some hue lights for turning them ON with motion detection, only under some custom circunstances, like the media player is not running, or there aren't any more lights in 'on' state in the room.
- publish_states_in_master.py: App for posting state changes from sensors & binary_sensors from a 'slave' HA instance to another 'master' HA Instance.
- bot_event_listener.py: App for listen to and produce feedback in a conversation with a Telegram Bot (including not only sending complex commands but a HASS wizard too), or from iOS notification action pressed.
- motion_alarm_push_email.py: Complex motion detection alarm with multiple actuators, BT sensing, pre-alarm logic, push notifications, rich html emails, and some configuration options.
- ... Other automations in active? development ...
*Switchs*:
{% for state in states.switch%}
- {{state.attributes.friendly_name}} --> {{state.state}} [{{relative_time(state.last_changed)}}]{% endfor %}
*Binary sensors*:
{% for state in states.binary_sensor%}
- {{state.attributes.friendly_name}} [{{state.attributes.device_class}}] --> {{state.state}} [{{relative_time(state.last_changed)}}]{% endfor %}
*Sensors*:
{% for state in states.sensor%}
- {{state.attributes.friendly_name}} --> {{state.state}} [{{relative_time(state.last_changed)}}]{% endfor %}
*Lights*:
{% for state in states.light%}
- {{state.attributes.friendly_name}} --> {{state.state}} [{{relative_time(state.last_changed)}}]{% endfor %}
v0.7 - Cambios en sistema de alarma:
- Se puede definir un tiempo máximo de alarma conectada (pasado éste, la alarma sigue activada pero vuelve al estado de reposo; también apaga los relés asociados)
- Se puede definir un tiempo de repetición del aviso de alarma activada, mientras no se apague o resetee.
- Se pueden definir luces RGB para simular una sirena visual cuando salte la alarma.
- Con la alarma activada, se toma nota de los dispositivos BT que entran en escena.