Posts

Showing posts from December, 2017

RFLink and more things to control!!

Image
I picked up a couple of new mains-controlling gizmos that use 433MHz control signals from Maplins today: energyEGG smart light switches - 2-gang; these were 99p each, so gotta be worth a try Maplin's own Remote Control Socket - 3 pack; about £14 energyEgg Switch (L) Remote Control Switch (R) Remote Control Switch - rear I got the energyEGG things on the back of a recent  Scargill tech blog  entry, which mentioned someone getting an energyEGG PIR motion sensor and a few controllable switches as a "last ones, all gone" deal from Maplin. I checked out their current stock, unfortunately no EGGs left, but they did have some 2-gang switches for 99p each. Since Scargill had already contacted the RFLink software chap, Frank, with various debug traces, I've dropped him a line to see if he's going to support them. Watch this space... Meanwhile, back at the (stacked-baked-clay-cuboid-lump) hut, I've been bashing away with the Maplin Remote Control switch

RFlink on the RPi, and linking the doorbell to the mobile phone

Image
I've now installed the RFLink + Arduino on the RPi rather than on my Mac. Makes sense, the RPi is always on, always connected, and is also running the NodeRed and other Home Automation software. So - plugged the Arduino into the RPi. Now I need to get the RPi to provide a USB-Serial interface... Then I can point the NodeRed SerialIn/Out nodes at it. First, use lsusb to determine what the USB info is for the device... pi@server : ~ $ lsusb Bus 001 Device 006: ID 2341:0042 Arduino SA Mega 2560 R3 (CDC ACM) Bus 001 Device 004: ID 174c:55aa ASMedia Technology Inc. ASMedia 2105 SATA bridge Bus 001 Device 005: ID 1058:1021 Western Digital Technologies, Inc. Elements 2TB Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp. SMSC9512/9514 Fast Ethernet Adapter Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Huzzah! Now let's sort out the support in the OS... pi@server : ~ $

RFLink up and running, scanning 433.92 MHz

Today I soldered up the RFLink (tricky!) and it actually works... When I plugged it into my Mac, everything lit up - hurrah. Now to flash the RFLink code into the Arduino... For this I had to use the avrdude program, rather than the Arduino IDE - I only have the Arduino hex file, not the source. I wrote a script to save typing it all in wrongly multiple times :-)... Bits in bold  are specific to my installation. loadArduino.sh: # Script to load a file into Arduino /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avrdude -v -p atmega2560 -c stk500 -P /dev/cu.usbmodem411 -b 115200 -D -U flash:w: /Users/john/Downloads/RFLink_v1/RFLink.cpp.hex: i -C /Applications/Arduino.app/Contents/Java/hardware/tools/avr/etc/avrdude.conf And here's the output from running it, pretty interesting stuff actually! I assume the same thing happens with the Arduino IDE, except the output is swallowed up and thrown away. Macintosh-Gouk:~ john$ ./loadArduino.sh  avrdude: Ve

FTDI working - with added micro:bit

Image
micro:bit showing Bar Chart of varying voltage as I turn the pot I've been fiddling around with Martin Wooley's BittyDataLogger app and a micro:bit, connected using Bluetooth LE. The m:b is supposed to send all its sensor data and the voltages on pins 0-2 to the app, which then saves the values and graphs them. The sensor data works but the pin voltages don't seem to. Anyway... I wrote a tiny m:b programme to read the voltage on a 50k pot on Pin0, and display the value using the builtin magic LED display and "bar graph <value>" call. Here's the code on the m:b online editor: Then I saw that the m:b blocks now allow the serial RX/TX to be redirected to various output pins!! Hey hey... First, got the serial working with the m:b Serial-USB connection, as read by the Arduino Serial Monitor... No probs. Then redirected to pins I strapped into the FTDI chip on the breadboard, which has its own USB connection of course. And voila!! Serial-USB throu

Hello Mr Postman - RFLink and FTDI arrive!

Image
A good parcel in the post today! FTDI USB <-> Serial interface board; red board above; looks pretty simple, handy 5/3.3V interface voltage jumper; somewhat boring "wobbly sided" mini USB interface, but I have some of those RFLink kit; somewhat more challenging, found the instructions on the nodo.nl website, think I might need a new pointy-ended soldering iron, but all the bits are there, including Arduino Mega knock off - blue board  RFLink PCB - large green PCB RF Transceiver - small green PCB Connector pins for RFLink-Arduino connection; it's basically a HAT Dipole 433MHz aerial, in plastic bag Christmassy tablecloth and GOSH charity magazine - er, no, just background! Can't wait for a few minutes to try out the FTDI, not sure how I'll do that, and need to nip to the famous Shop On The Bridge , shortly to be defunct, for a new soldering iron. They're having an "closing, everything must go" sale, to you never know.

Standards? You want standards? We have loads of those... Or why I can't control my heating yet

After I lashed out on the RFLink stuff mentioned here , I was thinking about other things it could be used for. And then I realised that we have a wireless heating thermostat! There's a box we can move around in the living areas, and a receiver/relay that turns on the heating when the thermostat calls for heat. Surely this would be a great opportunity for controlling the heating more closely, and even using in-room individual thermometers and RF-controlled radiator valves to deliver heat where we need it. Excellent! OK. It appears that RFLink can communicate with Drayton wireless devices... Oh, mine's a Honeywell... ah, I think you'll find that that's a 868MHz device sir, I'm afraid you'll need a different RFLink gateway for that! Not to mention that there's an undocumented protocol between sensor and receiver. Bugger. Nice idea though. I might revisit this sometime. There are some interesting RF controlled TRVs... e.g. Smartwares SH5-TDR-A / SHS 5300

Getting hot around the collar about TMP36GZ

Image
The idea of a better-instrumented home I find very interesting - more data could mean better choices for heating and so on, right? So what more interesting than some ESP8266 thermometers that log temperature over a period of time! Easy - buy some TMP36GZ 3.3V temperature sensing chips, connect them to the A0 pin on ESP8266s, read the voltage, turn it into a regularly published MQTT message - job's a good 'un! And here we are - red circle around TMP36, connected to GND and Vcc, with centre pin connected to A0 on the NodeMCU dev board. I've stolen some code to read the A0 pin, connect to my wireless network, and send MQTT packets with the temperature in Celsius to the world. Super. NodeRED setup and debug output I've set up some NodeRED nodes to process the incoming data: Temperature Collection Node is an MQTT input, subscribed to topic "temperature/office" Add Timestamp is a simple JS function to add the current timestamp to the data, so I c