Saturday, January 26, 2019

Existing Setup

I started out in the homeautomation hobby after fully stripping out a house and refurbishing it from bare brick. I rewired it in the traditional UK sense. ring mains and   a radial for the lights with the neutral at the ceiling rose and not at the switch. I included around 40 cat 5 outlets all over the house wired back to a small rack in the loft. 

having then bought a raspberry pi the day they were released. I had a little bit of prior experience using Linux with Ubuntu so didn't see this being too much of a problem

I got the hardware and started playing, flitting from one project or idea to another,  I played with interrupts and gpios then going on knock up a deamon up in c or c++, can't remember which of the two or was!

nothing was doing exactly what I wanted and I didn't want to be adding more motion sensors in rooms when I had perfectly good alarm with sensors - or so I thought..

I dropped an email to texecom and asked if there was any way of getting this data out of the alarm.. they suggested I upgrade to the Premier elite range as this has multiple options for integrating, this landed about the same time as I finished building the garage and decided that if I upgraded I could have the garage as a seperate area rather than a completely seperate alarm system.

I replaced the alarm and wrote some python code to decode some of the data coming out, coupled with the nest thermostat api to control the heating.

This approach worked but it was fragile and had some issues, which I eventually resolved or worked around.

I then stumbled on homegenie which I liked as I could develop in c# which in more confortable in.. I know I could have done this previously using mono but it didn't feel right which is why I avoided it.

so once I started with homegenie I ported over a lot of existing code and had something that worked very well for what I needed. I had it integrated with a lot of things and was very happy..

I then started looking at how to automate my lighting.. I bought the ikea tradfri kit and integrated homegenie with that, but it didn't give me the control or logic.. I want to know if someone in a room turns a light on. I added some functionality to the coap library I was using to poll devices for their status but it still wasnt going to do what I wanted which was using existing switch locations.

I set about playing with esp8266s and later esp32s which would be mounted behind the switch and use a relay to mimic the existing switch. I had code working sending messages via mqtt and all worked well in theory.. ota updates.. if homegenie went down switches worked fine as they controlled the relay locally and sent the state change via mqtt.

We then decided to redecorate the whole house, so I had an opportunity to get cat5 to most of the ground floor switches via a crawl space and creative fishing behind the dot and dabbed plasterboard that I fitted a few years before..  my box containing the pi was on the ground floor and had a route for the cables so that works.. I had no route possible from first to ground though so took those up into the loft, I left them all coiled up to deal with when I had more time to revisit, but at least it was done prior to decorating

we then got married, and decided to move home!





No comments:

Post a Comment

CUT50 Plasma cutter repair

This is somewhat a break from the normal type of post for me but I thought I would share by experiences of fixing my plasma cutter.. First...