LCD Display on self build EmonPi - Build & IP?

I’m going through the full build process for my RPi EmonPi setup, and at one point, the LCD was showing the IP address. Now, it is just showing emonPi build N/A.

I feel this is an indication of something broken, and I’d much rather see the IP address. Do you know what I might have done wrong?

The build version is identified by a file called emonSD-xxx in /boot. I guess your build must be missing this file?

Which file defines the IP screen?

It’s part of the emonPi software, in the lcd folder, specifically lines 336-403 of emonPiLCD.py

However if you add the missing file to /boot it should then work correctly and you will be able to see the IP number, it’s failing as it cannot find the /boot/emonSD-xxx file, wouldn’t it be easier to

sudo touch /boot/emonSD-xxx

rather than start editing the code and possibly preventing future updates happening due to local changes?

Ahh, ok, so the same file. I see. Thanks!

ok, so no need to modify the emonPiLCD.py code.

Problem: After a while (day or two?) the LCD LED will turn off. I can get it to turn back on by removing GND and reconnecting GND. But then, it displays boxes on the top row.

The service is no longer running (verified by sudo service --status-all)

I can restart the service and the display works again.

Off the top of your head, does this sound like something you’re familiar with? I’m guessing it’s more related to my screen than the Emon script, and that removing the GND is what’s stopping the service.

Update…I’ve narrowed it down:

Actually, the backlight is turning off after a few seconds, even with emonPiLCD service still running.

Restarting the service turns back on the backlight.

Any ideas?

I decided to stop being a moron and just look at the code. Sure enough, a 300ms timeout on that button.

It says to enter 0 for always on, but it acts just like 0 and turns off instantly.

I’ll continue not being a moron and will keep looking at the code, but I wanted to make sure you don’t waste your time on me for this one.

I’m happy now.

I saw code in there for buttons. (thanks!) So, I put the value back to 300ms, and soldered up two buttons - one for the LCD screens and one for the shutdown. They work well.

Note: I did notice that the LCD button had the internal pull-down specified, but the power-down button did not. To keep upgrades working, I left the code as-is, and soldered on an external pull-down resistor for that pin.

1 Like