# Problems with GPIO push button on self build emonPi

**URL:** <https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347>\
**Category:** Hardware\
**Created:** [5 March 2019 20:40 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347 "2019-03-05T20:40:21Z")\
**Posts on this page:** 20\
**Page:** 4

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [16 March 2019 20:41 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/63 "2019-03-16T20:41:07Z")

</div>

> [@tonertiffi](#):
>
> In my effort i managed to break this, it does not update the values, if i hit refresh it works , go out, go back in values updated,never turns red

Sorry I don’t follow, are you saying emoncms is no longer refreshing?

Try using ctrl-f5 to see if that fixes it OR has your log in session timed out?

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [16 March 2019 20:45 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/64 "2019-03-16T20:45:15Z")

</div>

> [@pb66](#):
>
> emoncms is no longer refreshing?

Correct

it works everywhere else except for the feeds page.

 ![feed1](https://community.openenergymonitor.org/uploads/default/original/2X/b/b637bc953a6f36a9ffc8cd1958b74954710b42f3.png)

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [16 March 2019 21:01 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/65 "2019-03-16T21:01:58Z")

</div>

I’m still not sure what you mean, you are showing us the graph page which is data derived from the feeds, it cannot update unless the feeds update. Which is why I suggested a clear cache to the browser.

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [16 March 2019 21:36 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/66 "2019-03-16T21:36:10Z")

</div>

What is that “paused” button?

![image](https://community.openenergymonitor.org/uploads/default/original/2X/8/83d39cd872c8c98bb3c1737bfed773068da6597f.png)

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [16 March 2019 21:41 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/67 "2019-03-16T21:41:02Z")

</div>

Gmail is paused 🙂

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [16 March 2019 21:43 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/68 "2019-03-16T21:43:42Z")

</div>

ahh ok! 🙂

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [16 March 2019 22:03 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/69 "2019-03-16T22:03:43Z")

</div>

Ok this is what i do, and the results.  
I go to the inputs and select a feed add it (log to feed)  
I go to the feed page its not updating.  
I delete that feed i just created (log to feed), the rest start updating.  
i go out of the feed page, i go back in no feeds updating

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [16 March 2019 22:23 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/70 "2019-03-16T22:23:04Z")

</div>

I changed on the My account,My profile, Beta Features:

Device Module Beta

was On, to OFF  
started working 100%

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [16 March 2019 22:36 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/71 "2019-03-16T22:36:17Z")

</div>

Its now 24:30pm here, will run it till the morning and let you know, If its still updating ok.

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [17 March 2019 01:14 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/72 "2019-03-17T01:14:27Z")

</div>

Please do. If the issue persists it sounds like something @TrystanLea should be aware of.

Just as another test, can you try using input and feed names without any special characters, it should be able to handle a couple of underscores, but you never know.

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [17 March 2019 11:18 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/73 "2019-03-17T11:18:26Z")

</div>

Hi @pb66 ran it through the night, till now no problem, feeds r there, everything working 100%.As long as i do not switch to

> [@tonertiffi](#):
>
> Device Module Beta
> 
> was Off, to On

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [17 March 2019 11:28 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/74 "2019-03-17T11:28:26Z")

</div>

Hi @pb66, wondered on something, some off the gpio pins,on the RPI seem to have a low voltage not activated. I noticed that when i plug in the relay, eg IN1 signal to a random gpio pin on the RPI, the led on the pba has a very small glow, without doing anything.(this relay pba has 2x status leds) can i assume the following, that the pin gets the correct state, when being told what to do so from the script (else a small voltage on the pin if unused.)

> [@pb66](#):
>
> Sensors = {{‘name’:‘SENSOR\_A’,‘id’:‘28-800000abc123’,‘pin’: **1,** ‘on’:20,‘off’:15},  
> {‘name’:‘SENSOR\_B’,‘id’:‘28-800000def456’,‘pin’: **2** ,‘on’:20,‘off’:15},  
> {‘name’:‘SENSOR\_C’,‘id’:‘28-800000abc456’,‘pin’: **3** ,‘on’:20,‘off’:15}}

> [@pb66](#):
>
> for sensor in Sensors: gpio.setup(sensor[‘pin’], gpio.OUT) gpio.output(sensor[‘pin’], gpio.HIGH) sensor[‘status’] = 0

, any idea? Not using it that way now RPI supplies the ground and power .  
but that is my plan to use it as the final build. ![dJ5wKNh](https://community.openenergymonitor.org/uploads/default/original/2X/a/a52bda5da4dc987b2322c6380b4c8c6910857931.png)

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [17 March 2019 12:41 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/75 "2019-03-17T12:41:00Z")

</div>

The end goal, so far all this is working 100%, thanks to allot of help from @pb66

 ![RPI-GPIO-N-final2](https://community.openenergymonitor.org/uploads/default/original/2X/a/af40bf8328175e61b72cf2b463e92b1f56652dfb.jpeg)

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [22 March 2019 16:03 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/76 "2019-03-22T16:03:02Z")

</div>

Hi @pb66 sorry for asking you again, I have acquired a 20x4 lcd I2c, it updates a hole lot quicker than the 16x2 for some strange reason. Sorry my question would i be able to use the extra 2 lines to display values.

I assume you have to alter, home/emonpi/lcd/emonPiLCD.py

```auto
# MQTT Settings
# ------------------------------------------------------------------------------------
mqtt_user = config.get('mqtt','mqtt_user')
mqtt_passwd = config.get('mqtt','mqtt_passwd')
mqtt_host = config.get('mqtt','mqtt_host')
mqtt_port = config.getint('mqtt','mqtt_port')
mqtt_emonpi_topic = config.get('mqtt','mqtt_emonpi_topic')
mqtt_feed1_topic = config.get('mqtt','mqtt_feed1_topic')
mqtt_feed2_topic = config.get('mqtt','mqtt_feed2_topic')

# ------------------------------------------------------------------------------------
# Redis Settings
# ------------------------------------------------------------------------------------
redis_host = config.get('redis', 'redis_host')
redis_port = config.get('redis', 'redis_port')
r = redis.Redis(host=redis_host, port=redis_port, db=0)

# ------------------------------------------------------------------------------------
# General Settings
# ------------------------------------------------------------------------------------

# LCD backlight timeout in seconds 0: always on, 300: off after 5 min
backlight_timeout = config.getint('general','backlight_timeout')
default_page = config.getint('general','default_page')

#Names to be displayed on power reading page
feed1_name = config.get('general','feed1_name')
feed2_name = config.get('general','feed2_name')
feed1_unit = config.get('general','feed1_unit')
feed2_unit = config.get('general','feed2_unit')
```

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [22 March 2019 16:04 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/77 "2019-03-22T16:04:47Z")

</div>

Please tell me its as simple as adding in 2 more feeds 🙂

 ![20190322_180954%5B593%5D](https://community.openenergymonitor.org/uploads/default/original/2X/6/60e64d20a42b78265f5c08b5fe46ed8d6e135102.jpeg)

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [22 March 2019 17:49 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/78 "2019-03-22T17:49:43Z")

</div>

Here are the 2x files i tried to alter but ya no luck[emonPiLCD (2).txt](https://community.openenergymonitor.org/uploads/default/original/2X/d/dd7af9c29ca46b830baa9338428621f95297f93b.txt) (18.9 KB)  
[emonPiLCD.txt](https://community.openenergymonitor.org/uploads/default/original/2X/8/8b367b6ea34ce2974a61323d06af27d3e51aa66b.txt) (996 Bytes)

---

<div class="post-metadata">

**Author:** ![pb66](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/pb66/32/27_2.png) [@pb66](https://community.openenergymonitor.org/u/pb66)\
**Post date:** [22 March 2019 21:22 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/79 "2019-03-22T21:22:15Z")

</div>

I’m not familiar enough with the emonPiLCD code to know offhand.

I have no doubt it is possible, maybe @glyn.hudson can give us some pointers (he wrote the current code), otherwise I will try and look into it over the next few days, but I can’t say exactly when or comment too much further until I do.

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [23 March 2019 01:58 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/80 "2019-03-23T01:58:03Z")

</div>

Hi @pb66 much appreciated as always, thanking you

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [24 March 2019 22:21 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/81 "2019-03-24T22:21:30Z")

</div>

Hi @pb66 i did send @glyn.hudson a message, heard nothing till now. Take it he is a busy man like you. Thanks again for all your help much appreciated.

---

<div class="post-metadata">

**Author:** ![tonertiffi](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/tonertiffi/32/9427_2.png) [@tonertiffi](https://community.openenergymonitor.org/u/tonertiffi)\
**Post date:** [27 March 2019 20:37 UTC](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347/82 "2019-03-27T20:37:41Z")

</div>

Hi @pb66 any luck with regards to the Lcd, i have tried getting hold off @glyn.hudson ,proving to be a real challenge.

[Previous page](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347.md?page=3)

[Next page](https://community.openenergymonitor.org/t/problems-with-gpio-push-button-on-self-build-emonpi/10347.md?page=5)
