Package: automate-home
Automate homeYet another home automation (iot) project because asmart light is more than just on or off.OverviewWhen talking about home automation there are at least two goals you could
have in mind:let a user interact with the home devices through many interfaces locally or remotelylet devices interact together and let the system change their stateI believe the other home automation projects fits perfectly the first goal,
this project focuses onautomation, the second one.What's the difference between this project model and other home automation projects?The main difference is the design of anAppliancewhere, with the nameAppliance, I refer to entities like a light, a curtain, a sound player ecc.One of the simplestAppliancesI could imagine is a light with twophysical states: on and off.A light model could be designed like a deterministic state machine; all the other home automation projects I know do it like that.Or it could be designed likea non deterministic state machine;
which is how it is done by this project.When using a deterministic state machine if you have a light with on/off physical states its model states will be just on/off.
When using a non-deterministic state machine it is quite simple to have more model states for an on/off light, as an example,
your light could be in analarmedstate and it could start blinking.Behavior-driven developmentI believe logics are the building bricks of a smart home system.
Nevertheless, they are complex to build, debug and share and one of this project goals is to make it easier.Having anAppliancegrouping together all its logicssimplifies debug and reuse.AllAppliancesinner states can be tested withBDDstyle testslike this.BDD style tests make it quite easy to understand the behaviour of everyAppliancein every possible state and thus make itshareable.I like to think of this project as a way to share behavioural models for our smart devices more easily.What this project isA proof of concept.This project allows me to create and test, through python,automation rules (logics) which can be more complex and more expressive.I made a draft (I am not a front-end developer) for a really simple web interface.
I can interact with the automation rules (logics) through the web interface.
Looking at the web interface I can always answer the most obvious questions: why the light is turning on/off,
why the curtain is being closed/opened...I was tired of explaining whysome magicwas happening in my home.
I think I have built a system able to answer these questions by itself.I integrated really few protocols, the ones I am using the most at my home:KNX,LifxandSonos.For all the other protocol integrations I needed I have usedHome Assistant.DocumentationFor a deep dive into this project see thedocumentation.For a minute guide to this project see thelanding page.For suggestions, questions or anything else, please, write here:discussions.ContributingPull requests are welcome!LicenseThe automate-home project is licensed under GPL3.Example projectsThe following are some example projects.These links point to astatical html exampleof the final GUI you will obtain using the configuration files,
and to a github project with all the configuration files:lights models(configuration)curtain models(configuration)sound player model(configuration)Ideally, you should be able to use the configuration files in the examples by changing:theconfiguration.inifile, adjusting the paths and the ip addresses;the files in theperformerdirectory, modifying the devices addresses
(if you have devices speaking the same protocol);you can also change automation details in thescheduler_triggersdirectoryMaybe, this page can help me clarify what I mean:landing page.When, the project configuration files fits your needs, you can use them in different ways.InstallationDocker imageYou can use the following docker imagedockerpullmajamassarini/automate-home:latestYocto buildYou can build your personal Linux image with the automate-home framework for your favorite
hardware using thisyocto distro meta layer.Pip installYou can just pip install it, but you will not obtain nor the KNX USBHID daemon or the graphite server.pipinstallautomate-ws

python-mhome--configuration-fileconfiguration.ini
python-mws--configuration-fileconfiguration.ini
python-mgraphite_feeder--configuration-fileconfiguration.iniGUI ExampleLatest eventsDevices collectionsLightsState of a lightEvents history for a lightEvents graphs for a light