Upgrades… Salus RT500RF 868MHz wireless boiler control

RT500RFI’ve just received a Salus RT500RF in the post. I’m pretty much all prepared to hack this thing, at first I’ll sniff the airwaves with the RTL-SDR and try and get a handle on how it works. There’s been at least one blog article regarding this unit so I’ll also have a dig around them and see what they can tell me too. The idea is to get the Raspberry Pi with the 868MHz RFM12B to send a signal to turn the heating system on/off, and if possible, interrogate the current state of the boiler.

This will be the first stage in smartening up the house. The OWL CM160 and the Salus RT500RF are the first devices that I’m going to mess with as they’re the most useful to me right away. Next I’ll be turning my hand to Oregon Scientific weather sensors, Wireless door bells and other hardware on the 433/868 bands. These bands of course are used in Europe and some other locations, the equivalent is 315/915 for the US. So if you’re following my work then make sure you pick up the right bands for your location. It’s always best to buy radio transmitters and receivers in your own country because the likelihood of anything being on sale which isn’t allowed is reduced.

New toys! ESP8266

esp8266So it seems that since the Arduino WiFi module was a complete failure in the teasmade (well not complete, just unreliable and who wants their tea to be unreliable). I ordered a couple of ESP8266‘s. These are quite a hot topic at the moment, basically it’s just a serial port over wifi.

The intention is to control my book case lighting with them, so I want to do a few things while testing. Firstly the initial concept is to be able to send a RESTful command to turn a light on/off, Simple enough. Second I want to be able to send a value and have the lights set to that value e.g. 255 which will set the brightness. Third, I want to be able to have the ESP8266 send a RESTful command to a php test server elsewhere on the network. Finally, I want to be able to send a “status” message in JSON on request.

All of these simple tests provide the fundamental elements for creating the interactive home environment. A series of RESTful servers which chitter chatter with one another. There are lots of devices on the market which do these types of things and that’s where the Internet of Things (IoT) market is growing from.

I’ll post the wiring diagram and code for this once I’m done.

I’m still working on the NRF24L01 mesh, I’ve been working towards putting a simulator together so I can simulate a few thousand devices on the network together I’m also considering the encryption system and stuck trying to figure out whether I should use AES or 3DES… Of course all of this takes memory on the tiny little Arduino and there in lies the rub as Shakespear would say. I recently finished the fragment disassembly and re-assembly code, this isn’t going to be used very often, but it represents a step over an obvious flaw in most IoT networks which is message size. I need to be able to send JSON encoded message blocks which are larger than 255 bytes and that’s where fragmentation comes in.

Update

I just added some code to github for getting started with this, but it needs some tinkering to get working properly. I’m suffering from some random crashes in the code on Leonardo, but that board has always been a little skittish. The nano with software serial was giving more success until the ESP8266 started to go into some kind of reboot loop. I’m yet to try the Mega or an Uno but I’ve got those hanging around too so I can give them a blast. The eventual target would be an arduino micro, without any FTDI plugged straight into the ESP2866’s serial port. Then the LED light hooked up via a decent power mosfet to one of the PWM ports with a low-pass filter on the gate. I might not even need the low pass filter with these LEDs so I’ll probably test it without first.

RFM12B-Linux on the Raspberry Pi B2 – GPIO_BASE

Thanks to impshum digging around with epic google foo I found the correct PI B2 GPIO_BASEGPIO_BASE for the Raspberry Pi B2. Raspberry Pi used to have a peripheral base address of 0x20000000 now it’s 0x37000000 on the B2, so the GPIO peripheral address is 0x37200000 which has broken the odd GPIO based product (including the HotPi). I’ve added a pull request to RFM12B-Linux and that should be that. I still need to merge in changes for OOK and see if that works and of course, figure out how to set the frequency to listen/transmit on.

RFM12B’s will soon become a must add hardware to the Raspberry Pi, I just need to get that software working :). It’s a great piece of kit, and the code already in github is a good jumping off point. I’ve merged in a OOK sender fork, and I’ll be adding code to put the device into OOK listen mode. All of this controlled via ioctl. Essentially with the little RFM12B’s hooked directly into the Raspberry Pi GPIO port’s SPI pins you’ll have the ability to mess with anything out there, which uses 433/434MHz or 315MHz if you’re in the US, or 915MHz or 868MHz whatever HopeRF board matches with your locations radio standards.

At present I’m looking at getting the OWL to work because I already understand most of that. Next I’ll be looking at getting RF light sockets, lightwaveRF devices, indoor/outdoor weather sensors and even doorbells into the supported devices list.

RFM12B-Linux and OOK/ASK and Oregon Scientific v3 protocol

RFM12BThe Owl energy monitor uses OOK/ASK via the Oregon Scientific v3 protocol. It looks like I might have to hardware hack my RFM12Bs to work with this protocol according to this article… Not ideal.

Receiving OOKASK with a modified RFM12B – JeeLabs Café – JeeLabs . net.

Although it seems there’s a branch of RFM12B-Linux which can do OOK already. I’m not entirely sure how this is going to work out, but I’ll keep posting.

I found some problems with RFM12B Linux, specifically it doesn’t work at all on the Raspberry Pi B+ 2. I’ve created an issue for this but I might be able to fix it if I can get some tinkering time. In the mean time I’m testing things with the original model B.

Top 10 Arduino Sensor Boards & add ons

