Enviro+ doesn't work after restart

I’ve built the air quality monitor according to these instructions: https://learn.pimoroni.com/tutorial/sandyj/enviro-plus-and-luftdaten-air-quality-station
It works quite well, when I start it from the terminal and also after a reboot. But when I try a restart with power off/on, there is only a bunch of colored pixel shown on the enviro+ display and apparently no data transmission to the luftdaten-server.
What can be wrong? I would be very grateful for any helpful hint.

What exactly do you do when you “restart with power off/on”?
Do you do a proper shut down before your power off?

Yes, I always do the shutdown either with the terminal command or by clicking the shutdown-button

Ok, just wanted to make sure.
So it doesn’t work after the Pi has been off for a while, then started up?
You did the crontab edit so it starts all on its own on bootup?

After a shutdown and reboot (warm start) it works, after a shutdown with power off it doesn’t. I edited the crontab like shown in the instruction. I tested the crontab with other scripts from the examples-folder of the enviro+ and it works fine, except the luftdaten-script. It seems that the enviro+ is working but there is no wifi.connection.

There is a “wait for network” at boot option in raspi-config in Raspbian. I resorted to turning it on on my Pirate Radio. My pirate radio would switch stations looking for a reliable stream if the WIFI was slow to connect. Once I turned that setting on it starts on my preferred channel on every boot up. Its a little slow to boot up some times but I happy with that trade off.

I tried the “wait for network”, but it doesn’t help and I found also an option to insert a “sleep”-command into the crontab to get a time delay after restart. The time delay works but the reaction of the enviro stays the same.

I’m at a lose as to why its doing that? I don’t have an Enviro+ at the moment. I have plans to get one in the near future though. Once they get back in stock.

Maybe Phil @gadgetoid or Sandy @sandyjmacdonald can help you sort it out.

I had the same sort of thing when I set mine up. I found it would only work on reboot if I edited the luftdaten.py file to point to the full path of the font. That meant changing:

font = ImageFont.truetype("fonts/Asap/Asap-Bold.ttf", font_size)

to
font = ImageFont.truetype("/home/pi/enviroplus-python/examples/fonts/Asap/Asap-Bold.ttf", font_size)

in my case and rebooting. Then the crontab entry in the tutorial worked because the font location was explicit.

Hopefully that will work for you as well!

Thanks a lot for your hint, That helped and the issue seems to be fixed. Everything works fine now.

I’m glad it helped. You might keep an eye on it while running - I find mine stops uploading to Lufdaten every three or four days, and I need to reboot it. That happened a couple of times on Stretch, and I’ve just had to reboot it this morning after after last week’s fresh install on Butler.