This page permanently redirects to gemini://gmi.bacardi55.io/blog/2021/02/06/homeautomation-part4-list-of-automation-flow/.

Home Automation, part 4: List of my NodeRed automation flows

Posted on 2021-02-06

I've discussed previously on this blog the architecture[1] and setup[2] to play with home automation, with tools like NodeRed[3], Domoticz[4] and Mosquitto[5].

=> 1: /2020/04/12/home-automation-part-1-context-and-architecture/ | 2: /2020/04/14/home-automation-part-2-nodered-mosquitto-and-domoticz-on-my-docker-swarm-cluster/ | 3: https://nodered.org/ | 4: https://www.domoticz.com/ | 5: https://mosquitto.org/

Today, before going into details of implementation, I thought it would be a good start to introduce the different NodeRed flows I have to give you an idea of the different automation in place. I'll then cover the most interesting ones in dedicated posts later :).

Disclaimer: I'm using a lot of link in and link out node to share info between flows and also subflows. They have clear names but sometimes it might not be easy to follow. If you have any questions or remarks, let me know by email :)

Dashboard

The nodered flow to manage my nodered dashboard. The flow is quite big to provide multiple screen tabs, so I'll write a post about this later. In the meantime, I can show the main screen of my dashboard as of today:

=> Nodered Dashboard [IMG]

Scenarii

I'll write a dedicated post for these are they are the most interesting thing setup, but an overview of the scenarii is below:

Alerts

Managing all alerts: Always on alert:

When "empty house" mode is on:

Modes

Alarm Clock

Specific workspace for managing my morning alarm clock. I'll write an article about this specifically.

Music

Integration with MPD server from my mopidy server[6], eg: play/pause/next/prev/…

=> 6:

Example of the toggle play/pause flow:

=> Nodered Music Flow [IMG]

Snapcast

Integration with Snapcast: (un)mute or change volume on the different snapcast client, eg:

=> Nodered Snapcast Flow [IMG]

Device Mgt

This is where I manage the different devices: lights, kodi, tv, zwave remote, …

It looks like this (partial view):

=> Nodered devices flow [IMG]

But the main idea of this flow is just to receive a command and then send it like it should (eg: via mqtt for domoticz device or api calls for to kodi for example), nothing fancy :).

MQTT

It looks like this:

=> MQTT nodered flow [IMG]

Integration with MQTT. Transform MQTT output from Domoticz into something more useful, eg:

=> MQTT Domoticz In [IMG]

becomes

=> MQTT Domoticz In [IMG]

This is better for me as the output is cleaner and the topic more explicit following a naming convention like home//. Plus I filter also what goes out so I dont' resend everything received by Domoticz, but only the info I want to act on.

I also check in there the battery level of the different devices and send an alert via telegram in case a device has a low battery (<15%).

Don't mind the last "line" as it is to send debug information via telegram in some specific cases

Bot

A flow that allows me to interact with nodered via telegram chat. I'll talk about this in a dedicated posts as it would be too long in this "high level view" for this post.

To see the things I can do through the telegram chat, see the result from the /help command:

Available commands:
/alarm: Triger question for morning alarm clock;
/alert off: Stop alert mode;
/analysis or /status : Return setup information;
/analysis-mqtt or /status-mqtt : Return MQTT values;
/bedroom {on,off}: switch {on,off} the bedroom light;
/camera {on, off}: Start/Stop camera in entry;
/guest {office, bedroom, livingroom} {on, off}: (De-)Activate guest mode in {room};
/kanboard {Task}: Add {task} to Kanboard backlog in Triage project - Alias: /kb;
/kodi {play,pause,toggle}: Toggle play/pause;
/mode {night, away, full, night, dumb}: switch house mode;
/music {play, pause, toggle}: Play / Pause music;
/news: Retrieve the news from 'Le Monde';
/office {on,off}: switch {on,off} the office light;
/piscreen {on, off, reboot, halt}: Switch off screen on PisScreen, or reboot it or shut it down;
/scenario {bed, leaving, home, wakeup}: Start scenario - Alias: /s;
/snapshot: Take a picture of the entry and send it;
/tv {on,off}: switch {on,off} the tv;
/tvprogram: Get the tv program;
/work {on,off}: Work mode {on,off};

APIs

Just managing a few API endpoints:

The flow for the diun API looks like this:

=> 7: | 8: /2020/05/05/receive-alerts-when-new-images-are-available-for-your-docker-swarm-cluster-with-diun/

=> Nodered API flow [IMG]

Kanboard

API integration with Kanboard. Mainly to send tasks to my triage project. I use it with the release detector (add task for each new release for me to remember to update the software) or to add task via my telegram bot integration.

HTML Crawler

Crawl pages without RSS feed to extract content and send the response via telegram. I use this for example for getting the TV program at night during my evening scenario.

Release Detector

Check new release on github for specific software. New release are pushed to the triage project on my kanboard for me to remember.

Cron

Planned tasks at a specific time. Nothing interesting there because they are in reality part of the other flows.

This post is already long enough, I'll write about the more interesting flow in more details (scenario, alerts, …) in later posts, but in the meantime feel free to ping me with some questions :).

=> /gemlog/

=> Send me a gemini mention | send me an email!

Proxy Information
Original URL
gemini://gmi.bacardi55.io/blog/2021/02/06/homeautomation-part4-list-of-automation-flow
Status Code
Success (20)
Meta
text/gemini; lang=en
Capsule Response Time
346.493933 milliseconds
Gemini-to-HTML Time
6.191185 milliseconds

This content has been proxied by September (ba2dc).