Correct process to restart EmonPi complete system

I have just added a temperature sensor to my Emonpi.

I did a restart via admin/reboot but the temperature is still not showing, I remember seeing somewhere that the reboot is only for the pi part and does not resrt the sensor part. I have tried to find out how to restart the whole thing but I cant find anything in the menus.

I could just switch it of but having suffered a loss of data and SD card corruption from a power cut I would prefer not to do that if there is a proper process.

What is the correct process?

You are correct - restarting only the Pi does not restart the “emon” part, which is where the temperature sensing is done. You need to do a controlled shutdown of the Pi. There are three ways: via a button behind a small hole next to the CT1 socket. Press and hold - as printed on the plastic end plate and, most importantly, wait for the time specified on the display while the Pi shuts down; or via the menu - on the Admin page, scroll down to the bottom, and there you’ll find a button - right next to the Reboot button - Shutdown. Do that and, most importantly, wait for the time specified on the display while the Pi shuts down; or use the button next to the display to cycle round the options until “Shutdown?..” appears, then follow the instructions. After the specified time (30 s from memory), remove power. Again a short delay for any stored charge to leak away, then power up again as normal. It’s now that the temperature sensor is detected.

[edited courtesy of @Bill.Thomson Correct process to restart EmonPi complete system - #7 by Bill.Thomson ]

My colleague Brian is of the opinion that it isn’t the power cut per se that causes corruption, but the spikes and surges associated with it. He recommends a good surge protector in the power supply to the emonPi.

Brilliant thanks Robert, that worked.

I hope to connect my emonpi to a protected power suppy soon so hopefully powercuts and spikes should be eliminated then, we get about 1 each mont, mostly very short (< 1s) but some are minutes or longer.

Remember the a.c. adapter needs to monitor the raw mains to calculate the power correctly.

I was planning to put the USB power supply on the protected UPS but keep the AC-AC adapter in the main supply, Is that the correct way of doing it?

Yes. Obviously if the a.c. adapter is on a separate regulated (possibly) mains supply, it would not read the same voltage as the electricity company’s meter, or the voltage you main appliances work on.

One point to watch: when you say ‘regulated’, there are essentially two types - one where the protected supply comes from an inverter fed by a battery that’s charged from the mains, and the other where the output is fed directly from the mains normally (though maybe filtered), but in the event of a severe brown-out or failure, the inverter takes over very quickly.

There’s a third way…
The button on the case next to the display can be used as well.
Pressing it repeatedly will cycle the LCD through several info screens.
One of them says something to the effect of “push and hold the button to shut down.”

Aargh. Forgot that (mainly because the button on mine is iffy, and I rarely use it).

At first, I thought the same thing.
After fiddling with it for a bit, I found that two quick presses consistently gets it past the shutdown and
SSH disable screens. Then again, the switch on the one you have might be flaky…

No, it really is a really iffy push-button. But it’s an early one and a second emonPi I have is fine.