Restart

So after two years of tinkering, half a year of re-thinking the MoaT basics, and half a year of coding up DistKV I'm resurrecting all of this effort.

Because it's fun, and also because it's worthwhile.

This iteration started in 2017 when I had to re-wire my home (it's almost 100 years old and the stuff was not at all safe, much less up to code). I installed KNX, but instead of the 2/4-wire cable and connected everything with a 16-wire bus cable. After allocating wires for KNX, ground, 5V (Raspberry Pi, Arduino, whatever), 12V (smoke detectors), 24V (valves for the radiators), more ground, and the electrician's inability to distinguish white-twisted-with-brown from white-twisted-with-black or white-twisted-with-blue … I was left with three single bus wires.

I originally planned to use one of these for 1wire and the other two for low-speed I²C, but the signals are not clean enough for I²C – they confuse every microcontroller's I²C hardware even if it's not buggy anyway (hint: they frequently are). I²C is also somewhat slow.

1wire is annoying because of limited hardware. Software 1wire slaves do exist but they're not very reliable. Also I need multi-master for redundancy. 1wire doesn't do that very well (if at all).

So I decided to design a new protocol. The result is the MoaTbus. It runs on anything from two to four wires, and it's as fast as a multi-master low-speed bus can possibly get.

The low-level packet handling stuff is done and I have a good idea what the hardware will look like (confounded by the fact that you can't just plug a 16-strand fixed-wire bus cable into a controller board).

The high-level stuff, i.e. the actual content of these data packets, has a design, but I don't know whether I'll actually use that. Probably sometime later.

Next steps:

  • port the code to an actual microcontroller
  • test parameters on a real network
  • over-the-wire firmware updates
  • implement code for the bus controller
  • hack up some high-level stuff
  • possibly integrate with ESPhome

Also there's some more work on DistKV I need to do:

  • the MQTT front-end sometimes wedges itself
  • need an Akumuli gateway for graphing
  • need 1wire support
  • need to fix the command line styles, there's three or four different of them, that needs to change
  • want Tesla support ;-)

And not to forget

  • write a tutorial how to plug all of this together

Comments

Comments powered by Disqus