TeleFrame
TeleFrame copied to clipboard
New Touch Commands
Since many of you are asking about new commands (e.g. #40) for the touch controls I'm thinking about adding some kind of navigation/controll bar at the bottom of the screen, that appears when the screen is touched once and dissapears after some seconds or a second touch on the screen. There we could have navigation buttons for the slideshow, a button for voice message reply and the requested delete and favorize commands. This way new controls can be easily added in the future.
But I'm not sure if this makes the use to complicated for older people?!
What do you think about a navigation/controll bar with buttons?
Hi, this is exactly what I'm looking for. I don't think it will cause any confusion for older people. From my point of view it is not more complicated as pressing the center of the screen for a longer time to make a voice response to a picture.
nice idea - my proposal is to make the new touch control menu optional, i.e. it can be enables/disabled in the config file. This leaves it to any implementer of a teleframe if he thinks the extra level of complexity is required and/or manageable by the user of the frame. I was thinking about a shutdown feature as I always feel unwell just powering off a running Linux system - this could in my view be addressed by a touch menu as well.
I started with the development with #46.
I think we should collect all possible commands here.
Until now we have:
- navigation through images
- play/pause slideshow
- delete images
- favorize images
- send voice message
- shutdown/reboot system
- maybe update the teleframe software
- mute notifications
The touch bar is now implemented in #46.
to try it you need to add
touchBar: {
height: "100px"
}
to your config.
to add new elements one needs to edit
var touchBarElements = [
new TouchBarElement("left", "far fa-arrow-alt-circle-left", previousImage),
new TouchBarElement("play", "far fa-play-circle", play),
new TouchBarElement("pause", "far fa-pause-circle", pause),
new TouchBarElement("right", "far fa-arrow-alt-circle-right", nextImage),
new TouchBarElement("voice", "fas fa-microphone-alt", record),
]
in renderer.js.
For now all availiable functions are implemented. Now the question is, if it should be possible to configure the touch bar elements in the config?!
Great idea and yes configurable options would be better.
I don't think that a touchbar is more complicated. Because the icons are self explaining like an old VCR and it should be clear what they do. And one short touch gesture to show the touchbar is easy to remember.
When the monitor is just switch to black screen in night mode it would be great to toggle between night and photo mode.
I would prefer to configure the navigation bar via the config file.
It is already implemented to configure it via the config file. At the moment I’m working on starring pictures to save them from being deleted...
I'm done with the implementation of the touch bar. The commands included for now are:
| Element | Description |
|---|---|
previousImage |
Navigate to the previous Image. |
nextImage |
Navigate to the next Image. |
play |
Resume slideshow. |
pause |
Pause slideshow. |
playPause |
Toggle between play and pause. |
record |
Record voice reply. |
starImage |
Star the active image to prevent it from beeing deleted. |
deleteImage |
Delete the active an image. |
mute |
Mute notification sounds. |
shutdown |
Shutdown the system. |
reboot |
Reboot the system. |
For more commands we should use extra feature branches in the future. Pleas have a look at the PR #46 and test it. I would like to get some feedback before merging it. It would also be helpful if someone could test it on a raspberry, because i updated all the node modules which means we have a new electron version...
I tried to install it on one of my raspberries. It failed with the installation of electron. No matter if I do the manual install or using the script.

Try npm install electron@^5.0.6 to temporary fix it
@LukeSkywalker92 electron is the only module making problems.
Hmm..I upgraded the electron version to use the backdrop-filter css property for the Touch Bar...
can you please try the solution of this: https://stackoverflow.com/questions/58877932/problem-installing-electron-js-on-raspberry-pi-3
it works :thumbsup:
echo arch=armv7l>~/pi/TeleFrame/.npmrc
npm install
it should be fixed wit 82d2789 now. can you please try it on a pi?
Yes, but have to delete the folder node_modules/electron if updating from an older version. A fresh install works.
There is another issue. In the new version electron displays a menu bar.
The option frame: false removes it - https://stackoverflow.com/questions/39091964/remove-menubar-from-electron-app - Tried win.removeMenu() without success
// main.js
...
function createWindow() {
// Create the browser window.
win = new BrowserWindow({
width: 1024,
height: 600,
webPreferences: {
nodeIntegration: true
},
frame: false
});
...
it works 👍
echo arch=armv7l>~/pi/TeleFrame/.npmrc npm install
Yes, but have to delete the folder
node_modules/electronif updating from an older version. A fresh install works.
It might sound stupid but I can't get this version installed. @gegu: can you please tell me the steps to install this version of TeleFrame on a pi Thanks
Use the lastest commit from branch feature/touch-controll-bar
cd ~/TeleFrame # change it if you use another path
rm -rf node_modules/electron
npm install
My previous post have an error - ~/pi/TeleFrame/.npmrc should be ~/TeleFrame/.npmrc
OK, I'm making progress. My steps so far:
- clean install of raspian buster
- install nodejs via apt-get from raspian
- cloned TeleFrame from github (feature/touch-controll-bar)
- npm install inside TeleFrame folder
- got the same error message as seen above. TeleFrame refuses to start
- removed node_modules/electron
- installed electron 5.0.6 as mentioned above
- npm install again
- copied config.example.js to config.js and added the bot token
- went into tools folder and ran: bash tf.sh
- Teleframe started :-)
- for convenience I ran a few parts of the install script (no screen saver, no mouse, pm2) manually
What's left:
- TeleFrame is not running with the latest electron
- Test if it still hangs or is finally stable
If it is stable I leave it as is for now as I like to have two screens as a present for christmas.
Anyway, thanks for your help. You did a great job with this software.
Hmm, have you tried to update npm sudo npm install npm@latest -g? The version from apt-get is much older.
Following the steps from @nautical-miles give me the same results.
It's indeed required to install npm@latest to use this branch.
ok so we need to add this to the installation instructions.
I'm not sure if we also need to modify the script for automatic installation on raspberries. This would take some time for me...need to find a free raspberry for that...
I'd like to send you a Raspberry Pi 3 to support the project.
How can we exchange addresses?
Hmm, have you tried to update npm
sudo npm install npm@latest -g? The version from apt-get is much older.
Hi gegu, for testing I removed the Teleframe folder and updated npm to the latest version. Then I cloned TeleFrame again and tried the installation. It failed again. So far it works only with 5.0.6. Maybe it is also an issue with the previous installation as I did not do a clean install of Raspian.
Still testing if Teleframe hangs with electron 5.0.6. --- update --- After 2 1/2 hours the screen froze again.
Problem in front of the keyboard? I found a folder node_modules also in the home folder of the pi user I was not aware of before. Removed that completely and the electron in TeleFrame/node_modules. Did a npm install in the TeleFrame folder again and now it went smoothly without any errors. Back to square one on testing if Teleframe hangs after some time.
The problem is still there. TeleFrame froze again. To see what's going on I left pm2 log TeleFrame running. When it freezes the last entry is: draw call returned Not enough memory available. Expect corruption.
I'd like to send you a Raspberry Pi 3 to support the project.
How can we exchange addresses?
Thank you very much, but you don't need to do that =) I have enough pi's lying around at home. With free I mean one that I don't use for something else at the moment...
But I really like that you want to support this project. I think you can do this best with giving us some of your time at the moment. Testing, reporting bugs, helping others with problems, helping to improve the documentation, maybe document fixes in a wiki etc..
By the way, I only tested the software on a rpi3. Did anyone of you test it on rpi4 yet?
@LukeSkywalker92 the installation of node 10.x runs without problems. The only thing to notice is to omit npm when calling apt-get install nodejs.
I found out that the electron install process lacks. No success installing electron globally, but TeleFrame works without it.
After the first npm install in the TeleFrame folder it's always needed to remove node_modules/electron and call npm install twice.
The attachement contains the script I have used to successfully install the TeleFrame branch feature/touch-controll-bar into a clean raspbian buster on a pi3.
Hope it helps a little bit.
Thanks for your investigations. I will have a look into it when I find some time 👍🏼
I have tested gegu‘s script on a raspberry pi 4 with success.