(SOLVED) Forgot username to emoncms website

hi everyone

been ages since i login into emoncms on raspberry pi and i forgot my username
i have tried sql recovery but cant find db

output ssh in pi and login sql user emoncms

mysql> SELECT * FROM users
→ \c
mysql> SELECT * FROM user
→ \c
mysql> SELECT * FROM users_tbl
→ \c
mysql> SELECT * FROM users.sql
→ \c
mysql> users
→ \c

hope someone can help me i got 5 years of data wanna look at

First, the data will be in flat files so you will not lose it as long as you can SSH (which apparently you can).

Try this. Troubleshooting - Guide | OpenEnergyMonitor

Cheers

Hey

I been using that link as guilde but no luck
I have all ready reset password with resetpassword.php

But cant find username

What does

$ mysql -uroot -p
USE emoncms;
SELECT * FROM users;
exit

give you?

[edit]
@TrystanLea @pb66 I note that this installation appears to be older and as it has a mysql prompt - has anything changed to get the right username?

I tried the instructions but cannot get the right password for root on an EmonPi.

pi@emonpi:~ $ mysql -uroot -p
Enter password:
ERROR 1698 (28000): Access denied for user 'root'@'localhost'

[edit2]
Instructions should be (for new installs)

$ mysql -uemoncms -p
USE emoncms;
SELECT * FROM users;
exit

and the emoncms user password in settings.php.

The mariadb and mysql commands should be the same or at least interchangeable, but I have not had need to test this theory. The mariadb commandline I think might even be accessible to the Pi user just by using sudo as I believe the root password is not set/required (by default). That, of course maybe different on the new emonSD image, but the older images should still work as expected (AFAIK).

However, @Luke_Clavey - Do you have the write apikey anywhere? eg in the emonhub.conf etc. If you have that you can use this api call in a browser

emoncms/user/get.json?apikey=abcd1234 . . .

which should return something like

{“id”:“1”,“username”:“???”,“email”:“???”,“gravatar”:“”,“name”:“Admin”,“location”:“”,“timezone”:“Europe/London”,“language”:“en_GB”,“bio”:“”,“startingpage”:“feed/list”,“apikey_write”:“???”,“apikey_read”:“???”,“tags”:“”}

Those first 3 question marks will be your user name (The question marks are just where i have removed my details, they will not be in the response you get).

thanks for all help, i was making dam rookie mistake didn’t add " ; " at end line sorry bother you guys

cheers

1 Like

quick question or i make new topic

in my input feeds i got heaps of nodes and i only ruinning 1 node via arduino and now feeds all scramble what be reason?

Inputs
Node 2		n/a				
Node 37		n/a				
 Node 40		n/a				
 Node 62		n/a				
 Node 148		n/a				
 Node 188		n/a				
 Node emontxshield		2s				
Node	Key	Name	Process list	Updated	Value			
emontxshield	power1	Lights	+ Log to feed Power to kWh	n/a	NaN			
emontxshield	power2	Mains	Log to feed Power to kWh	n/a	NaN			
emontxshield	power3			n/a	NaN			
emontxshield	power4			n/a	NaN			
emontxshield	vrms	Volts	Power to kWh Log to feed	n/a	NaN			
emontxshield	rssi			n/a	NaN			
emontxshield	power1			n/a	NaN			
emontxshield	power2			n/a	NaN			
emontxshield	power3			n/a	NaN			
emontxshield	power4			n/a	NaN			
emontxshield	vrms			n/a	NaN			
emontxshield	rssi			n/a	NaN			
emontxshield	power1			n/a	NaN			
emontxshield	power2			n/a	NaN			
emontxshield	power3			n/a	NaN			
emontxshield	power4			n/a	NaN			
emontxshield	vrms			n/a	NaN			
emontxshield	rssi			n/a	NaN		

plus 50 records same	

emontxshield	power1			2s	242			
emontxshield	power2			2s	848			
emontxshield	power3			n/a	NaN			
emontxshield	power4			n/a	NaN			
emontxshield	vrms			n/a	NaN			
emontxshield	rssi			n/a	NaN			
emontxshield	power3			2s	0			
emontxshield	power4			2s	0			
emontxshield	vrms			2s	251.7			
emontxshield	rssi			2s	-45			

There is something somewhere that occasionally generates random nodes. There are also cases that random inputs appear as well. As long as the inputs that are generating the feeds are OK, I’d just delete the others.

From what you have posted it looks like the inputs with the process and the feeds has somehow got corrupted so the feeds are probably not updating.

What version of EmonCMS are you running? Have you done any updates?