openenergymonitor / emonpi

Raspberry Pi Based Energy Monitor. Hardware, Firmware & related software for the PI.
https://guide.openenergymonitor.org/setup
270 stars 113 forks source link

Reduce PI CPU usage by approx 40%, configuration file for emonPiLCD.py & power readings displayed on lcd user configurable #75

Closed alandpearson closed 5 years ago

alandpearson commented 5 years ago

Added config file & parser to emonPiLCD.py

Allows user to tweak config and choose other values for display for the power readings (for example, if an external power meter is being used)

Fixed issue with backlight=0 , and default page is now the power readings, with backlight on. Useful if emonpi is in a dark cupboard (as they usually are)

Of course, with a config file the user can easily choose their preferred settings and sane defaults can be added.

alandpearson commented 5 years ago

This pull request also massively reduces PI CPU usage. please merge :)

glynhudson commented 5 years ago

Wow, this is really great. The LCD script was overdue for an overhaul.

The config file is fantastic.

Few issues:

  1. When I first ran it I got an error since mqtt_utilitykw_topic was missing from the MQTT config:
Traceback (most recent call last):
  File "./emonPiLCD.py", line 46, in <module>
    mqtt_utilityKw_topic = config.get('mqtt','mqtt_utilityKw_topic')
  File "/usr/lib/python2.7/ConfigParser.py", line 618, in get
    raise NoOptionError(option, section)
ConfigParser.NoOptionError: No option 'mqtt_utilitykw_topic' in section: 'mqtt'

After I added an entry the script ran fine.

It is possible to setup Emoncms to publish kwh data to MQTT using publish to MQTT input process. We could look at defining this as part the standard emonPi Input Process setup using the new Device Module Template feature.

  1. MQTT data not being processed

I'm getting message:

utility: no data
PV: no data

Even though MQTT data is available. Even if MQTT data was not available LCD should still be able to display the other screens without hanging

Logfile is showing:

2018-10-31 00:59:33,187 INFO Starting emonPiLCD V2.2.1
2018-10-31 00:59:33,323 INFO I2C LCD DETECTED 0x27
2018-10-31 00:59:33,767 INFO SD card image build version: emonSD-30Oct18
2018-10-31 00:59:33,768 INFO Attaching push button interrupt...
2018-10-31 00:59:33,781 INFO Connecting to redis server...
2018-10-31 00:59:33,792 ERROR waiting for redis-server to start...
2018-10-31 00:59:34,798 ERROR waiting for redis-server to start...
2018-10-31 00:59:35,803 ERROR waiting for redis-server to start...
2018-10-31 00:59:36,808 ERROR waiting for redis-server to start...
2018-10-31 00:59:37,813 ERROR waiting for redis-server to start...
2018-10-31 00:59:38,818 ERROR waiting for redis-server to start...
2018-10-31 00:59:39,823 ERROR waiting for redis-server to start...
2018-10-31 00:59:40,829 ERROR waiting for redis-server to start...
2018-10-31 00:59:41,843 INFO Connected to redis
2018-10-31 00:59:41,844 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi
2018-10-31 00:59:41,848 INFO Connected to MQTT
2018-10-31 00:59:52,369 INFO Starting emonPiLCD V2.2.1
2018-10-31 00:59:52,459 INFO I2C LCD DETECTED 0x27
2018-10-31 00:59:52,901 INFO SD card image build version: emonSD-30Oct18
2018-10-31 00:59:52,902 INFO Attaching push button interrupt...
2018-10-31 00:59:52,914 INFO Connecting to redis server...
2018-10-31 00:59:52,921 INFO Connected to redis
2018-10-31 00:59:52,922 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi
2018-10-31 00:59:52,926 INFO Connected to MQTT
2018-11-27 16:09:02,466 INFO Starting emonPiLCD V2.2.1
2018-11-27 16:09:02,554 INFO I2C LCD DETECTED 0x27
2018-11-27 16:09:02,997 INFO SD card image build version: emonSD-30Oct18
2018-11-27 16:09:02,998 INFO Attaching push button interrupt...
2018-11-27 16:09:03,010 INFO Connecting to redis server...
2018-11-27 16:09:03,016 INFO Connected to redis
2018-11-27 16:09:03,017 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi
2018-11-27 16:09:03,021 INFO Connected to MQTT
2018-11-27 16:13:43,369 INFO Mode button SHORT press
2018-11-27 16:13:43,370 INFO Page: 1
2018-11-27 16:13:48,372 INFO Mode button LONG press
2018-11-27 16:13:49,541 INFO SSH Enabled
2018-11-27 16:24:03,491 INFO Starting emonPiLCD V2.2.1
2018-11-27 16:24:03,578 INFO I2C LCD DETECTED 0x27
2018-11-27 16:24:04,029 INFO SD card image build version: emonSD-30Oct18
2018-11-27 16:24:04,030 INFO Attaching push button interrupt...
2018-11-27 16:24:04,042 INFO Attaching shutdown button interrupt...
2018-11-27 16:24:04,046 ERROR Failed to attach shutdown button interrupt...
2018-11-27 16:24:04,048 INFO Connecting to redis server...
2018-11-27 16:24:04,055 INFO Connected to redis
2018-11-27 16:24:04,057 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi
2018-11-27 16:24:04,062 INFO Connected to MQTT
2018-11-27 16:24:06,066 INFO Mode button SHORT press
2018-11-27 16:24:06,067 INFO Page: 3
alandpearson commented 5 years ago

