Pi 4, Python 3, 2 Displays , and Pi Presents Beep

For a while now I have frozen development of [pipresents-gapless] and have continued further development in a new repo [pipresents-beep]. Initially this was intended to have some minor upgrades, the first being short beep sounds when keys are pressed, hence Beep!

However three things have recently happened which has turned Beep into something of more importance:

End of Life for Python 2

Suppport for Python 2 will end on 31 December 2019. This means no more updates, including security weaknesses. Although no date has been announced it is likely that Python 2 will soon be dropped from Raspbian as  it follows the Debian flavour of Linux. I have converted Pi Presents to run on Python3, and only Python3, in Beep and will not be backporting it to Gapless. The primary advantage of Python3 from a user point of view  is that text uses Unicode so ‘non-Latin’ character sets should be useable.

Pi 4 and 2 Displays

Pi Presents can now use the two displays enabled by Pi4 and Buster. The two displays can be attached to the two HDMI ports or the official DSI touchcreen can be used with a HDMI display attached to HDMI0. A Show can now be displayed on one or other of the Displays by editing the new Display field in a Show.  It is also possible to direct video to the second display, while text and graphics are shown on the first.

Official DSI Touchscreen

I have bought one of these. As a single display they work out of the box, as one of two displays the scaling of the touch is wrong and requires use of an xinput command to correct it, which Pi Presents does.

Touch works well with Click Areas. The size of the screen might limit how useful the touchscreen is in real use. However as part of a two display system it has lots of potential as touches on one display can control Shows on the other larger display.

Pi 3 Users

Pi 3 and earlier models have only one display. Although you can connect a touchscreen and a HDMI display only one display can be used. With the exception that it is possible to direct video to the second display, while text and graphics are shown on the first. The latest version of Pi Presents Beep was developed on Buster and has not been tested on Stretch so to use Beep on a Pi3 you should upgrade to Buster.

How You Can Help

You should consider converting to Python 3 soon. Python 2 is going to disappear from Raspbian in the not too distant future.

Given the wide ranging modification made to Pi Presents for two displays and Python 3, and also that the Raspbian Buster display subsystem is a major new development; I do not recommend adopting Beep and throwing away your working Gapless system immeadiately. However it would assist me greatly if you could test your existing applications on Beep and report any problems on Github in the Beep repo.

The upgrade process is not difficult, install Buster from scratch on a new card do not upgrade,  install  Python 3 versions of some packages, remember to type python3 in the command line, and use the editor to upgrade the profile.

Other Enhancements

  • Play short sounds when keys are pressed or touchscreen is touched
  • Counters can be stored between runs
  • Message text, track text and Show Text can now have html markup
  • show control commands can be triggered by an input event
  • statistics recording device driver seperated out to allow alternative recording device
  • repeat command in mediashow to repeat a track

 

 

 

Posted in Uncategorized | Leave a comment

Retirement of Pi Presents Next (Version 1.2)

Having met my objectives for Pi Presents Gapless I have decided to make it the stable version of Pi Presents and hence to retire Pi Presents Next.

I will support Pi Presents Next for another year to allow you to upgrade to Gapless.

I have added a file upgrade_1p2_1p3.txt to the Gapless repository which gives instructions and hints for the upgrade. As always I will answer queries on the [pipresents-gapless] Github or via the contact form on this site.

I hope you will enjoy using the new software as much as I have enjoyed developing it with lots of input from many of you. It is difficult to estimate the number of people using Pi Presents but I have had contact with over 500 people from a few miles from where I live to Australia.

Ken

Posted in Uncategorized | 2 Comments

Version 1.3.5

A few enhancements since my last post:

The time of day scheduler is now programmed by the web based editor instead of the schedule.json file.

An I/O plugin for PN532 RFID tag reader.This allows ‘museum in a box’ type functionality which has been featured on the Raspberry Pi blog.

CEC commands to turn TV on/standby

Posted in Uncategorized | 14 Comments

Version 1.3.4c (Gapless)

I seem to have got out of the habit of making posts for each release of Pi Presents, however development has continued. This post give an overview of the many new features since November 2016.

In addition to the major improvements below there are many smaller enhancements. Look at the changelog.txt or the manual for details.

– The Input/Output device drivers have been separated out from the core of Pi Presents and have a defined API so that I/O plugins can be written for new devices. I have coded several I/O plugins to demonstrate the techniques but these may require modification for your own devices:

  • keyboard (recode of original)
  • gpio (recode of original)
  • enhanced keyboard allowing strings to trigger events and be read by track plugins
  • Wireless remote controls and other input devices that use evdev
  • UART (through USB) for RS232 interface and projector control
  • Pimoroni Four Letter Phat via I2C
  • Pimorini ScrollHD Phat via I2C
  • ADC via I2C
  • DAC via I2C

– The counter feature uses Show Control commands to increment the value of counters. These can be read by track plugins and allows interactive quizzes to be implemented. The enhanced keyboard I/O plugin allows strings to be entered so that answers need not be multiple choice.

– Open Sound Control has been rewritten and enhanced and now plays nicely with control applications such as QLab.

– Pause now has a timeout

– Show Control commands to generate events and to power the display

– The Raspberry Pi camera can be used in Pi Presents to display live video and to take pictures. The feature is implemented as a track plugin so details of its use can be varied.

– Pi Presents can now send email alerts when it starts, exits, or detects an error

– Media can now reside inside a profile so that profiles can be made stand alone

