[PLUGIN] Touch Display

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.

3 Likes

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:

sudo rm -r /data/volumiokiosk
  1. Download the plugin package
wget https://github.com/gvolt/volumio-touch_display-plugin/releases/download/v1.1.0/touch_display_1_1_1.zip 
  1. Create a directory for unzipping the plugin package
mkdir touch_display_1_1_1
  1. Unzip the plugin package to the newly created directory
miniunzip touch_display_1_1_1.zip -d touch_display_1_1_1
  1. Change into the directory with the unzipped files
cd touch_display_1_1_1
  1. Install the plugin
volumio plugin install

Thanks works perfectly!

Verstuurd vanaf mijn Nokia 6.1 met Tapatalk

@michel8166

Glad to hear that.
Many thanks for your feedback :slight_smile:

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

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.

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:

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:

When I connect per ssh and execute:

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.

@tabularasa
Thanks for reporting.

Could you please post the result of awk '/VOLUMIO_HARDWARE=/' /etc/*-release | sed 's/VOLUMIO_HARDWARE=//' | sed 's/\"//g'

On my Odroid C2:

On my Odroid C1+:

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!

@gkkpch Yes, I am working on it. :wink:

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?

@tabularasa
Could you please test the new release (v1.1.2) of the plugin and report back, if you still have issues when installing or using the plugin?

Thanks in advance.

1 Like

I hope it’s useful if I add to this discussion. I tried the latest touch plugin on my Odroid C2 with VU7 display. I don’t see anything on the screen. How to debug it further?

Just to be sure: Is it this display https://wiki.odroid.com/accessory/display/vu_series/vu7/vu7 we are talking about?

If so, did you modify the boot.ini (and how)?

Did you install any other software (what)?

Do you get any error messages when installing or enabling the plugin? What is their content?

If you should not see any error messages from the UI please connect to Volumio via SSH, run journalctl -f as root and watch its output while enabling the plugin. Post possible error messages from the logs.

Also please post the output of systemctl status -l volumio-kiosk.service and ls -al /tmp/.X11-unix

2 Likes

Don’t you even see the text console with the login prompt?

Hi,

I have a 3.5’ small Joy-IT display on a Raspi 3. Any chance to getting that supported?

Best regards,
Daniel

Did you already modify /boot/config.txt and download joy-IT-Display_Driver-35a-overlay.dtb
from http://anleitung.joy-it.net/wp-content/uploads/2017/04/anleitung.joy-it.net/upload/joy-IT-Display_Driver-35a-overlay.dtb?

If not login to Volumio via SSH (https://volumio.github.io/docs/User_Manual/SSH.html) and download joy-IT-Display_Driver-35a-overlay.dt:

wget anleitung.joy-it.net/upload/joy-IT-Display_Driver-35a-overlay.dtb

joy-IT-Display_Driver-35a-overlay.dtb has to be copied into /boot/overlays sudo cp joy-IT-Display_Driver-35a-overlay.dtb /boot/overlays/joy-IT-Display_Driver-35a-overlay.dtbo
Then open /boot/config.txt:

sudo nano /boot/config.txt

It seems you have to add the following lines to /boot/config.txt:

dtparam=spi=on dtoverlay=joy-IT-Display_Driver-35a-overlay:rotate=270,swapxy=1 config_hdmi_boost=7 hdmi_drive=1 hdmi_ignore_edid=0xa5000080
Close nano with Ctrl+x, y and the return/enter key to save the file.

Install the touch display plugin and reboot. It could be that the touch directions are inverted and/or rotated. Please test and report back.

Hi everyone!

(Since I did not know on which thread to post my question, I put it in duplicate on the 2 threads of the plugins concerned (I would update the one that will not have an answer))

Is there a command line to refresh the display? For example, when I do an update search, the screen shows me the pop-up window specifying if there is a new version or not. Even if I close this window on my smartphone, it doesn’t close it on the screen of my player (and I cannot do it manually since I do not have a touch screen). At this point I have to disable then enable touchdisplay plugin for the window to close. So I was wondering if it was possible to assign a function to a button of the remote to refresh the display. The trick is that I would also like to use it to refresh the track info when these are wrong: sometimes the specified track info are those of the track that comes after the one that is listening. Maybe a command line to refresh webUI?.. Not sure it will work for track infos…

Any proposals?

@DipterePow
This is a problem with modals I reported here (https://github.com/volumio/volumio-plugins/issues/179) a while ago.

You could try to create a node script which calls the closeModals function (https://github.com/volumio/Volumio2/blob/d6f5205965e6a5c7e2439c9505f9960a914ca877/app/index.js#L1938) and assign that script to a button of your remote.

Okay, thank you very much. I just have to use these lines for the script, right?

[code]CoreCommandRouter.prototype.closeModals = function () {
var self=this;
this.pushConsoleMessage(‘CoreCommandRouter::Close All Modals sent’);

return self.broadcastMessage('closeAllModals', '');

}[/code]

Hi,

would it be possible to add a new Feature to your really good Plugin?
a Zoom-Option would be nice.

I use --force-device-scale-factor=1.5 in volumiokiosk.sh, but it would be nice to have the option on the settings-Page where you can choose from 70% to maybe 200% in 10% steps

regards
Roman