OK , clearly some issues there :) I'll take a looksie now.

My rationale for having this configurable is simply my setup. I do not use the emonPI to monitor using CTs. I've a 3 phase install and I use a separate Socomec Dirus power meter which I read via modbus. I use emonpi as the hub. For the solar, I rely on what my Samil inverter tells me (again I wrote code to collect directly and post to emoncms via MQTT). I'd like to see those values on the Pi display... That was my itch.

On the 'no data' - can you double check your Mqtt topic is correct ? It will only be updated when the topic is updated, obviously. Can you post the config file ?

Thanks! Alan

alandpearson commented 5 years ago

Sorry, do I also understand the pushbutton does nothing when pressed in this scenario ? Does it cycle through the other screens still ?

alandpearson commented 5 years ago

Does this produce output (to show mqtt is working as desired ?)

mosquitto_sub -u 'emonpi' -P 'emonpimqtt2016' -t 'emon/emonpi/power1'

glynhudson commented 5 years ago

Ah ok, running the script again. It now seems to connect to connect to MQTT and I can scroll through the various screens.

After pushing the button a few times I got a warning

Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
    self.run()
  File "/usr/lib/python2.7/threading.py", line 754, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 460, in held
    parent._fire_held()
  File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 364, in _fire_held
    self.when_held()
  File "./emonPiLCD.py", line 109, in buttonPressLong
    push_btn.wait_for_press()
NameError: global name 'push_btn' is not defined

I would prefer to use power1 and power1 as the names for the CT1/CT2 since the emonPi is used to monitor lots of different applications, not just solar PV, it could be a heat pump or immersion heater. I think using power1 and power2 is best.

Here is my config

[mqtt]
mqtt_user = emonpi
mqtt_passwd = emonpimqtt2016
mqtt_host = 127.0.0.1
mqtt_port = 1883
mqtt_emonpi_topic = emonhub/rx/5/values
mqtt_utilityW_topic = emon/emonpi/power1
mqtt_pvW_topic = emon/emonpi/power2
mqtt_utilitykw_topic = mqtt_utilitykw

[general]
uselogfile = True
# LCD backlight timeout in seconds 0: always on, 300: off after 5 min
# as the emonpi could be installed in a dark place, keep the backlight on, eh ?
backlight_timeout = 0
# which page to show after startup (2 is pv/utility readings which should be useful)
default_page = 2

[redis]
redis_host = localhost
redis_port = 6379

[huawei]
hilink_device_ip = 192.168.1.1
alandpearson commented 5 years ago

Super. Let me sort this now. I'll get a new commit shortly..

alandpearson commented 5 years ago

OK, a little bit longer than shortly, but here it is. I fixed a few niggles and made all the power display fully configurable (name, mqtt feed, unit) so whoever is monitoring whatever can call them whatever they like. Defaulted all to 'power1', 'power2' and 'W' as requested.

