I’m having doubts on the architecture of what I’m trying to achieve, and I’d like some feedback. Here goes:
The idea: just like many people, I made my own limited home-automation. It’s pretty simple:
- all of my “controllable” devices (mostly lights and wall-outlets) are electrically cabled to outputs of a few “zelio” machines (micro-PLC’s from Schneider), some with an extra power-relais, most lights directly (outputs support 8 amps on 230VAC)
- I use push-buttons around the house, and each push-button has a direct cable to the zelio input, basicly closing the input when pushed
- most inputs are 1:1 mapped to their output, and are toggles. In other words, a push on button for input 1 toggles output 1
- on each zelio, there’s 1 specific input to switch off all outputs (a handy “all-off button”)
- the zelio’s have an RS232 connector which I can connect to a computer via an RS232/USB cable, it allows reading and writing of the zelio
This all has been working for a few years now, no issues. I actually intalled this in 3 homes, all working fine.
I now want to integrate openhab. Openhab is some software you run on a computer (i want it to be a raspberry pi), and some native clients in IOS/android etc. It has a lot of bells and whistles, but in its simplest form it would allow me to use the iphone app to toggle the light, just like i do with a hard-wired push button now.
Enter resin.io. I don’t remember how I stumbled upon resin.io, but it looked like a lot of fun to play with (and it is!) with the RBP. It supports Docker, so I could (in theory) try to get the whole openhab running in a container, and deploy to the RBP’s in the homes. It has been very interesting so far, learning about cross-compiling, Docker etc.
I managed to get java running in the Docker container (on my own! proud), but so far openhab: not yet. It seems to have dependencies on dbus and some other stuff which I haven’t figured out yet.
But mostly: I’m not sure if this architecure is the best idea, although it’s probably more of a Docker-question than a resn.io-question. That single container would need to:
- support java (done)
- run openhab (trying), and somehow make it usable from any internet connection, not sure how to secure (vpn, grok, something else)
- talk to the zelio’s using USB/RS232 (not tried yet, no idea how that would work in a docker container)
- run SSH (not started, i like to log in to know what is going on, via VPN, because I don’t want to deal with NAT traversal)
- have a per-home configuration of openhab, and the addressing of the different zelio’s
So, there, that’s pretty much the story. All hobby, fun trying and learning.
Any tips?