Unable to access EMONCMS nor Pi SSH

Hi installed this and have been running Pi1 solution but have not used it for a couple of years, I want to start again but I have no credentails for the CMS nor to ssh into the Pi. Can anyone point me in the right direction? I am using emonSD ver 26Oct2017

Hello @canpandave pretty sure the SSH password should be emonpi2016. You may need to enable SSH by placing a file called ‘ssh’ in the boot directory of the SD card

That worked thanks, do you have an easy way for me to recover or reset the cms login? There is no data I need to save in case that matters

You can reset the emoncms password with:

php /opt/emoncms/modules/usefulscripts/resetpassword.php

Answer yes to v9 (that needs updating) and userid 1.

Thinking about it your best starting a fresh with the latest SD card image, you can download the latest from here emonSD Download — OpenEnergyMonitor 0.0.1 documentation there are also instructions there on how to write the image.

Disregard this please:

I started with a fresh image, starts with EmonPi 2.90, detects 2 CT’s then hangs on Raspberry Pi booting, been 1/2 now.

Any suggestions?

Thanks

Sorry, a power cycle and it came up, it detects the CT’s but value are null, they were reporting when I use the old 2017 version.

Any ideas?

This is a completely fresh image, with nothing carried over from the previous version on the SD card?
If the answer is yes, it should see the c.t’s and you should see numbers updating, even though they might be zeros (i.e., on the Inputs page, the time since the last update doesn’t increment past 20 s or so).

Did it connect to your LAN and did the display say “Updating…”?

If it did and then you saw the Pi starting message, it looks as if the updating process that happens automatically on a new installation didn’t complete properly.

You must always let the automatic update complete, and it can take a long time.

Probably the easiest is to check the SD card for errors, and if it’s good, flash it again. We usually recommend, if the SD card is “old”, you start with a new one, because they do wear out over time.

I have done a new image and same issue although it maybe operator ignorance. I have not had to configure CT’s before and on boot the Pi sees them but even with the new image, same issue no counting from the CT’s. Is there something to configure for the CT’s?

Edit, I returned to 26Oct2017 Ver and now the CT’s are reading current.

Are you seeing anything coming in on the Emonhub page? Are there error messages there when it starts up? (New image of course.)

There shouldn’t be anything to do with a all-new image, it should work. It’s usually only when there is a setting or two left over from the old image which can and does cause trouble.

Hello @canpandave

I appreciate that you have reverted to the older image for now. So for anyone else facing this issue when using a new emonSD image download there is one more step required to make the latest images work on older hardware.

Login to the local emoncms account and navigate to Emonhub > Edit config:

Change the baud rate for the [[EmonPi2]], Type = EmonHubOEMInterfacer from 115200 to 38400. Older hardware used this slower baud rate, the new hardware uses 115200.

Click Save at the bottom of the page to complete.

There are a few other additions such as the SPI interfacer and DS18B20 temperature sensor interfacer that are not required. The following emonhub.conf is all that is needed for older hardware:


[hub]
    loglevel = DEBUG
    autoconf = 1

[interfacers]
    [[EmonPi2]]
        Type = EmonHubOEMInterfacer
        [[[init_settings]]]
            com_port = /dev/ttyAMA0
            com_baud = 38400
        [[[runtimesettings]]]
            pubchannels = ToEmonCMS,
            subchannels = ToRFM12,
    
    [[MQTT]]
        Type = EmonHubMqttInterfacer
        [[[init_settings]]]
            mqtt_host = 127.0.0.1
            mqtt_port = 1883
            mqtt_user = emonpi
            mqtt_passwd = emonpimqtt2016
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            node_format_enable = 0
            node_format_basetopic = emonhub/
            nodevar_format_enable = 1
            nodevar_format_basetopic = emon/
            node_JSON_enable = 0
            node_JSON_basetopic = emon/
    
    [[emoncmsorg]]
        Type = EmonHubEmoncmsHTTPInterfacer
        [[[init_settings]]]
        [[[runtimesettings]]]
            pubchannels = ToRFM12,
            subchannels = ToEmonCMS,
            url = https://emoncms.org
            apikey = xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
            senddata = 1    # Enable sending data to Emoncms.org
            sendnames = 1    # Send full input names (compression will be automatically enabled)
            interval = 30    # Bulk send interval to Emoncms.org in seconds
    
