Following on from the emonPi SSH disabled by default thread, thanks a lot for everyone who contributed.
With significant contribution from @alandpearson we have now implemented an update (V3.0.1) to the emonPi LCD service. The update will make it easy to toggle SSH (enable/disable) as required on all emonPi’s. The main features of the update are:
- Add toggle SSH features to the LCD
- Add shutdown feature to the LCD (shutdown button still works the same)
- Add config file for customizing the LCD service e.g. enable custom MQTT data to be displayed
- Refactor Redis polling: reduce Pi CPU usage 30%-40%
Here is a video overview of the new update in action:
The update has been merged into master branch and is available to all emonPi users via emonPi update.
This update will be very useful for existing emonPi users to easily disable SSH if it’s not required.
Advance users can now easily customize features such as backlight timeout, default screen and display custom MQTT feed data. Here is the default LCD config file :
[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 #How often the LCD is updated when a button is not pressed lcd_update_sec = 30 # which page to show after startup (3 is pv/utility readings which should be useful) default_page = 0 #Names for the power feeds displayed on the LCD feed1_name = Power1 feed2_name = Power2 feed1_unit = W feed2_unit = W [mqtt] mqtt_user = emonpi mqtt_passwd = emonpimqtt2016 mqtt_host = 127.0.0.1 mqtt_port = 1883 mqtt_emonpi_topic = emonhub/rx/5/values mqtt_feed1_topic = emon/emonpi/power1 mqtt_feed2_topic = emon/emonpi/power2 [redis] redis_host = localhost redis_port = 6379 [huawei] hilink_device_ip = 192.168.1.1
To view the emonPiLCD script version see the log file:
$ cat /var/log/emonpilcd/emonpilcd.log
2018-12-12 14:34:57,532 INFO Starting emonPiLCD V3.0.1 2018-12-12 14:34:57,618 INFO I2C LCD DETECTED 0x27 2018-12-12 14:34:58,062 INFO SD card image build version: emonSD-30Oct18 2018-12-12 14:34:58,063 INFO Attaching push button interrupt... 2018-12-12 14:34:58,076 INFO Attaching shutdown button interrupt... 2018-12-12 14:34:58,084 INFO Connecting to redis server... 2018-12-12 14:34:58,088 INFO Connected to redis 2018-12-12 14:34:58,089 INFO Connecting to MQTT Server: 127.0.0.1 on port: 1883 with user: emonpi 2018-12-12 14:34:58,094 INFO Connected to MQTT 2018-12-12 14:35:34,203 INFO Mode button SHORT press 2018-12-12 14:35:34,204 INFO Page: 0
Big thanks to @alandpearson for this update
Here is the original PR: