Emoncms login failure


I had a reason to power down and disconnect my emonpi a while ago (had new smart meters installed). I have it up and running again (via the display connected and showing IP address). However, I don’t appear to be able to login to Emoncms, which I think I need to do to configure feeds and all that good stuff.

Found a posting as to how to reset Emoncms password, but just don’t understand how I make use of ssh to do this.

If it’s your Emoncms password this can be reset by connecting via ssh then running password reset script: See: https://guide.openenergymonitor.org/setup/troubleshooting/#emoncms-local-account-rese

Whats the simplest way for me to reset my account, or create a new one? Is it simpler for me to just do some sort of factory resen on the emonpi and start from scratch?

Sorry for the dumb questions.
(And I’ve spend over an hour trying to find existing postings with answers, but to no avail - in terms I can understand).


Cheers, Julian.

Welcome back, Julian.

Are you talking about emonCMS on your emonPi, or the Pi sending data to emoncms.org? I think the former, and that’s what I’ve assumed - but it’s best to clarify.

You shouldn’t need to change anything - the emonPi should start up and carry on - but not quite where it left off because you’ve missed data while it’s been off. All your inputs and feeds should be exactly as they were.
And you should be able to log in exactly as you did before the shut-down.

So it begs the question - what else has changed?

How long have you left if between powering up and trying to log in? - because it may well be (have been) updating itself.

If your existing data in emonCMS on the emonPi isn’t of any value to you, then the simplest and safest solution will be to start with a new SD card, flash it with the latest emonCMS and start afresh. Then you will have to set everything up again from scratch.

@TrystanLea - Is there a way to copy files (via a laptop, say) from an “old” SD card to a new card, without attaching a card reader to the Pi and using the scripts? And if so, which files should be copied - or is there a pair of scripts for that?


hi. I was talking about emonCMS on the emonPI. It may well be running OK, from what I can see on the display as it starts up, including it says its connected to my WIFI and gives the IP address.

My problem is: it does not appear to accept my emonCMS login (from what I have recorded) when I try to login, when I put the emonPI IP addressing into my browser and it gives me the emonCMS login page. (I’d attach a screen show but this forum does not appear to allow me to attach a file. The text I get when I try to login is:

Username (filled in)
Password (filled in)
Incorrect password, if you’re sure it’s correct try clearing your browser cache
Remember me

Q1 So is the reseting the emonCMS password via the instructions in my first posting the only way forward?
If so I don’t know how to connect via ssh.
Q1.1 Is it explained anywhere how to connect via ssh?

Q2 Alternatively I have to get a new SD card, flash it, and start afresh. Presumably I could flash the existing SD card, as anything on it will just get overwritten?

I am not worried about retrieving my old data, unless that were easy to do.

Cheers Julian.

What I don’t understand is why something has changed. Everything should be the same, especially if you did a controlled shut-down of your emonPi.

But if there was a disturbance on the supply, your SD card might be corrupted - and it’s that which is causing the problem.

That’s correct, but if the card is physically damaged, you obviously need a new one. You’ll find out when it does the read check after flashing.

Are there and funny characters in your password? I know the rules for the acceptable character set have changed over time, but I don’t know what they were, or indeed are.

Jon Murphy wrote this Cheatsheet a while ago.

It still works (for me - except I have installed a pair of key files, so my computer is permanently authorised to connect and I don’t need the password any more - if you want instructions for that, ask).

And the next post from Bill tells you about the emonCMS password.

So I’d try that first, and if you can’t get it to work, then the reflash option is probably the next easiest. But you’re guaranteed to lose your data that way unless you make an image of the SD card first, and then when Trystan tells us the files you need to transfer, you could hopefully copy those and recover the data.

It should do, unless something has changed recently. Just drag and drop the picture into your post where you want it to appear. (I’ve just tried my “basic user” account - the same as you are - and it’s worked for me.)

THere are no funny characters in my password, as far as I recall (and as per my record of what should be the password)

I’ve tried the Jon Murphy ssh line above. So I put in the following to the > command line prompt:
ssh [email protected]

and I got the response:
ssh: connect to host port 22: Connection refused

I also tried this fully line (as I didn’t know if it shoud have the password on the same line from the instructions above:):

ssh [email protected] Password = emonpi2016

Still got the response above:
ssh: connect to host port 22: Connection refused

So stuck again. Are the command lines above what you’d intended I put in?

Sorry to be a right pain. :slightly_smiling_face:

Sorry, I forgot it’s disabled by default.

On your emonPi, there’s a pushbutton. If you press that, do you see the display change? If so, cycle round that until you get the option to enable SSH.

If you can’t see that option, then you need to take the SD card out and write a file onto the card. The file name is ssh and it goes into the /boot directory. It doesn’t need to contain anything, it just needs to be there.
(See emonPi SSH disabled by default)

Once enabled - either way, you should be able to get in as above.

No, it asks separately for the password.

one small step…

yes, I could cycle round the options on the emonpi, to enable SSH. Held button to get ‘enabled’
now got this on the command line prompt:

Hope that is readible it appears to be.

First attemp:
Even when I lick on the Command prompt window, and get the cursor blinking on the password prompt line, any characters I type are not being echoed, which I guess is why it is not accepting the password.

Second attempt:
The connection timed out, I’ve now managed to login:

OK, I’ve managed to login.
I’ve also managed to run the reset password script

No idea what to answer, so saying y.
was able to change pw.

yay, I am in!

wow, that was painful!

THanks for your help! I greatly appreciate it.
Cheers J.

1 Like

Hopefully, you won’t need to do it again. No, it doesn’t echo the password characters - not even asterisks. I reckoned we’d get there in the end.