[nodes]

I tried modifying the config as mentioned however it made no difference, I changed the baud rate as suggested, still the display shows __, I went back to the old image and tried to reset the emoncms password but there is no such file as resetpassword.php.

Any other suggestions?

Make sure you are supplying enough power to the Pi. I have experienced issues when using an older minimal power supply and I know of others who have had boot issues caused by a marginal power supply. Make sure the supply has plenty of spare headroom and can supply at least twice what you think it needs. Steady state running needs very little but boot sequence is a power hog and strange things happen when you are on the edge.

Thanks, 2 amp power supply, works fine in the older version, new version works too except it recognizes the CT’s, but it does not read any data from either.

Hello @canpandave with the baud rate changed the next place to look is the EmonHub log, do you see any data coming through there?

If you see data coming through there, there should also be inputs on the inputs page. If you dont see anything in the EmonHub log window try restarting EmonHub by pressing the ‘Restart’ button top right.

I suggested looking there 3 days ago – still waiting.

I am, obviously a neophyte, but I have it back up now and this is the serial monitor log. Power indicators still show Power1:—, Power2:—. I am willing to try anything

emonPi V2.90
OpenEnergyMonitor.org
startup…
LCD found i2c 0x3F
CT 1 Cal: 90.90
CT 2 Cal: 90.90
VRMS AC ~234.23V
AC Wave Detected - Real Power calc enabled
Vcal: 256.80
Vrms: 230V
Phase Shift: 1.70
Detected 2 CT’s0 DS18B20 detected
RFM69CW Init:
Node 5 Freq 433Mhz Network 210

Available commands:
i - set node IDs (standard node ids are 1…30)
b - set MHz band (4 = 433, 8 = 868, 9 = 915)
g - set network group (RFM12 only allows 212, 0 = any)
c - set collect mode (advanced, normally 0)
…, a - send data packet to node , request ack
…, s - send data packet to node , no ack
…, p - Set AC Adapter Vcal 1p = UK, 2p = USA
v - Show firmware version
q - set quiet mode (1 = don’t report bad packets)
OK 5 47 253 213 251 4 249 178 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 206 251 107 250 57 246 22 86 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 116 250 48 249 164 243 191 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 41 249 210 247 251 240 98 86 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 1 248 173 246 174 238 163 86 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 39 4 243 2 26 7 188 84 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 39 3 206 1 245 4 106 84 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)
OK 5 201 1 110 0 55 2 37 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)

OK, so there are numbers there: 5 is the NodeID of the emonPi itself, then the following pairs of numbers (except the last 4) are the two bytes of a signed integer in decimal form: 47 253 is decoded:

  x= ([1st byte] + ( [2nd byte] * 2^8) ) 
    if x > (2^15)
        x = (x - (2^16)) 
    return x 

together the values are: power1, power2, power1_plus_power2, Vrms, T1, T2, T3, T4, T5, T6, pulseCount. Note the powers are in watts, voltage is in centivolts – 178 85 is 219.38 V.
pulseCount is unsigned and 4 bytes long.

The data is getting in from the analogue (“emon”) circuits and into the Pi, and emonHub is at least seeing it.

So, can you describe what you mean by “Power indicators”, and what now shows on the Inputs page of emonCMS? You should see something like this, but you won’t have the centre column of process steps.

From what I see it looks like the data was reported only once 19 hours ago,

and the Power Indicators I refer to are on a screen of the LCD display of the Pi.

If you’d said the powers shown on the LCD screen, we’d have known what you meant.

It looks as if the process that transfers the data from emonHub into emonCMS isn’t working. This is an area I don’t know at all well, so I might struggle.

The starting point is, are all the processes running on the Admin →System Info page?

Yes, pretty much exactly as your screen shot, I have 0 feed points pending write is the only difference