Saturday, October 10, 2015

Stressful month but my mind is still on Home Automation

I finished the article for Linux Magazine about Misterhouse (called King of the House). I didnt get a copy of the magazine, so I've ordered a copy of issue 178, which should be here soon. I've created a web page for the article and I'll add an errata in a short time as it needs a few minor things fixed up. I've been busy for the last month or two with all the things going on at work, around the house and at home. But in the back of my mind is always HA. Lately I've wanted to design a PCB based on the PIC32 chips. This will satisfy my electrical engineering background (I have a degree in electronics). These boards would form the basis for my HA remote nodes. I'll return to that shortly but in the meantime I mean to solve an issue with getting the remote nodes to be as dynamically configurable as possible (as reasonable?). I already have the PIC32/W550io board running a DHCP client. I'd love to see the board connect to a cloud MQTT service from a remote location (such as from IXR at Camp Evan (InfoAge)). The issue is dynamically configuring the topics (and eventually the IO). This requires a bit of coordination between application such as Misterhouse, MQTT and some kind of configuration Manager.

I've written a simple configuration manager in Node-Red/Node.js. The device publishes a hello to a given server and topic (device/hello). The manager then looks up the information and publishes the information to another topic (device/<mac>/cfg). Now I'll need to figure out how the device will interpret the information (then I can format the information properly such that it's easy to handle and easy parse).

I've also decided to setup a bridge between my MQTT and a Cloud MQTT. This will require a bit of planning but I can see this working well to allow remotes to share data and commands with Misterhouse which will only be connected to my local MQTT (not that it has to). While the very basic mqtt.pm is working very well in Misterhouse, it does need additional work (error correction and failure recovery). All this means I need to work on my Mosquitto setup so that bridging, SSL/TSL, login/passwords and ACL are working properly.