Oh yes, and I re-arranged the display so t1 and t2 are on the same page :)

On your comment ref the KWH stuff, that could be very useful. We would simply need to define another page in 'updateLCD()' add the config variables and mqtt subscriptions and we'd be off to the races.

Anyhow, please test this one and let me know..

glynhudson commented 5 years ago

Wow, that was quick! Thanks a lot. I will test in the office tomorrow. šŸ‘

glynhudson commented 5 years ago

Nice work, this is working really great now.

The only remaining issue I'm experiancing is the emonPi shutdown button does not seem to work. Are you able to recreate this?

I'm also still seeing a few errors, althoug these erros don't seem to effect the opperation of the script:

Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py", line 213, in _call_when_changed
    super(RPiGPIOPin, self)._call_when_changed()
  File "/usr/lib/python2.7/dist-packages/gpiozero/pins/pi.py", line 268, in _call_when_changed
    method()
  File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 323, in _fire_events
    self._fire_activated()
  File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 355, in _fire_activated
    super(HoldMixin, self)._fire_activated()
  File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 301, in _fire_activated
    self.when_activated()
  File "./emonPiLCD.py", line 123, in buttonPress
    updateLCD() 
  File "./emonPiLCD.py", line 182, in updateLCD
    elif eval(r.get("gsm:active")) or eval(r.get("eth:active")):
TypeError: eval() arg 1 must be a string or code object
alandpearson commented 5 years ago

Hmmm. Those errors are strange. Do you have the 3G module connected ?

In the shutdown - I did not test as I want to keep the RF test sketch running a long time (few days now and no issues).

The shutdown button needs a long press. More than five seconds. Old behaviour was a shorter long press I think (directly parsing gpio) Is it not working at all?

On Wed, 28 Nov 2018 at 16:22, Glyn Hudson notifications@github.com wrote:

Nice work, this is working really great now.

The only remaining issue I'm experiancing is the emonPi shutdown button does not seem to work. Are you able to recreate this?

I'm also still seeing a few errors, althoug these erros don't seem to effect the opperation of the script:

Traceback (most recent call last): File "/usr/lib/python2.7/dist-packages/gpiozero/pins/rpigpio.py", line 213, in _call_when_changed super(RPiGPIOPin, self)._call_when_changed() File "/usr/lib/python2.7/dist-packages/gpiozero/pins/pi.py", line 268, in _call_when_changed method() File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 323, in _fire_events self._fire_activated() File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 355, in _fire_activated super(HoldMixin, self)._fire_activated() File "/usr/lib/python2.7/dist-packages/gpiozero/mixins.py", line 301, in _fire_activated self.when_activated() File "./emonPiLCD.py", line 123, in buttonPress updateLCD() File "./emonPiLCD.py", line 182, in updateLCD elif eval(r.get("gsm:active")) or eval(r.get("eth:active")): TypeError: eval() arg 1 must be a string or code object

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-442508508, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gr6ep7FMuUKmS_nYU_jWpexI_mwKks5uzrg5gaJpZM4Y0ZQ6 .

-- AlanP

glynhudson commented 5 years ago

No, I've just got Ethernet connected.

Previously the shutdown button required a 5s press and hold, the LCD counted down the 5s on the display. This worked very well. See video: https://youtu.be/2Jf5YLxkTF0?t=121

alandpearson commented 5 years ago

Ok does shutdown work if just held for five sec?

The button library doesnā€™t allow to do the countdown as it only tells me after the button press is complete.... so a press and hold is the best you get :/ I donā€™t think thatā€™s a bad thing on a recessed button ..

Let me know if it works and Iā€™ll try and figure out this other error.

On Wed, 28 Nov 2018 at 17:29, Glyn Hudson notifications@github.com wrote:

No, I've just got Ethernet connected.

Previously the shutdown button required a 5s press and hold, the LCD counted down the 5s on the display. This worked very well. See video: https://youtu.be/2Jf5YLxkTF0?t=121

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-442533979, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gpoVX-kTaxk9Ujs5FL1DVFS7ZPJEks5uzsgWgaJpZM4Y0ZQ6 .

