The electronic radiator controllers in my house send out the current temperature every now and then. I receive this messages with my CC1101 based hardware solution and needed a solution how to graph diagrams that show the room temperature over time of day.
Librato is a cloud service provider that allows me to visualize this metrics in beautiful charts … in just a few minute’s time! It is really awesome how fast it was able to compose a dashboard using the charts I created for temperature values and the received signal strengh (RSSI) of the radiator controller as sender of the data.
I used python (librato-python) to send the metrics up to Librato:
api = librato.connect(“firstname.lastname@example.org”, “some_api_key”, sanitizer=librato.sanitize_metric_name)
q = api.new_queue()
q.add(“RSSI_” + controller[deviceId], convertRSSI(rssi))
Librato provides even more, check out their website at https://www.librato.com
Check out his picture of my dashboard
What can you see? In some rooms, at night the temperature slightly goes down from 21°C to approx. 19 °C. In the morning at 7am, the central heating controller puts it up to 21°C again, and 23°C in the bathroom.
Now that we are in the middle of autumn in Germany, and the daylight gets less and less, I decided to re-activate this little project of mine.
First thing was to update my Raspberry Pi (1) to Raspbian “Jessie”.
First check of my CC1101 Socket Driver Stack – and: Of course, it did not work.
Reason was that with Raspbian “Jessie” the way to enable the SPI kernel driver has changed. You can enable it using the “Advanced options” in the “raspi-config” configuration tool. Check out the description here: http://www.raspberrypi-spy.co.uk/2014/08/enabling-the-spi-interface-on-the-raspberry-pi/
Okay, after a reboot
- lsmod shows the SPI kernel driver spi_bcm2835
- The device files /dev/spidev0.0 and /dev/spidev0.1 exist
After that, the CC1101 Socket Driver Stack still did not work. Nothing was received over the air. Doing some analysis revealed that the ioctl calls responsible for the SPI data transfers between RPi and CC1101 failed.
Reason was that Raspbian “Jessie” uses a newer kernel than “Wheezy” and that the main ioctl message structure got a new field named “pad”
After I did take some more care to initialize this message structure in the code, everything worked will again.
And now the bad new: When analyzing the issue, I also killed my cross-compile installation on Mac OS. It still does not work until now 😦