After the SD Card write issue setback I've been keen to get an alternative that works for running emoncms locally on a raspberrypi. I now have my home monitoring setup running off a raspberrypi with a hard drive (as recommended by Paul Reed, thanks Paul!) and a pihub as in the picture above and I've uploaded an image and details of this option to the emoncms.org documentation here:
http://emoncms.org/site/docs/raspberrypihdd
I think there are quite a few benefits to running emoncms locally especially as we start to add the ability to control things from emoncms in addition to monitoring. Being able to set a heating profile shouldn’t depend on a working internet connection or a remote server's uptime. Control needs to be as robust and secure as possible.
I also think there is an important benefit of improved privacy: Energy, temperature and other environmental data is often sensitive personal data. Storing data locally is probably the best way to ensure you have full control over the privacy of your data as it never needs to leave the home unless that is you decide to share certain feeds for an open dataset or enable remote access for access while away or on the move.
Another benefit that I make regular use of is to develop new features such as the recent open source building energy modelling work (see application guide), because my data and the application was local I could edit the visualisations and model and see the results on my data straight away.
The emoncms raspberrypi hard drive image comes with quite a few add-on emoncms modules installed out of the box including the Event and MQTT module by Nick Boyle (elyobelyob). I tested the NMA notify my android feature and it worked great.
Here are all the add-on modules installed out of the box:
- PacketGen, A new module for sending control packets.
- Event module for sending Prowl, NMA, Curl, Twitter and Email notifications.
- MQTT module for subscribing to MQTT topics containing data to be logged to emoncms.
- Notify module sends an email if feeds become inactive
- Energy module. Create a David MacKay style energy stack
- OpenBEM module. Open Source Building Energy Model. Investigate the thermal performance of buildings.
- Report module. Create's electricity use reports including appliance list exercise
The boot.img goes on the SD card and just tells the PI to use the filesystem that is on the external harddrive. The second image pi_hdd_stack.img needs to be written to the hard drive.
With the harddrive connected to the PI through a powered hub and the boot SD card inserted in the PI, the pi should just boot-up and and be ready to use.
Environmental Considerations
Adding a HDD to a Raspberry Pi setup does increase power consumption however I measured that my 2.5" 1TB USB external hard drive connected to the Pi only added 1.8W to the over all setup (3.9W). This modest increase in power can probably be justified.Obviously purchasing a HDD has a considerable embodied energy, however there is an excess of low capacity second hand IDE hard drives commonly sold on ebay which are perfect for this application. A 20Gb drive (masses of space for emoncms!) can be picked up for a few £. With regular backup should provide a few years of service. It's great to be able to make use of something which otherwise would have to thrown away or at best recycled for raw materials.

This comment has been removed by the author.
ReplyDeleteEmoncms runs like clockwork using a USB HDD, it reboots without problem after a power cut/reboot, and it's reassuring to have control of your own data.
ReplyDelete...other options include hosting your own media server to serve music & video content to connected devices, also as a backup device - backup your PC/laptop etc via wi-fi to your own server...
I seriously undervalued how much a media server would add!
I have been looking at http://owncloud.org/ looks like a nice open source dropbox replacement with phone apps and everything. I was thinking of installing it in the image but didnt get a chance for the current image so will probably add it next time.
ReplyDeleteI install this new software and it is works so grate!!, I am using a usb flash in order to store there raspbian, Are there any problem with that? Why do you use a hdd? Why don´t a flash usb?
ReplyDeleteThanks everyone, you are a marvellous team.
Is there a simple way to import your current settings/data from an existing install of emonCMS on an SD card install?
ReplyDeleteMany thanks
GaryP
Berna: the reason to use a harddrive over flash or an SD card is because of the problem of a limited number of writes which was causing systems to fail.
ReplyDeleteGaryP, the only way to do it at the moment is via the import scripts found here: http://emoncms.org/site/docs/backup
All right you have between 10.000 and 1 million of writes and erases but we are not writting in the same module all the time, you are storing data. why you have this problem?. I have a lot of SDD disk and I never have any problem, and I write and erase frecuently different parts, not allways the same.
DeleteThanks....
I seem to be unable to use the download link http://217.9.195.228/emoncms_raspberrypi_hdd_stack.tar.gz . It looks like it is broken..? I'll patiently wait. Thank you for all your good work, I enjoy it daily and it saves me money too :). Have an inspired New Year!
ReplyDelete