– Enhancements to the web based editor and manager, and retirement of the original editor.

– The editor now updates profiles automatically whenever there is a change of profile format. The old profile is backed up.

– Direct linking of GPIO input and output to allow LED indicators on buttons

– Video tracks now has ‘freeze at start’ which give an instant start for video playout applications and an improved ‘magic picture’ application.

– Liveshows can now run specified tracks or shows if the livelist is empty

Posted in Uncategorized | 1 Comment

Bugfix release – Version 1.3.1h (gapless)

I have recently uploaded Pi Presents version 1.3.1h to Github.

A few people have reported intermittent problems with playing video with the new dbus interface to omxplayer introduced in 1.3.1g. This version hopefully fixes those problems. In addition to fixes to Pi Presents I found it necessary to increase the GPU Memory from the default 64 MB to 128 Mb if playing videos. Instructions on how to do this are in the Release Notes.

Now that Wheezy is unsupported I have removed the requirement to use sudo when using GPIO (actually its use is inhibited). There are also a couple of other minor bug fixes.

Posted in Uncategorized | 4 Comments

Infinite Media player for The Elderly and Incapacitated

Gazmac from Australia has developed a very interesting and useful application for Pi Presents. I will let him explain:

‘My mother is 94 and no longer able to use TV controls etc. The nursing home staff kindly put the TV on for her and select something reasonable for her to watch. However, the program rolls on and eventually offends her in some way. Her distress prompted me to find another solution to provide good quality content. Even pay services are only as good as the selection you make which is beyond her.’

Gary has written about his development here. He describes how to move Raspbian, pp_home and the many GBytes of media to a SSD, how to prepare various types of media for use with Pi Presents and a complex profile based on liveshows combining videos and images with background music.

Posted in Uncategorized | Leave a comment

Tutorial – Using Touchscreens with Pi Presents

Greg Reynolds from the Canadian Air and Space Museum in Ottawa has provided a tutorial on how to generate a profile for using a touchscreen. He provides much useful information which is not immediately obvious from the manual including the directory structure of Pi Presents. He takes you through editing screen.cfg which is the file that defines the layout of the touchscreen buttons and uses the radiobuttonshow template profile to show how to set up the control path between a touch and a video playing.

The tutorial is applicable to Version 1.3 (gapless). Version 1.2 (next) has detailed differences but the general principles are the same.

The tutorial is a pdf document which can be found here

The Raspberry Pi has a driver that supports touchscreens but there is little information about which touchscreens are supported. If you have successfully used a touchscreen with Pi Presents please tell us in a comment.

Posted in Uncategorized | 12 Comments

Bugfix Release and end of Wheezy – 1.3.1g

I have recently uploaded Version 1.3.1g to [pipresents-gapless]. This contains two fixes for problems that seem to have been introduced by Raspbian Jessie especially when using RPi3, and a couple of fixes for corner use cases.

It would a appear that the autostart system in Jessie will start a user’s program before the operating system has set up the user environment; this leads to occasional failures of PP depending on the exact timing of the startup process. I have added intelligent delays to Pi Presents and the Web Based manager in the hope of fixing this.

With Jessie there has been reports of very occasional omxplayer crashes which did not occur with Wheezy. In my testing I had one failure after running a 1 second video for over 24 hours; this seemed to involve Pexpect. Rather than investigate Pexpect I have decided to move to Dbus to interface with omxplayer as this is now the preferred interface for omxplayer. I have left the old pp_omxdriver.py in the repo if you need to revert.

Both these problems are in the ‘difficult to know if they are fixed’ category and your experiences will be of great benefit.

This will be the last version of Pi Presents that I will develop and test on Wheezy. Wheezy does not work with Rpi3 and as been withdrawn from the RPi web site.

Posted in Uncategorized | 2 Comments

Browser based management and profile editing – 1.3.1f

I now have a couple of installations of my own. In both cases the Pi is difficult to access for editing profiles or for starting Pi Presents running alternative profiles.

I could of course edit the profiles on a Windows PC and ftp them to the target Pi’s; I could also stop and start Pi Presents using Putty. However both of these are not conducive to use by Visitor Centre staff.

The result was the use of RemI. RemI runs a web server on the target Pi and generates web pages that present a gui in a browser which looks very similar to the Python gui on the native Pi. I have implemented two ‘Apps’ as they are called. pp_manager.py allows you to start Pi Presents with a selected profile, stop it, upload media and run the other ‘App’ pp_web_editor.py which is the Pi Presents profile editor with a slightly different user interface. The editor is actually running on the target Pi.

Instructions are in the manual but basically you start pp_manager.py when the Pi powers up or manually, then using a browser on any machine on the network just point the browser at the target Pi’s IP address on a special port. Since each Pi has a different IP address you can control any Pi on the network. To make it easier it is best to give the Pi a static IP addresses.

There are other methods of remote management. David Guest describes one which is more suitable if you have a number of Pi’s each with the same content.

Posted in Uncategorized | 2 Comments

Statistics Logging in Version 1.3.1e (Gapless)

Some months ago I added statistics logging to Pi Presents Gapless.

There is a new section of the manual which should explain all.

The logging outputs a Excel/Calc compatible CSV file which contains details of user initiated events. The file can be analysed to obtain the statistics.

I do not have any deployed applications from which I could collect statistics so I cannot assess whether the messages PP outputs are sufficient in content, and in the events that are recorded, to produce useful tables; so feedback would be useful if you fancy trying it out.

Posted in Uncategorized | Leave a comment