-- AlanP

alandpearson commented 5 years ago

OK, the warning above should now be gone. Caused by a redis variable not being initialised. I've made sure all relevant ones are now in main(). Just need to confirm shutdown works.... If not, can you send me the log to see if it detects the button being pressed ?

glynhudson commented 5 years ago

Ok does shutdown work if just held for five sec?

I don't think so. I did hold for quite a while. I can test again tomorrow.

The button library doesnā€™t allow to do the countdown as it only tells me After the button press is complete.... so a press and hold is the best you get :/ I donā€™t think thatā€™s a bad thing on a recessed button ..

That's a same, since it's a recessed button often in a hard to reach place it's good to have some sort of confirmation that is has been pressed. The countdown worked very well to that effect.

alandpearson commented 5 years ago

Thinking on this....

To be honest, I don't believe many people will ever press the recessed button, preferring to just rip the power out. Going digging for a pin and messing in a dark utility cupboard for a emonpi mounted to a wall in just the wrong position...

So, I've made both shutdown & ssh menu options controlled from the main button. Simply press the button to the corresponding menu item is shown, then press and hold to confirm. Simples.

I've also left the shutdown handler on the recessed button, while still not able to do a countdown for the five seconds, it should work just the same - a five second press, good night emonpi !

Spoiler alert - holding the main push button on any other page toggles the backlight

Spoiler alert #2 - when the recessed button is pressed, display will prompt immediately to hold for 5 secs to shutdown (so you know it's pressed).

glynhudson commented 5 years ago

So, I've made both shutdown & ssh menu options controlled from the main button. Simply press the button to the corresponding menu item is shown, then press and hold to confirm. Simples.

Awesome, that's a really nice improvement!

I've also left the shutdown handler on the recessed button, while still not able to do a countdown for the five seconds, it should work just the same - a five second press, good night emonpi !

That's that's fine. Countdown not essential

Spoiler alert - holding the main push button on any other page toggles the backlight

Nice, does the back light still turn off automatically after a period of time?

I've just tested and have encountered an issue while trying to shutdown via the LCD menu, I get the error

Failed to open /dev/initctl: Permission denied
Failed to talk to init daemon.

And the Pi fails to shut down. Are you able to recreate this?

I've pushed your changes to an lcd-update branch on the emonpi repo. Please could you base on PR's on this branch since I've fixed the merge conflict. This will make is much easier to test.

https://github.com/openenergymonitor/emonpi/tree/lcd-update

alandpearson commented 5 years ago

Thanks

Obvious question - is the .py script running as root ? (its calling the exact function it was before)

The backlight timer is configureable in the .cfg file :)

On 5 Dec 2018, at 17:19, Glyn Hudson notifications@github.com wrote:

So, I've made both shutdown & ssh menu options controlled from the main button. Simply press the button to the corresponding menu item is shown, then press and hold to confirm. Simples.

Awesome, that's a really nice improvement!

I've also left the shutdown handler on the recessed button, while still not able to do a countdown for the five seconds, it should work just the same - a five second press, good night emonpi !

That's that's fine. Countdown not essential

Spoiler alert - holding the main push button on any other page toggles the backlight

Nice, does the back light still turn off automatically after a period of time?

I've just tested and have encountered an issue while trying to shutdown via the LCD menu, I get the error

Failed to open /dev/initctl: Permission denied Failed to talk to init daemon. And the Pi fails to shut down. Are you able to recreate this?

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-444567958, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61grfrqCsCqYTnB4XJTFLPpn7fQNN6ks5u2AAFgaJpZM4Y0ZQ6.

glynhudson commented 5 years ago

Obvious question - is the .py script running as root ? (its calling the exact function it was before)

Doh! My mistake. It now shuts down the Pi :+1:

I would like the IP address page to be default since this is very useful for setup. I've tried changing default page to 1. However this shows "wifi: not connected" when in face Etherent is connected. If I scroll through the menus then Ethernet IP address is shown

On rebooting the Pi I noticed for about 10s after boot up the display shows

img_20181205_172750

