Search This Blog

Monday, 30 October 2017

"Chez Toi" IOT - the need and the naming

In France where I live, "toi" means "you" and "Chez toi" means "your home". Its handy that "toi" is IOT backwards and so I jumped for the obvious name of my still-under-construction home automation system to be "Chez Toi ioT" or sometimes when I'm lazy - which is quite often - "ToiioT" for short.

Also, a "thing" in French when used to mean doodad / widget / gadget / thingamajig is a "truc"hence all the "things" in my Internet of things are called truc1, truc42, truc666 etc. Just so's you know.

The plan was to use the smallest devices possible for the various components, hence I use ESP-01S (the extra "S" is important, you'll learn why later) for wall switches, ITEAD Sonoff devices for the sockets and a few hard-to-get-at places and "homebrew" Wemos D1s for my "big box of sensors" devices which monitor daylight, movement, sound and control the el-cheap RF433 sockets I owned before I started building the system.

The overall aim is to make life easier in a house + barns that was built when candles were the only light source and provide controllable and informative outdoor devices (webcam, PIR lights) for when visitors arrive or wild boar rampage through my garden.

The main design goal was robustness. The Internet here is flaky beyond belief. I can only get a half-decent speed via a satellite dish. I don't want the lights / power to become inoperative every time there is a storm and the Internet goes down (which it invariably does). Secondly I want practicability / ease of maintenance, so all devices have to be upgradeable remotely, via "OTA" (over-the-air): Once I have a solar-powered Sonoff SV-controlled PIR light device 35feet up on the roof of "the big barn", I don't want to have to climb a ladder to reboot it!

Putting all that together, I realised I might need a lot of different bits of code for all the different devices / functions, so I took a decision early on that all the code must run on all the devices, so I could mix-n-match during the early design and experimentation stages.

After a steep learning curve - and several changes of heart - the system fell slowly into place. It started with a monolithic piece of code called "truc". It developed into a series of external libraries which break the functionality down into manageable sizes chunks and allow others to benefit from the learning curve by encapsulating all the difficult bits. (See the right hand links to github where these are published for anybody to use)

"Truc" became "Esparto" which I will talk about in a later post but is essentially all the general-purpose bits of the system that are needed by anybody doing this. All my own specific bits are a "layer" on top of that, still called "truc", but much, much smaller and lighter.







No comments:

Post a Comment