433MHz wireless on the C.H.I.P

I recently got a few C.H.I.P devices to play with – at $9/computer with wireless and bluetooth, how can you go wrong? As part of some messing around with home automation I also bought some wireless ceiling fan controllers which came with a remote control and took one apart in order to change it from using a 433MHz controller to be controllable over WIFI (to be addressed in another post). Replacing the 433MHZ receiver chip with an ESP8266 left me with a remote controller and a 4-pin chip to play with, so I thought I’d look to see what the codes were that it sent.

Unfortunately this was a bit tricky because there are only python GPIO libraries available on the chip device, and they are too uncertain with the timings to be able to read the device. Also there is static etc mixed in so you really need a proper library such as rc-switch to be able to decode the messages. However the CHIP_IO python library was backed by some well organised C code which I figured could be used easily enough to port rc-switch to the CHIP. The result was a small patch set which can be found on the following links – hopefully they get accepted upstream:

  1. https://github.com/xtacocorex/CHIP_IO/pull/70
  2. https://github.com/sui77/rc-switch/pull/150
  3. https://github.com/ninjablocks/433Utils/pull/38

Unfortunately the CHIP’s XIO-P* ports are too slow to receive the data signal, and only a handful of GPIO ports have event support so I guess you’re stuck with using AP-EINT1, AP-EINT3, PWM1 or I2S-MCLK/I2S-DI to drive this part.