I wonder where the 'y'`character is coming from? I wonder if we should show a more user-friendly message like: "please wait..."?

alandpearson commented 5 years ago

Iā€™ll sort that. It says ā€˜no data yetā€™ ;)

Let me see why Ethernet is not working as default.

On Wed, 5 Dec 2018 at 17:49, Glyn Hudson notifications@github.com wrote:

Obvious question - is the .py script running as root ? (its calling the exact function it was before)

Doh! My mistake. It now shuts down the Pi šŸ‘

I would like the IP address page to be default since this is very useful for setup. I've tried changing default page to 1. However this shows "wifi: not connected" when in face Etherent is connected. If I scroll through the menus then Ethernet IP address is shown

On rebooting the Pi I noticed for about 10s after boot up the display shows

[image: img_20181205_172750] https://user-images.githubusercontent.com/758844/49531969-66109f80-f8b3-11e8-9e75-f3d5caf74fed.jpg

I wonder where the 'y'`character is coming from? I wonder if we should show a more user-friendly message like: "please wait..."?

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-444578355, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gpV5XpgzejuTGdVuwX-Sv3ayDYJfks5u2AcjgaJpZM4Y0ZQ6 .

-- AlanP

alandpearson commented 5 years ago

Hi Glyn,

Set the default page to 0 (zero) in the conf file for ethernet. Page 1 is wifi.

Alan

glynhudson commented 5 years ago

Great, I've just fixed these two remaining 'issues" myself on the lcd-update branch.

https://github.com/openenergymonitor/emonpi/commit/26c7eae6e2e2053facef9a13aee014fd4ae6e8ee https://github.com/openenergymonitor/emonpi/commit/26c7eae6e2e2053facef9a13aee014fd4ae6e8ee

I've also bumped version to V3.0.0

I think we're now ready for some user testing. I'll get this branch loaded onto some testing units and make a post on the forum to get feedback from some other users. Or you could do this yourself if you like? https://community.openenergymonitor.org

After all this is your contribution, I would like you to get the credit.

Thanks a lot for your help.

alandpearson commented 5 years ago

Great news ! I'll let you make the announcement , I'm just happy to get the code in there... it saves me hacking every time there is an 'update', now I can just have a nice conf file set the way I want. Glad to help improve the emonpi !

Alan

glynhudson commented 5 years ago

Sure. I will announce on the forum. Do you have a user account on our forum so I can mention and credit you in the post?

alandpearson commented 5 years ago

Yes - alandpearson

Thanks Glyn !

Now what to hack on next ? :)

On Thu, 6 Dec 2018 at 18:00, Glyn Hudson notifications@github.com wrote:

Sure. I will announce on the forum. Do you have a user account on our forum so I can mention and credit you in the post?

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-444968442, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gvJIch8dxE18v9cyWS_b3M7Tgn7Iks5u2VtZgaJpZM4Y0ZQ6 .

-- AlanP

glynhudson commented 5 years ago

Hi Alan,

Just a bit more about this. Before I make an announcement there is one little feature that I've been meaning to add. The ability to disable SSH (once enabled) from the LCD. The groundwork for this has been done, there is a bash script in emonpi/lcd/disablessh.sh which will perform the task. We just need to detect if SSH is enabled or not. I think a good indicator for this is check for SSH service running or not.

What method would you recomend in Python to check if SSH service is running? Would you look at the output of ps aux or is there a pure python method? If possible it would be good to avoid requiring extra libraries.

It would probably be best to check for ssh periodically in the background so we don't add a delay into the LCD menu while SSH status is checked.

What are your thoughts on this?

alandpearson commented 5 years ago

Hey Glyn,

Believe it or not, Iā€™m not a python programmer ! Iā€™m a perl guy .. I can hack on existing stuff and google what I need to know.. itā€™s just another programming language ;) I had a quick googleā€¦ doesnā€™t seem to be any built in stuff to search for a process by name, so it would be an os/exec call. I would create another shell script (is_ssh_running) and that shell script would either look for ā€˜sshdā€™ process using ps -aux | grep sshd | grep -v grep or use systemd status sshd (which returns 0 if it is running, non zero if not). Actually, wouldnā€™t need to create a shell script at all, just have python exec 'systemd status sshd ā€˜ and check the return code.

