[PLUGIN] Touch Display

Discuss, contribute and orient Volumio development!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

[PLUGIN] Touch Display

Postby gvolt » Mon Jul 01 2019 21:44

I have rewritten and extended the touch display plugin. The following features have been added to the plugin's configuration page:

  • Screen saver

    The options allow setting the timeout in seconds until the screen saver (DPMS state "off") gets invoked. A value of 0 disables the screen saver.
    Further more it is possible to block the screen saver as long as Volumio is in playing state.

  • Screen brightness

    For the Raspberry Foundation 7" touch screen the screen brightness can be set.
    If current screen brightness should be above 14 and then set to a value below 15 a modal shows up to warn for a very dark screen. The modal offers to test the new (low) value by applying it for 5 seconds before the previous brightness gets restored. After that the user can decide if the new or the previous setting should be kept.

    The plugin is also prepared for automatic brightness regulation. The option to use automatic brightness regulation will only show up on the plugin's configuration page if a file named /etc/als exists.

    Obviously automatic brightness requires additional hardware in the shape of an ambient light sensor. This is typically an LDR with a voltage divider connected to an ADC like the TI ADS1115. For example if the LDR would be connected to input AIN0 of an ADS1115 measuring single-ended signals in continuous conversion mode the current converted LDR value would appear in /sys/devices/platform/soc/*04000.i2c/i2c-1/1-0048/in4_input. This file would need to be symlinked to /etc/als as the plugin awaits the current value of an ambient light sensor in /etc/als.

    When automatic brightness gets enabled for the first time the light sensor obligatorily has to be "calibrated" according to minimum and maximum screen brightness. The calibration process consists of measuring the ambient light in a first setting (e.g. darkness or twilight) where the lowest screen brightness should be reached and a second setting (e.g. "normal" daylight or bright sunshine) where the highest screen brightness should be reached. Through a dedicated button the calibration process can be repeated anytime if needed. The range of possible screen brightness values can be adjusted through the minimum and maximum screen brightness settings.

    Further more when using automatic brightness it is possible to define a third "reference" point to form a brightness curve between minimum and maximum screen brightness reaching a "reference" screen brightness at a certain ambient brightness. This can be useful if the progression of screen brightness in accordance to ambience brightness needs to be slowed down or accelerated.

  • Display orientation

    For the Raspberry Foundation 7" touch screen the display can be rotated by 180°.
    When this setting is changed a modal shows up to inform about a reboot is required. The user has the option to initiate the reboot or proceed (and reboot later).

  • Show/hide mouse pointer

    Self explanatory. By default the mouse pointer is hidden.

I have already opened a PR https://github.com/volumio/volumio-plugins/pull/338. Please have a look.
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


[PLUGIN] Touch Display

Postby gvolt » Mon Jul 22 2019 11:53

How to install the plugin from .zip file:

1. If you previously did install the touch_display plugin from the plugin store please uninstall it before proceeding.

2. Then connect to Volumio via ssh.

3. If you had installed the touch_display plugin from the plugin store you need to remove /data/volumiokiosk:
Code: Select all
sudo rm -r /data/volumiokiosk

4. Download the plugin package
Code: Select all
wget https://github.com/gvolt/volumio-touch_display-plugin/releases/download/v1.1.0/touch_display_1_1_1.zip

5. Create a directory for unzipping the plugin package
Code: Select all
mkdir touch_display_1_1_1

6. Unzip the plugin package to the newly created directory
Code: Select all
miniunzip touch_display_1_1_1.zip -d touch_display_1_1_1

7. Change into the directory with the unzipped files
Code: Select all
cd touch_display_1_1_1

8. Install the plugin
Code: Select all
volumio plugin install
Last edited by gvolt on Thu Aug 08 2019 19:05, edited 1 time in total.
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47


Re: [PLUGIN] Touch Display

Postby michel8166 » Mon Jul 22 2019 17:59

Thanks works perfectly!

Verstuurd vanaf mijn Nokia 6.1 met Tapatalk
raspberry pi 3b+ - allo isolator - kali reclocker, allo piano 2.1, raspberry pi official 7-inch touch screen, Heed luna pre + Q-psu power supply, Bryston 7b-nrb mono blocks, Spendor Sp7/1 loudspeakers
User avatar
michel8166
Audiophile
Audiophile
 
Posts: 125
Joined: Wed Apr 05 2017 13:42
Location: the netherlands


[PLUGIN] Touch Display

Postby gvolt » Mon Jul 22 2019 18:20

@michel8166

Glad to hear that.
Many thanks for your feedback :)
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47


[PLUGIN] Touch Display

Postby gvolt » Thu Aug 08 2019 20:45

Good news! The new touch display plugin is now available from the plugin store. :D

If you had a previous version installed remember to execute the steps 1 to 3 from the post above (https://forum.volumio.org/touch-display-t12586.html#p65033). After that just install from the plugin store.
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47


[PLUGIN] Touch Display

Postby tabularasa » Sun Aug 11 2019 14:58

Hi,

I'm using the touch display plugin on Odroid C1+ and C2. The latest update to version 1.1.1 seems to break the compability with Odroid images.

I think it's related to the new install script line 49:
Code: Select all
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y xinit xorg openbox libexif12 xserver-xorg-legacy


I tested with the current version for the Odroid C1+:
VERSION: 2.586
RELEASE DATE: 04-06-2019

Package "xserver-xorg-legacy" seems to be not available for the C1+ image and blocks installation of the other packages:
volumio@volumio:~$ sudo apt-get install -y xinit xorg openbox libexif12 xserver-xorg-legacy
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package xserver-xorg-legacy

When I connect per ssh and execute:
Code: Select all
sudo apt-get install -y xinit xorg openbox libexif12


I get everything running and there seems to be no issue .

It would be great if you could put the installtion of "xserver-xorg-legacy" in a separate line, so it does not become a blocker for the Odroid images.
Random avatar
tabularasa
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Sun Aug 11 2019 14:30


[PLUGIN] Touch Display

Postby gvolt » Sun Aug 11 2019 20:48

@tabularasa
Thanks for reporting.

Could you please post the result of
Code: Select all
awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g'
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47


[PLUGIN] Touch Display

Postby tabularasa » Tue Aug 13 2019 17:06

On my Odroid C2:
volumio@volumio:~$ awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g'
odroidc2


On my Odroid C1+:
volumio@garage:~$ awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g'
odroidc1
Random avatar
tabularasa
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Sun Aug 11 2019 14:30


[PLUGIN] Touch Display

Postby gkkpch » Thu Aug 15 2019 10:26

We're getting more complaints about the touch plugin failing on Odroid devices.
I fear this new plugin has only been tested on PI devices.
@gvolt: are you working on this? There is a whole range of devices using this, not just Odroids!
Volumio OS Developer

You like my work? Then what about buying me a beer :)
User avatar
gkkpch
Moderator
 
Posts: 1611
Joined: Mon Dec 29 2014 22:38
Location: Bodensee, Switzerland


[PLUGIN] Touch Display

Postby gvolt » Thu Aug 15 2019 17:17

@gkkpch Yes, I am working on it. ;)

As tabularasa pointed out, the issue only seems to be the "xserver-xorg-legacy" package in line 49 of the install script. For the Raspberry Pi "xserver-xorg-legacy" is necessary to be able to run the xserver as user volumio (and not root). After tabularasa reported that the installation and the plugin works on Odroid as well if the install script is run without having "xserver-xorg-legacy" in line 49, I guess we can just remove that package from line 49, i.e. for non-Raspberry-Pi platforms. I will open a PR with an accordingly modified install.sh tonight which includes one other minor bug fix.

Edit: Regarding the further complaints you mentioned: Could you make them accessible to me so I can see what these complaints specifically refer to?
Random avatar
gvolt
Audiophile
Audiophile
 
Posts: 154
Joined: Fri Mar 02 2018 16:47

Next

Return to Development talks

Who is online

Users browsing this forum: No registered users and 0 guests