Automation for homie #316
schaze
started this conversation in
Show and tell
Replies: 1 comment 1 reply
-
Are you building all of this in a single application? Or when you mention the 2 main parts; logic controller, and virtual device manager, would they become 2 separate applications coupled only via Homie? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I am working on what I call an automation controller for homie. It is a rewrite of a service I am already running my complete smarthome with since about 2-3 years. It will be part of my overall smarthome solution I am building.
The intention of this post is to let you know in case this might be useful for anyone and to get some feedback. :-)
It consists of basically 2 main parts:
In addition it is also able to use normal mqtt topics as input or output for rules and virtual devices.
I have the rule engine mainly done in rust and am currently working on the virtual device manager.
The code is not yet published but here are some examples:
Rules
Rules look like the following:
name
: A human readable name for the ruletriggers
: A list of different trigger definitions that will cause rule to triggeractions
: A list of actions to be executed when the rule is triggeredTriggers
There are the follwing triggers:
All triggers support a list of conditions that can be specified in addition to the trigger. E.g. Timer triggers but only while a certain other property has a certain value or it is a specific time of day.
Actions
The following actions are supported:
Examples
This is a simple rule that will toggle a zigbee light group whenever a button on a certain switch sends (any) value or a xiaomi magic cube flipped by 180 degrees.
Here is a rule that will execute on a 5min time to give a reminder to close the window again. If the window is closed in the meantime (state property goes back to 'false'), the timer will be cancelled and no notification happens.
Virtual devices
A virtual device is a basically a definition of a homie device description with additional options.
Extra options:
from_smarthome
)Examples
Virtual device aggregating all window contacts into one property to check if any is open
About homecontrol:
The solution I am building is called homie homecontrol - which is actually finished (for me at least) for v4 since years, but I never had the time to publish it all. The old one is completely based on nodejs. Now I started to rewrite it all for v5 with my rust library. But e.g. for things like the Dashboard or the NodeRed Plugin I will still most stay with nodejs, so my plan will also be to bring the node-homie library to full v5 compliance.
The whole system is designed to be a solution based on different single services only coupled via the homie protocol. This means things like zigbee devices (e.g. via a hue bridge) or other smarthome solutions publish their devices via mqtt homie and then you have at the heart the above mentioned automation controller to automate things.
The great thing is as long as everyone follows the homie convention this can be extended by anybody.
Beta Was this translation helpful? Give feedback.
All reactions