In the LCD script, no need to check in the background as the check takes microseconds, and we should only do when needed. There would be some logic changes in the lcd script too, nothing awful though.

Alan

On 8 Dec 2018, at 01:05, Glyn Hudson notifications@github.com wrote:

Hi Alan,

Just a bit more about this. Before I make an announcement there is one little feature that I've been meaning to add. The ability to disable SSH (once enabled) from the LCD. The groundwork for this has been done, there is a bash script in emonpi/lcd/disablessh.sh which will perform the task. We just need to detect if SSH is enabled or not. I think a good indicator for this is check for SSH service running or not.

What method would you recomend in Python to check if SSH service is running? Would you look at the output of ps aux or is there a pure python method? If possible it would be good to avoid requiring extra libraries.

It would probably be best to check for ssh periodically in the background so we don't add a delay into the LCD menu while SSH status is checked.

What are your thoughts on this?

ā€” You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445415932, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gunWt1_j58NohfJOY-ULMiJqA8zmks5u2xBlgaJpZM4Y0ZQ6.

Steve720 commented 5 years ago

Python has built-in socket handling, so you could check if port 22 is accepting connections. Test program:

!/usr/bin/env python

import socket

sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM) result = sock.connect_ex(('127.0.0.1', 22)) if result == 0: print "sshd OK" sock.close()

alandpearson commented 5 years ago

Thanks Steve, that's useful.
I've gone with the systemctl route (as it was just easier in the end)

Pull request created against lcd-test branch.

glynhudson commented 5 years ago

@alandpearson wow, nice work! Thanks a lot.

Just had a quick test, it seems I had to change the name of the service the script looked for to sshd to ssh, I was getting message "sshd cannot be found". It's working great not, SSH toggle works really well.

I've also made a minor change to hid interfaces which are not connected and show the connected interfaces first, I've pushed your updates and my changes to the lcd-update branch:

https://github.com/openenergymonitor/emonpi/tree/lcd-update

I'll get that announcement done soon once I've tested for a few days. Thanks again for your help.

alandpearson commented 5 years ago

Nice !

I didnā€™t test it that well as I didnā€™t want locked out of pi :)

I now need to figure out how to get your changed into my branch - they would be very useful.

Cheers ! Alan

On Mon, 10 Dec 2018 at 18:24, Glyn Hudson notifications@github.com wrote:

@alandpearson https://github.com/alandpearson wow, nice work! Thanks a lot.

Just had a quick test, it seems I had to change the name of the service the script looked for to sshd to ssh, I was getting message "sshd cannot be found". It's working great not, SSH toggle works really well.

I've also made a minor change to hid interfaces which are not connected and show the connected interfaces first, I've pushed your updates and my changes to the lcd-update branch:

https://github.com/openenergymonitor/emonpi/tree/lcd-update

I'll get that announcement done soon once I've tested for a few days. Thanks again for your help.

ā€” You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445919088, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gn1CQif9dWpir4dfSSz8Ju7XK3Jfks5u3qbMgaJpZM4Y0ZQ6 .

-- AlanP

glynhudson commented 5 years ago

Do you have openenergymonitor/emonpi setup as a remote?

If you don't see openenergymonitor/emonpi listed under $ git remote -v then you will need to add using:

$ git add remote upstream https://github.com/openenergymonitor/emonpi.git

Then to pull in my changes and switch to lcd-update branch run:

git fetch upstream lcd-update
git checkout lcd-update`

This will switch you to the lcd-update branch keeping your changes intact. If you want to merge my changes then use:

git fetch upstream led-update
git merge lcd-update`

Hopefully the changes will be merged into master branch very soon so we can all switch back to using this.

On Mon, 10 Dec 2018 at 18:29, alandpearson notifications@github.com wrote:

Nice !

I didnā€™t test it that well as I didnā€™t want locked out of pi :)

I now need to figure out how to get your changed into my branch - they would be very useful.

Cheers ! Alan

On Mon, 10 Dec 2018 at 18:24, Glyn Hudson notifications@github.com wrote:

