OpenEnergyMonitor Community

Raspberry Pi Zero W SD image

I bought a Raspberry PI Zero W this week and I am trying to user EmonSD Nov 16 and it is not working. It freezes at the beginning in the rainbow color screen. I have connected to a screen to check it.

Any idea instead of manually installation?

Could anyone install everything in the last SD Raspbian image?

Of course the April Raspbian image works perfectly.


Do you have another Pi?

The support for Pi Zero W wasn’t part of the OS when the image was built back in Nov 16’ so you may be able to install the emonSD to another Pi and do a full apt-get update and apt-get dist-upgrade to get the latest kernel and files required by the Zero W. The advantage of doing it this way is that you can set up wifi on the other Pi before transferring the SD card to the Zero W as it has no Ethernet to configure WiFi the “emoncms” way and I do not know

Alternatively you can build the image from scratch on the Zero W following this info

When starting with a blank Raspbian image remember to add a blank ssh file and a wpa_supplicant.conf file containing your WiFi SSID and PSK settings in the boot partition before moving it to the Pi Zero W. that way you won’t need to attach a screen and keyboard.

Let us know how you get on.

Good point, I will do it, I did not think it, it make sense.

In few minutes I will say you something


Update kernel is the key

Everything is fine now


HI and apologies for jumping onto this thread.

I have anew pi zero W I currently have the latest emonpi/base SD card image working on a pi3 if i put the SD card in the PI zero W it seems to boot then hangs first on stopping wifi if country not set.

If I put the card back in the pi3 all works fine and it auto connects to the wifi etc.

How can I transfer the SD card to the PI Zero and not lose all the data in the Pi 3. This is a very vanilla install for testing at present. Bit don’t want to have to recreate all the feeds etc.

Any help appreciated.


is the country code set in wpa_supplicant.conf?

cat /etc/wpa_supplicant/wpa_supplicant.conf

Hi Paul,

Yes it looks fine:

cat /etc/wpa_supplicant/wpa_supplicant.conf
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev



[code blocks edited - note the ``` work in pairs one in the line before and one in the line after the code]

Try moving the country code to be the first line in the file.

If that doesn’t work can you give us the exact error message?

couple of simple checks

Is your PSK also wrapped in quotes? (ie is it just a typo from removing your password that the file shown doesn’t have them)

Hopefully a silly question, but is it definitely a Zero W and not just a Zero (non-wifi) ?


PSK is not in quotes in the file on the pi3 .

Yes it is a PI Zero W stamped on the bottom of the board.


Tried booting it a few more times. It seems to hang in random places. This time it got past Disable wifi if country not set and hang on:

Started LSB: LightwaveRF MQTT daemon startup.
The next time it gets past this and hangs on Started Raise network interfaces.

AT that point keyboard input is disabled and it is seemingly doing nothing.

Very difficult with these type of devices to see what it is doing.


in that case, you could try another PSU.

Already done. Tried 2 I have a fair number of pi’s as we use them for OSMC.


Have you tried a vanilla Raspbian or DietPi image on the Zero to see if it boots?

I suspect the problem may be the ZeroW is a different ARM processor. If something was originally installed to the SD Image on a more capable processor, I think it will pull in different binaries that will be incompatible with the ZeroW. Might also be a kernel issue.

There is an open issue (although the driver may have been different at the time)

I have put together a build guide for a basic emoncms server on a DietPi base image. If you build direct onto the Pi Zero it should pick up the right binaries. If you want an RFM board that will need a little more work.

I tried without success to boot the emonSD image from oct 2018 on a Pi Zero W
Couldn’t do it even with a usb eth adapter

I just tried the lite Raspbian image. Works just fine!

Now I’m doing all the steps here

Might even try the DietPi guide above

There are changes as this was Jessie based. @glyn.hudson @TrystanLea may have updated guide but it has not been shared with the wider community.

What exactly do you need? Just Emoncms or do you have an RFM board as well?

I guess I need emonbase and I will use a RFM69Pi board to coonect it to 2 other emonTX arduino based

I’m configuring a zero w with Raspbian Stretch Lite

I’m not exactly sure what I need to do, just learing by doing. I am quite familiar with linux though.

Maybe @glyn.hudson or @TrystanLea cand lend a helping hend here?

Over and above installing EmonCMS you would need the emonhub emoncms/docs/RaspberryPi at master · emoncms/emoncms · GitHub and install feedwriter (this reduces card writes). It will be worth pulling the master branch rather than the stable branch.

A lot of the other things done in the SDCard build guide are not absolutely necessary for a self build.

One of the beauties of DietPi as a base OS (apart from it being very light) is things like log files mounted to tempfs are done for you.

1 Like

I could not run firstbootupdate
I had to do a touch /boot/emonSD-30Oct18
I guess to let it know the version
now firstbootupdate seems to run


I guess technically I just need a very light server image with python, usb drivers for the USB to RS485 card etc.

I have not worked out how to install emoncms on the intranet (standard LAMP running on Ubuntu 18.04.x) to consume the data from the collection script. If there is a guide to installing it on your own LAMP server that would be good.

As there is no built in way of getting th edata from a USB to RS485 adaptor.


But beware these may not be 100% up to date. Check the RaspberryPi Stretch instructions as well.

The installation of the services has definitely changed recently.