I thought I’d put down a little list of my top 10 things I do with my Arduino boards at home. I’ve been experimenting a lot with ambient circuits, up cycling and things like that so you could say that these things are skewed towards that kind of thing.

  • UltrasonicUltrasonic Sensors – be careful with these, I bought a pack of 4 from a dodgy supplier and the MAX232 chips had a bug which causes them to overheat rapidly and they get hot enough to burn stuff. You can use these in a lot of things, I’m currently using two as the eyes for a small robot I built to keep the cat occupied.
  • PIR Sensors – these are cheap and cheerful little blighters. Ambient circuits usually require some kind of human interaction, so ultrasonic and PIR are both decent ways to do that. Depending on how you direct them and mix them they can become quite an human interaction tool.
  • Bluetooth HC-06 – With speeds up to 250kbps the HC-06 is perfect for fast remote serial ports which can be accessed easily from a computer or android device. The HC-06 unlike the HC-05 is reprogrammable, you can hack it in various ways messing with it’s internal setup for the serial port. This is the fastest and easiest way to add a radio to a remote device that I’ve found, and I’ve tried NRF24’s, RF12’s, Wifi shields and other means. These are certainly in the category of just works(tm).
  • WS2811 RGB LED Strip – Unlike the 2801 the 2811 has individually addressable LED units, whereas the 2801 has 2 LEDs per controller. It works well with the FastLED library and lets you separate the LEDs onto individual faces of a 3D shape. They’re also significantly cheaper than BlinkM’s are and much easier to obtain in large quantities.
  • Gyroscope – If your project has any moving parts, it’s a good idea to put an accelerometer in there, it can give you feedback in interesting ways. Very useful to have on around.
  • MSGEQ7 – With no particularly easy way to say it, it’s an equaliser IC this little chip will take a sample of audio and tell you the value of it on 7 different frequency bands. It’s useful for doing things like defining colours to be illuminated in time with music and things of that nature. Microphones will need a little amplifier to get them working but it’s a genius little chip.
  • DHT11 – Another favourite of mine is the DHT11, temperature and humidity. You can connect these up to one of these mini arduino+rfm12b boards and you’ve got a thermometer and humidity sensor anywhere.
  • rfidRFID Kit – This cheap and cheerful RFID kit can be used in all kinds of ways, creating proximity based installations or interactive spaces where each object in the space has it’s own unique ID.
  • Motor shield – There are tonnes of motors laying to waste because they’re not re-used, I collect them up and put them to work when I need one so a motor shield is always useful to have. Obviously you can always bang something together with a few transistors, but a decent motor shield for testing is always handy.
  • Screw shield – always handy to have around a screw shield can save a lot of time when prototyping.

Assembling and configuring a RAMPS with Prusa i2 (more or less)

To get what I need out of my 3D printer it was clear that the Gen7 although a great board to build was not going to be suitable for every day use.

I got myself a RAMPS and assorted add-on boards:

  • RAMPS 1.4 shield & Arduino Mega
  • LCD, SD & Click encoder combo
  • Lots of new wiring
  • An EEPROM
  • Bluetooth HC-06 module (already had this)

I bought all my wiring and connectors from We Do 3D Printing via eBay.
Excellent quality of cables and arrived quickly. Continue reading →

OWL CM160 Energy Monitor with RTL-SDR

OWL CM160I have an Owl energy monitor model CM160, which has been mostly just acting as a real time monitor. In order to really USE the device I’m going to need to connect it to one of my running computers. At first I was using Eagle OWL on github. However it requires me keeping the LCD receiver and I want to eventually get rid of that, mostly because the only useful thing about it, the thermometer isn’t accessible over USB.

I decided that I should start experimenting around the 434MHz band with my SDR’s and see what I could come up with. Continue reading →

KodiPlay safari extension for sending content to Kodi

kodplay.icon.colour.largeToday I resolved to stop using Google Chrome. The SSD on my MacBook Pro wore out a couple of days ago (warranty replaced), or destroyed itself in a fit of rage after 3-4 months so I’m going to try and use Safari only.

So, I use a bunch of extensions with Chrome, including Ad-Block Plus and HTTPS Everywhere, but more obscurely I need a way to push content to my Kodi installation.

I haven’t been able to find an HTTPS Everywhere plugin but I did manage to write a quick plugin called KodiPlay which you can download for Safari here.

You can find the code on GitHub.

The extension adds a toolbar button which will send the current content into the playing queue on your Kodi installation.

Supported content providers include: YouTube, Vimeo, DailyMotion, CollegeHumor, eBaumsWorld, LiveLeak, Twitch.tv, Khan Academy, Hulu, AnimeLab, ARD MediaTek, Freeride.se, Katsomo.fi, Ruutu.fi, Yle Areena, SoundCloud, MyCloudPlayers, MixCloud and even magnet links.

Just a quick post… ATX to RAMPS 1.4 board

Hacking an ATX power supply to work with RAMPS 1.4 is quite dangerous… Power supplies which can give you the Amps are rare.

ATX-RAMPSHere’s a nifty solution. A simple ATX power to RAMPS intermediate board.

Plug in an ATX 24 Pin power connector and two of the 4 pin molex power connectors (preferably from a dual rail supply). Wire them up to the output molex with the bottom pin of the output molex supplying the power for the heated bed.

The 5V and PS-ON pins can be wired to the RAMPS 1.4 to offer auto-power on (if like me you’re making a bluetoothy remote printer).

Download the Fritzing sketch here.

With this board, next time you blow up an ATX power supply, you don’t have to go through the process of hacking another one… Which increases the chances of electrocution each time…

24Mesh’N Quick Update

Just a quick note to say I’m almost finished with the majority of the 2.4Ghz mesh network classes. These are pretty solid classes at this point with a few minor missing features. I’m hoping to release something really useful really soon.