@alandpearson https://github.com/alandpearson wow, nice work! Thanks a lot.

Just had a quick test, it seems I had to change the name of the service the script looked for to sshd to ssh, I was getting message "sshd cannot be found". It's working great not, SSH toggle works really well.

I've also made a minor change to hid interfaces which are not connected and show the connected interfaces first, I've pushed your updates and my changes to the lcd-update branch:

https://github.com/openenergymonitor/emonpi/tree/lcd-update

I'll get that announcement done soon once I've tested for a few days. Thanks again for your help.

ā€” You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub < https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445919088 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AH61gn1CQif9dWpir4dfSSz8Ju7XK3Jfks5u3qbMgaJpZM4Y0ZQ6

.

-- AlanP

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445920942, or mute the thread https://github.com/notifications/unsubscribe-auth/AAuUPGgYV9-VykGgbOYGiJErKjT2OhXsks5u3qgOgaJpZM4Y0ZQ6 .

-- Glyn Hudson

https://openenergymonitor.org http://zerocarbonadventures.co.uk

alandpearson commented 5 years ago

Thanks Glyn. Iā€™ll give that a go and try not to break my emonpi :)

Chuffed it will all be merged !

On Mon, 10 Dec 2018 at 18:46, Glyn Hudson notifications@github.com wrote:

Do you have openenergymonitor/emonpi setup as a remote?

If you don't see openenergymonitor/emonpi listed under $ git remote -v then you will need to add using:

$ git add remote upstream https://github.com/openenergymonitor/emonpi.git https://github.com/openenergymonitor/emonpi.git

Then to pull in my changes and switch to lcd-update branch run:

git fetch upstream led-update
git checkout lcd-update`

This will switch you to the lcd-update branch keeping your changes intact. If you want to merge my changes then use:

git fetch upstream led-update
git merge lcd-update`

Hopefully the changes will be merged into master (emon-pi) branch very soon so we can all switch back to using this.

On Mon, 10 Dec 2018 at 18:29, alandpearson notifications@github.com wrote:

Nice !

I didnā€™t test it that well as I didnā€™t want locked out of pi :)

I now need to figure out how to get your changed into my branch - they would be very useful.

Cheers ! Alan

On Mon, 10 Dec 2018 at 18:24, Glyn Hudson notifications@github.com wrote:

@alandpearson https://github.com/alandpearson wow, nice work! Thanks a lot.

Just had a quick test, it seems I had to change the name of the service the script looked for to sshd to ssh, I was getting message "sshd cannot be found". It's working great not, SSH toggle works really well.

I've also made a minor change to hid interfaces which are not connected and show the connected interfaces first, I've pushed your updates and my changes to the lcd-update branch:

https://github.com/openenergymonitor/emonpi/tree/lcd-update

I'll get that announcement done soon once I've tested for a few days. Thanks again for your help.

ā€” You are receiving this because you were mentioned.

Reply to this email directly, view it on GitHub <

https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445919088

, or mute the thread <

https://github.com/notifications/unsubscribe-auth/AH61gn1CQif9dWpir4dfSSz8Ju7XK3Jfks5u3qbMgaJpZM4Y0ZQ6

.

-- AlanP

ā€” You are receiving this because you commented. Reply to this email directly, view it on GitHub < https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445920942 , or mute the thread < https://github.com/notifications/unsubscribe-auth/AAuUPGgYV9-VykGgbOYGiJErKjT2OhXsks5u3qgOgaJpZM4Y0ZQ6

.

-- Glyn Hudson

https://openenergymonitor.org http://zerocarbonadventures.co.uk

ā€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/openenergymonitor/emonpi/pull/75#issuecomment-445926735, or mute the thread https://github.com/notifications/unsubscribe-auth/AH61gpCdUDg3jrN3uFYGEm9RUcSuQgxGks5u3qwhgaJpZM4Y0ZQ6 .

-- AlanP

glynhudson commented 5 years ago

Form thread announcement has been made: https://community.openenergymonitor.org/t/emonpi-lcd-v3-0-update-ssh-toggle-shutdown-config-cpu-reduction/9459

Thanks again for your help, I'm very much enjoying using the new features of this update :+1: