TeleFrame is an open source digital image frame that displays images and videos, which were send to an Telegram Bot.
Before updating to 2.0.0, please read the release notes of release 2.0.0
- Table Of Contents
- Installation
- Configuration
- Whitelist Chats
- Voice Replies using TeleFrame
- Touchscreen support
- Updating
- Bot only mode (no GUI)
- Building a TeleFrame
Electron, the app wrapper around Teleframe, only supports the Raspberry Pi 2/3/4. The Raspberry Pi 0/1 is currently not supported.
Note that you will need to install the lastest full version of Raspbian, don't use the Lite version.
Execute the following command on your Raspberry Pi to install TeleFrame:
bash -c "$(curl -sL https://raw.githubusercontent.com/LukeSkywalker92/TeleFrame/master/tools/install_raspberry.sh)"
- Download and install the latest Node.js version.
- If you like to use the voice reply feature you need to install sox
- Install Electron globally with
npm install -g electron
. - Clone the repository and check out the master branch:
git clone https://github.com/LukeSkywalker92/TeleFrame.git
- Enter the repository:
cd TeleFrame/
- Install and run the app with:
npm install && npm start
Also note that:
npm start
does not work via SSH. But you can useDISPLAY=:0 nohup npm start &
instead.
This starts the TeleFrame on the remote display.- To access toolbar menu when in fullscreen mode, hit
ALT
key. - To toggle the (web)
Developer Tools
from fullscreen mode, useCTRL-SHIFT-I
orALT
and selectView
.
-
Copy
TeleFrame/config/config.js.example
toTeleFrame/config/config.js
.
Note: If you used the installer script. This step is already done for you. -
Modify your required settings.
The following properties can be configured:
Option | Description |
---|---|
botToken |
The token of the Telegram Bot, which will recieve the images. How to create a bot and get the token is explained here. |
whitelistChats |
Use this to only allow certain users to send photos to your TeleFrame. See hints below. |
playSoundOnRecieve |
Play a sound on recieving a message, set false to turn off. |
showVideos |
When set to true, videos that are send to the bot are also shown. |
playVideoAudio |
If recieved videos should be played with sound or not. |
imageFolder |
The folder where the images are stored. |
fullscreen |
When set to true, TeleFrame will run in fullscreen mode. |
fadeTime |
The fading time between two images. |
interval |
The time that an image is shown. |
imageCount |
Defines how many different images are shown in the slideshow. |
newPhotoMessage |
Message that is shown when the bot recieved a new image. |
newVideoMessage |
Message that is shown when the bot recieved a new video. |
showSender |
When set to true, TeleFrame will show the name of the sender when the image is shown. |
showCaption |
When set to true, TeleFrame will show the caption of the image when the image is shown. |
fullscreen |
When set to true, TeleFrame will run in fullscreen mode. |
toggleMonitor |
When set to true, TeleFrame will switch the monitor off and on at the defined hours. |
turnOnHour |
Defines when the monitor shuld be turned on. |
turnOffHour |
Defines when the monitor shuld be turned off. |
keys |
Defines an object with 4 strings specifying the keyboard shortcuts for play, next, previous and pause. Set to null for no controls |
voiceReply |
Defines an object with the config for sending voicemessages with TeleFrame, see info bellow |
When you start your TeleFrame and send a "Hi" to the bot it will send you back the current chat id. Paste this id or several of them into the whitelistChats
config option to only allow only pictures from these ids (eg [1234567, 89101010]
). Leave empty ([]
) for no whitelist.
A very simple way to respond to the images is by using TeleFrame`s voice reply feature. The feature is intended to work like this: Who ever comes by the frame presses a button, speaks their message into the frame, when there is 2 seconds of silence or the maximum time is reached the recording will stop and the telegram bot will send it to the chat where the current image came from.
Option | Description |
---|---|
key |
The keyboardkey to start the voice recording |
maxRecordTime |
How long the recorder will record if there is no silence detected (in milliseconds) |
recordingMessageTitle |
The title of the recording dialog displayed on the frame during record |
recordingPreMessage |
The message of the recording dialog displayed on the frame during record before chat name |
recordingPostMessage |
The message of the recording dialog displayed on the frame during record after char name |
recordingDone |
The message of the recording dialog displayed on the frame when recording has finished |
recordingError |
The error message of the recording dialog displayed when recording has failed |
- Navigate through the images by touching at the left or right side of your touchscreen.
- Pause and resume the slideshow by touching in the middle of your touchscreen.
- Record a voice message and reply to the shown image by making a long touch in the middle of your touchscreen. The recording starts when you take your finger off.
If you want to update your TeleFrame to the latest version, use your terminal to go to your TeleFrame folder and type the following command:
git pull && npm install
If you changed nothing more than the config, this should work without any problems.
Type git status
to see your changes, if there are any, you can reset them with git reset --hard
. After that, git pull should be possible.
To run only the bot (without GUI), that saves the recieved images and videos into the folder specified in the config you need to run
npm run botonly
in the TeleFrame folder.
A detailed instruction on how to build your own TeleFrame will follow soon.