cat /var/log/emonpilcd/emonpilcd.log
2019-03-06 18:42:10,571 INFO Starting emonPiLCD V3.0.1
2019-03-06 18:42:10,664 INFO I2C LCD DETECTED 0x27
2019-03-06 18:42:11,077 INFO SD card image build version: emonSD-30Oct18
2019-03-06 18:42:11,078 INFO Attaching push button interrupt...
2019-03-06 18:42:11,108 INFO Attaching shutdown button interrupt...
2019-03-06 18:42:11,114 INFO Connecting to redis server...
2019-03-06 18:42:11,119 INFO Connected to redis
2019-03-06 18:42:11,120 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi
2019-03-06 18:42:11,124 INFO Connected to MQTT
2019-03-06 18:43:28,877 INFO Mode button SHORT press
2019-03-06 18:43:28,878 INFO Page: 4
2019-03-06 18:43:30,375 INFO Mode button SHORT press
2019-03-06 18:43:30,376 INFO Page: 6
2019-03-06 18:43:32,713 INFO Mode button SHORT press
2019-03-06 18:43:32,714 INFO Page: 7
2019-03-06 18:43:34,051 INFO Mode button SHORT press
2019-03-06 18:43:34,052 INFO Page: 8
2019-03-06 18:43:35,564 INFO Mode button SHORT press
2019-03-06 18:43:35,565 INFO Page: 9
2019-03-06 18:43:36,477 INFO Mode button SHORT press
2019-03-06 18:43:36,478 INFO Page: 10
2019-03-06 18:43:37,791 INFO Mode button SHORT press
2019-03-06 18:43:37,792 INFO Page: 11
2019-03-06 18:43:39,076 INFO Mode button SHORT press
2019-03-06 18:43:39,077 INFO Page: 0
2019-03-06 18:43:41,314 INFO Mode button SHORT press
2019-03-06 18:43:41,315 INFO Page: 2
2019-03-06 19:37:28,340 INFO Mode button SHORT press
2019-03-06 19:37:28,341 INFO Page: 4
cd emonpi
cd lcd
nano emonPiLCD.py
my new value excluding the stars 12 , 26
Anyone having the same problem, used the bottom circuit one. Also changed the GPIO PINS.
# Set up the buttons and install handlers
# emonPi LCD push button Pin 16 GPIO 23
# Uses gpiozero library to handle short and long press https://gpiozero.readthedocs.io/en/stable/api_input.html?highlight=button
# push_btn = Button(23, pull_up=False, hold_time=5, bounce_time=0.1)
# No bounce time increases responce time but may result in switch bouncing...
logger.info("Attaching push button interrupt...")
try:
push_btn = Button(**12**, pull_up=False, hold_time=5)
push_btn.when_pressed = buttonPress
push_btn.when_held = buttonPressLong
except:
logger.error("Failed to attach LCD push button interrupt...")
logger.info("Attaching shutdown button interrupt...")
try:
shut_btn = Button(**26**, pull_up=False, hold_time=5)
shut_btn.when_pressed = preShutdown
shut_btn.when_held = shutdown