Giter Site home page Giter Site logo

lukeskywalker92 / teleframe Goto Github PK

View Code? Open in Web Editor NEW
93.0 16.0 28.0 14.21 MB

TeleFrame - a digital picture frame for telegram

License: MIT License

JavaScript 90.38% HTML 0.29% CSS 2.10% Shell 7.24%
picture-gallery picture-viewer telegram telegram-bot raspberry-pi raspberry raspberrypi raspbian picture-frame

teleframe's Introduction

TeleFrame

TeleFrame in action

Latest Comit Release david-dm

TeleFrame is an open source digital image frame that displays images and videos, which were send to an Telegram Bot.

!!! IMPORTANT !!!

To update TeleFrame on a Raspberry PI, it is required to remove the electron folder and an additional parameter for npm to define the processor architecture! Also, make sure that you have the latest version of npm.

Execute the following commands in a terminal to do all this and be prepared for future updates, where again npm install is enough to update.

sudo npm install npm@latest -g
[ -z "$npm_config_arch" ] && (echo -e "# npm archive configuration\nexport npm_config_arch=\$(uname -m)" >> ~/.profile)
export npm_config_arch=$(uname -m)
cd ~/TeleFrame
rm -rf node_modules/
npm install --arch=$(uname -m)

Table Of Contents

Installation

Automatic Installation (Raspberry Pi only!)

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)"

Manual Installation

  1. Download and install the latest Node.js version.
  2. If you like to use the voice reply feature you need to install sox
  3. Install Electron globally with npm install -g electron.
  4. Clone the repository and check out the master branch: git clone https://github.com/LukeSkywalker92/TeleFrame.git
  5. Enter the repository: cd TeleFrame/
  6. Install and run the app with: npm install && npm start

Also note that:

  • npm start does not work via SSH. But you can use DISPLAY=: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, use CTRL-SHIFT-I or ALT and select View.

Configuration

  1. Copy TeleFrame/config/config.example.json to TeleFrame/config/config.json.
    Note: If you used the installer script. This step is already done for you.

  2. Modify your required settings. Note: You only need to define settings that differ from the standard configuration.

The following properties can be configured:

Option Type Description Default Value
botToken {string} The token of the Telegram Bot, which will recieve the images. How to create a bot and get the token is explained here.
whitelistChats {array-of-string} Use this to only allow certain users to send photos to your TeleFrame. See hints below.
whitelistAdmins {array-of-string} Use this to increase individual users as admin.
screenConfig {string} Defines the configuration file of your screen, see folder TeleFrame/config/screens/ and README-File for possible configurations. hdmi_default.js.
playSoundOnRecieve {string} Play a sound on recieving a message, set false to turn off. "sound1.mp3"
showVideos {boolean} When set to true, videos that are send to the bot are also shown. True
playVideoAudio {boolean} If recieved videos should be played with sound or not. False
imageFolder {string} The folder where the images are stored. "images"
fullscreen {boolean} When set to true, TeleFrame will run in fullscreen mode. True
fadeTime {number} The fading time between two images. [Milliseconds] 1500
interval {number} The time that an image is shown. [Milliseconds] 10000
imageCount {number} Defines how many different images are shown in the slideshow. 30
randomOrder {boolean} When set to true, Teleframe will show pictures in random order. True
autoDeleteImages {boolean} Defines if old images should be deleted, when they are no longer used in the slideshow (see 'imageCount'). Starred images will not be deleted. True
showSender {boolean} When set to true, TeleFrame will show the name of the sender when the image is shown. True
showCaption {boolean} When set to true, TeleFrame will show the caption of the image when the image is shown. True
cropZoomImages {boolean} When set to true, TeleFrame will crop and zoom images so there is no black border. False
toggleMonitor {boolean} When set to true, TeleFrame will switch the monitor off and on at the defined hours. False
turnOnHour {number} Defines when the monitor should be turned on. 9
turnOffHour {number} Defines when the monitor should be turned off. 22
switchLedsOff {boolean} Defines if the 2 LEDs on the RaspberryPi should be switched off. False
botReply {boolean} Defines if the bot should answer on images or videos with a short reply (:+1: :camera_flash: for images, :+1: :movie_camera: for movies). Also throws a warning on receiving unknown file extensions. True
confirmDeleteImage {boolean} Defines if to show a confirm message before delete an image true or false
confirmShutdown {boolean} Defines if to show a confirm message before shutdown the system true or false
confirmReboot {boolean} Defines if to show a confirm message before rebooting the system true or false
keys {object} Defines an object with 4 strings specifying the keyboard shortcuts for play, next, previous and pause. Set to null for no controls
voiceReply {object} Defines an object with the config for sending voicemessages with TeleFrame, see info below
touchBar {object} Defines an object with the config for using a touch bar for executing commands instead of the default touch gestures, see info below
language {string} Defines the language to use. See config.example.js 'Language configuration' for details
adminAction {object} Defines an object with the config for sending Admin-Commands to the TeleFrame, see info below

Whitelist Chats

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.

Using the Touch Bar

To use a touch bar for executing commands instead of the default touch gestures you need to add a touchBar obect to your config. To open the touch bar, just touch the screen. Do the same to hide it again. The touchBar object takes the height of the touchbar, optionally the autoHideTimeout and a list of elements that should appear as keys. Availiable elements are:

Element Description
showNewest Navigate last arrived image.
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.

Voice Replies using TeleFrame

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)

Sending Admin-Commands to the TeleFrame

As administrator of a TeleFrame, it could be very useful to execute commands on the TeleFrame computer. With the TeleFrame-Bot you are able to send these commands without logging on to the remote computer.

Examples for such admin actions could be:

  • Reboot the Raspberry Pi
  • Restart of the TeleFrame application
  • Open a VPN connection
  • Close a VPN connection
  • ....

To enable Admin-Action on the TeleFrame, following settings must be made in the Config file:

  • Adding the Chat-ID to the list of Administators (whitelistAdmins)
  • Activating the Admin Actions (allowAdminAction)
  • Adding an Action Object (actions) [see adminAction-Object]
  • Activation of the action object (enable)

Now the action on the TeleFrame can be triggered by sending the corresponding command (e.g. /reboot for the command named "reboot").

adminAction-object

Option Description
allowAdminAction Global Switch to enable the Admin-Actions
actions Defines an array of action-objects, see info bellow

action-object

Option Description
name Name of the action
command Command to execute on TeleFrame
enable When set to True, the command is added to the bot

Touchscreen support

  • 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.

Updating

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.

Addon interface

TeleFrame provides an addon interface to implement own extensions. See documentation addon interface.

Bot only mode (no GUI)

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.

Building a TeleFrame

A detailed instruction on how to build your own TeleFrame will follow soon.

teleframe's People

Contributors

dependabot[bot] avatar gegu avatar kateiren avatar loix07 avatar luhkae avatar lukeskywalker92 avatar mistau avatar s00500 avatar thoschneider avatar tom-hirschberger avatar trenar avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

teleframe's Issues

Increasing intervals

I had once a digital picture frame from canon and it had a feature which I liked: when interacting with the frame (startup, new pictures, touch etc.) the intervals between picture changes were short, and with time grew longer. This way the frame was less disturbing when in the background and more active when you were sitting in front of it. I think it would be a great feature for this implementation, too.

Frameonly mode

I have run into a stupid issue when the frame is actively turned on and off. when I send a picture and it takes more than 24 hours for the frame to start then telegram drops the cached image. To solve this I want to have a frameonly mode and a bot only mode. The two instances are running and are synced via Google Drive or some other could storage.

This way it is also easy to delete photos

Things that need to be done to do so:

Separate metadata into multiple files, one per photo
Create a frame only mode
Actively watch filesystem for changes
...

I already started the implementation of this :-)

Let me know if you have any additional ideas or thoughts

System didn_t start - Black Screen with Logo

Hi there,

I have tried to set up the teleframe, but unfortunately it failed when I start the program. I have tried both versions, with pm2 and manually, it just freezes a black screen with the TeleFrame logo in the middle. The bot is recognized correctly and is active, the last entry is in the log:
info: Renderer started…

One other crazy thing, after the freeze, the keyboard no longer responds to the letters "A" + "L" and the arrows "left" and "right", if the program is canceled, it works again.

System:
Pi 3 B +
Raspian Buster 2019-09-26, all updates applied
Node V11.15.0
[email protected]

Can anyone help me further?

Thanks and regards, Udo

Hallo,

ich habe nun auch versucht den Teleframe aufzusetzen, scheitere aber leider beim Programmstart. Ich habe beide Versionen, mit pm2 und manuell ausprobiert, es friert immer nur ein schwarzer Screen mit TeleFrame-Logo in der Mitte ein. Der Bot wird richtig erkannt und ist aktiv, im Log ist der letzte Eintrag
info: Renderer started …

Was mich zusätzlich stutzig macht ist, dass nach dem Freeze die Tastatur nicht mehr auf die Buchstaben "A" + "L" und die Pfeile "links" und "rechts" reagiert, wenn das Programm abgebrochen wird geht es wieder.

System:
Pi 3 B+
Raspian Buster 2019-09-26 , alle Aktualisierungen aufgespielt
Node V11.15.0
[email protected]

Kann mir jemand weiterhelfen?

Danke und Gruß, Udo

Incompatible config file for new major release acceptable?

For new features we need additional config options making this incompatible with an old config file.
In one of my patch I decided to query the existence of the according entry to make sure I stay compatible with the old version. This generates extra code which has to be tested though, in my opinion this is not a viable path forward.

How do we want to deal with that situation?
Options I would see is:

  1. query the existence of the new config variable and default to old behavior
  2. accept incompatible config files for new major releases
  3. option (2) + provide an update script adding default entries for the new options

I think we should find an agreed way forward how to deal with this.

Touchscreen calibration

Hi

I am not sure if this is correct to create a new issue, but my problem doesn't fit into any other issues.
I'm new here in Github because of the Teleframe. Recently my touchscreen 7inch display arrived, but there is one problem I can't handle so far. I put the display into a 10x15cm picture frame. Since the display is a bit larger I used the overscan feature to create some borders so the picture fits perfectly into the frame. Unfortunately the touchscreen area didn't change. When I try to touch the buttons raspberry "thinks" that I touched exactly the overscanned pixel. That means Raspberry doesn't realize where I touch correctly. I calibrated the screen but even in the calibration mode Raspberry doesn't recognize the correct area. Does anyone of you know a feature to determine the area for the touchscreen?
I hope that this was understandable. Thank you very much for your help.

Window Size in main.js

Hi,
how important is the window size in main.js? Instead of the 7" screen I am using a 15.6" screen with a resolution of 1366 x 768. Would it make sense to use global variables here and add the size setting to the config?

Switch off Raspberries LED's

I wan't to suggest an option in the Installer script where the user can choose to switch off the Raspberry Pi power and status LED. I have tested with a Raspberry Pi 4. The following commands do the trick.

# led0 green, led1 red
sudo sh -c 'echo none > /sys/class/leds/led0/trigger'
sudo sh -c 'echo none > /sys/class/leds/led1/trigger' 

Picture Freeze

Hi,
I create a new issue here as it seems my problem is different to the system freeze issue.
TeleFrame stops randomly on one picture and does not react on touching the screen. However logging on to the raspberry via ssh is possible. Also TeleFrame is turning off the screen at the correct hour when set up in the config. It also turns on the screen the next morning just to see the picture from last night sitting there for hours. Using pm2 restart TeleFrame does not help. Rebooting the raspberry makes TeleFrame work again for some time.

Schwarzer Bildschrim mit TeleFrame Logo

Hi Luke,

bin auf Dein Projekt gestossen und möchte es direkt umsetzen. Wenn auch mit begrenzten Kenntnissen. Ich habe einen Pi3B mit 2018-10-09-raspbian-stretch aufgesetzt und deinen one-line-installer verwendet.
Fährt hoch, startet TeleFrame aber danach habe ich nur den schwarzen Bildschirm mit Logo in der mitte. Bot habe ich aufgesetzt, aber es schein nichts am Pi anzukommen. Den Token habe ich generiert und auch bei der Installation eingegeben. Zum test auch einen neuen Token generiert und per ssh upgedated. Aber ich stecke fest und weiss nicht wo ich ansetzten muss.
Liegt es an der config von TeleFrame oder am Bot...
Den Bot habe ich nur angelegt - kann ihm am iPhone jedenfalls mal nachrichten schicken :)

Hast Du eine Idee wo man hier angreifen kann?

Grüße
carver

Catch Telegram Bot 20MB download size limit.

When uploading a video larger than 20MB TeleFrame throwth the following error:
UnhandledPromiseRejectionWarning: Error: 400: Bad Request: file is too big
If would be great if TeleFrame could notify the uploader accordingly.

Problems with audio: how to debug?

I'm unable to make the audio generation work properly, and can't understand how to debug. Installed TeleFrame on a Raspberry using the provided script, auto-run with PM2. Is any log file available in this configuration?

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?

Error: Cannot find module ‘sshpk‘ - Teleframe won‘t start

Hello,

I have issues when I wan‘t to start Teleframe it shows the following error message:

image
image
image

Do you have an idea on how to solve this? Please write me if and what additional information you need from me.

I installed the Raspberry with this version:
Raspbian Buster with desktop
Image with desktop based on Debian Buster
Version: September 2019
Release date: 2019-09-26
Kernel version: 4.19

After that I installed the Teleframe Software via the automatic installer.

I used the guide from the Make: Magazin.

Thank you very much!

Best Regards,
Paul

New touch command "Start from newest"

What do you think about a new feature to restart the slideshow by a new touch command. So you can quickly see if new photos have arrived in your absence. Provided of course that the photos are sorted by Creation Date.

OpenGL fkms problems

Hi all,

I have some problems with the OpenGL acceleration, which is set automatically in the install script. When I enable this option, the whole teleframe software becomes very unresponsive and laggy. Took me a while to find out that it was related to that option. Neither the full kms or fake kms worked for me.
As a workaround I removed that line from /boot/config.txt, however that seems not ideal. If I use a fadetime > 0, I get some very ugly white flickering, which I suspect to vanish with OpenGL working..
Is there someone with similar observations? Or can someone tell me what I miss during installation, maybe a gl related package?

Setup: RPi 3A+ running the latest raspbian buster release.

Whitelist doesn't work in Groupie chats

Hey everybody,
I am new to GitHub, so please Apologize If this ist not the right Place For my question.

Anyway, i added the bot to a group Chat. Said 'hi' to the bot, added the chat-id to the Whitelist (which Works fine with Personal Chats), but i only geht the following msg:

"Hey there, this bot is whitelisted, pls add your chat id to the config file"

Only way ich can make the group Chat work is by disabeling whitelisting.

Am i Missing Something?

Text rendering on Screen width, not Picture width

The family posts a lot of vertical taken pictures with some text along with it. This works pretty well in general, but I was wondering whether it is a big change to render the text (maybe also the name of the sender) on the screen width, instead within the actual picture.

Sometimes, if you receive a picture with some more words like e.g. "Look at him, holding his first bottle of milk" along with a picture taken in portrait mode, there is literally nothing left of the picture :-)
The text fades out a few seconds later, which is great, but I was wondering if this could be improved by using the capacity of the actual screen instead.

Thank you!

Establish Git-Flow

I would suggest to use a GIT workflow like gitflow.

My suggestion ist gitflow:

  • A develop branch is created from master
  • A release branch is created from develop
  • Feature branches are created from develop
  • When a feature is complete it is merged into the develop branch
  • When the release branch is done it is merged into develop and master
  • If an issue in master is detected a hotfix branch is created from master
  • Once the hotfix is complete it is merged to both develop and master

Here is on graphical overview of the flow between the branches:
https://danielkummer.github.io/git-flow-cheatsheet/

system freeze

Have a Pi3, almost every day system freezes, black screen not able to connect via SSH. However let a terminal open and found out, that it only becomes really really slow.
Getting these errors in log: (id/token changed)

0|TeleFrame | Failed to fetch updates. Waiting: 1s request to https://api.telegram.org/botabc:xyz/getUpdates?offset=0&limit=100&timeout=30 failed, reason: write EPIPE
0|TeleFrame | Failed to fetch updates. Waiting: 1s request to https://api.telegram.org/botabc:xyz/getUpdates?offset=0&limit=100&timeout=30 failed, reason: Client network socket disconnected before secure TLS connection was established
0|TeleFrame | Failed to fetch updates. Waiting: 1s request to https://api.telegram.org/botabc:xyz/getUpdates?offset=0&limit=100&timeout=30 failed, reason: Client network socket disconnected before secure TLS connection was established

what I noted, SWAP was completely full during the time.

Any hints what went wrong?

Nodejs Version 10x wird nicht unterstützt.

Hallo Luke,

ich habe versucht die automatische Installation für die TeleFrame Software durchzuführen. Leider bekomme ich den Fehler das die Version 10 von Nodejs nicht unterstützt wird. Danach bricht die Installation ab. Nach ein bisschen Stöber habe ich es geschafft die Version 8 von Nodejs installieren. Der Fehler mit der nicht unterstützten Version ist weg. Es konnte dann aber leider nicht das Paket Elektron installiert werden. Ich bin leider echt ratlos aktuell. Liegt auch daran das ich vollkommener Neuling auf GitHub und in Sachen Linux bin. Ich hoffe du kannst mir da weiterhelfen?

VG
Christian

New screen definition

Sorry, I'm not getting along with github very well yet, so I don't want to make any pull requests or merges.

It would be great if you look at my suggestion and hopefully include it in the project.

I took up Trenar's good idea and implemented the power on/off function for the Sunfounder HDMI display via optocoupler.

In this context the following 'files' were created:

  • New screen definition file
  • Shell Skript from Trenar adapted to my individual configuration
  • Circuit diagram
  • Board layout
  • Datasheet optocoupler
  • Two Photos

I also noticed that the wiringpi extension used in the script needs to be updated on the Raspberry Pi 4 first.

This may need to be included in the installer script and works as follows:

cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

Screen definition Sunfounder 10.1 hdmi display.zip

Bot connection loss

Hi all,
I have still another problem with the TeleFrame. It seems that the bot looses the server-connection. The software itself works fine, no freezing system or so, but if I send an image, it will not be displayed until I restart the software (or pi).
Can this be related to wifi power management in the pi or is it a software issue? By thinking over this, I thought about a notification (or a simple symbol like the pause-symbol) when the internet-connection is lost. I'm however not quite sure how to implement this...

High Memory Consumption forces swapping on 512MB Pis

Hi everyone,
I attempted to get this running on a Pi 3A+ which has the same Quadcore CPU as the 3B, but only 512 MByte of RAM. This will result in swapping, flickering and occasional crashes. It might be worth looking into lowering memory demands and also eliminating unnessary processes.
I would go as far as of getting rid of the window manager as it is not really needed for this purpose.

What do you think?

Feature requests

Hi Luke,

how to place suggestions for new features? Is it okay to place it as an issue?

THANK YOU

Hey guys,

first of all I want to wish you a merry christmas.
Second, I want to say thank you.
Thank you for the hours you spend to improve this project and to help others with their problems.
Thank you for the nice atmosphere in all the discussions, etc..
Thank you for all bug reports, etc.. All these small things help to improve the software even more.
Special thanks to @gegu, who does a great job in organising contributions and spends a lot of time with writing code for TeleFrame.

I really love to see this project developing, even when my free time is rare at the moment. This confirms my decision to make the project open source. I think we are on the right track to make the TeleFrame an easy to use software for all kinds of people and a beginner friendly project for makers.

Enjoy the Christmas time and have a happy new year!
Luke

Whitelist dialogue

Maybe we should show a dialogue when the bot receives a "hi" from a non whitelisted chat. This dialogue could show a "add 'sender name' to whitelist" button. This would be one more step towards a texteditor free configuration.
We should wait with this for #66.

Zusätzliche Features

Ist es möglich weitere Infos einzublenden? Interessant wären Uhrzeit, Datum und Wetter.

delete images

How could I remove/delete images from the slide show via ssh?
Only delete the images in the folder or edit the images.json too?

portboy

Web server

Having an old tablet hanging around I was asking myself if running TeleFrame on a small host (RPi) and navigating it with a browser from a different networked host (the tablet) is an option. Missing knowledge on Electron etc...

Aspect ratio correction

Hey,

I have a custom raspi screen (with driver and all) and the ratio comes out slightly wrong... not much but a bit.

Is there an INI file or something where a correction could be set?

Thanks,
Andreas

Telegram Bot Sicherheit

First: Vielen Dank für diese fantastische Arbeit, die Installation ist sehr einfach und es funktioniert einwandfrei.
Ich habe eine Frage zur Sicherheit: im Prinzip kann jeder Bilder an den Bot senden der den Namen kennt? Wenn ja, kann man eventuell ein "Codewort" in die Nachrichtenzeile schreiben die die Anzeige "freischaltet"?

Show URL‘s in TeleFrame

In addition to photos and videos, what do you think about displaying URLs that are sent as links? So you could also use TeleFrame as a dashboard.

Enhancement of the scheduler function

I think it would be very cool if the scheduler function would be extended so that you could make any number of entries and support the full crontab syntax. So it would be possible to act with different times on weekends for example.

Videoplayback: Codecs and Gif

Hi all,
I tested sending some videos to the frame after #69 has been fixed. I made two important observations:

  1. GIFs are not displayed at all. This is kind of trivial, since only mp4 video files are catched and gifs are thus discarded. By means of data saving, it should also be possible to send gifs. Since I have no speakers connected, I don't really need mp4 videos at all.

  2. The TeleFrame software crashes (black screen forever instead of video playback), if a mp4 video has the h.265 codec instead of h.264. By now I don't really know if this is related to raspbian, the renderer or something else. Just wanted to mention. Maybe we should add a check for the right codec before playing the video.

Media Files from group chat

I don't know if it is already implemented und I apologize that I don't have time to test it. But is it possible to use the bot in a group chat? So that I have to whitelist the group chat id and then all medias from the chat are posted.
I think this would be a great feature because sometimes you want to know what others has send to the frame.

Teleframe hangs due to image file with size zero

My frame ended up stopping the slideshow at one picture (reproduce-able even after reboot) with a black screen. New images/video arriving caused the slideshow to restart but it stopped once more at the same image. Further investigation showed that the critical image had a size of zero, reason for that is unclear.

NPM error, Picture freeze

Hi,
my TeleFrame still freezes after some time. Touch does not react in any way at that point. SSH into the raspberry is fine. When looking into the log I see: "Draw call returned Invalid argument. Expect corruption".
To be on the save side I did a fresh installation of raspbian and TeleFrame.

Update wiringPi by installer script

Could someone add the update of wiringPi to the installer script, please.

The new version supports hadware up to Raspberry Pi 4B.

cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

Admin Mode, annotations and fadeTime issue

Hi Luke,
first of all thanks a lot for your awesome project!

I have some ideas for improvements, but unfortunately no experience with telegram bots and javascript...

  1. I'd really love an admin-feature for rebooting / updating and so on. I just saw, that there is a PR in the pipeline.. Hope to see this feature being implemented soon :)

  2. Is it possible to have the message and sender name remain as long as the image is shown? By now, I can only see it for a few seconds and I suspect my grandparents to miss it...

  3. When the image changes, the screen blinks white or black for a few milliseconds.. It is most likely related to the fading between images, since it does not occur if I set fadeTime to 0 in the config.js. However, with fadeTime=0, the screen turns black for a short period and then the next image is shown. Would be nice if the black period wasn't there. PS: I am using an RPi 3A+ connected to a display (my tv screen) via HDMI.

Looking forward for new updates and features in this project :)

Channel Support

I added the TeleFrame bot as an admin to a channel. According to the telegram API it should be able to read all messages from channels, but images sent to the channel are not displayed on the TeleFrame. Is there any possibility to get channel messages working?

Use Case 1

Some family members also want to receive the images, but don't necessary need the TeleFrame. Add the same time I want to prevent them posting hundreds of pictures from their last vacation to the TeleFrame. So I created a channel where only some of us have admin rights and no one else should be able to post images.

Use Case 2

Some family members don't use telegram but upload their images to out Nextcloud instance. So I created a NodeRed flow which downloads images from specific Nextcloud folders and sends them to the channel, where the TeleFrame bot picks them up and displays them on the frame. Apparently this can not be done in a group, because bots can not see messages of other bots in groups, but only in channels.


By the way: Thanks for the great work. I really like this project and hope to contribute when I find some time to spare.

Voice message breaks off after about 7 seconds

If I want to send a voice message, the recording stops after about 7 seconds and is sent. I know it shouldn't be silent for more than 2 seconds, but that also happens while I'm talking.

TeleFrame addon interface

First of all: Since some changes were necessary in this PR, I will not take it into the develop branch before @LukeSkywalker92 has given his consent. If it is not acceptable, I would create a fork.

With #108 I want to present you the idea of an addon interface.

The plan was to provide a simple way to extend the functionality of TeleFrame.

My idea was to create an easy to use interface.
When implementing it, I didn't want to affect the core too much and without additional dependencies.

Nevertheless, there should be as few restrictions as possible when implementing an add-on. In principle, an addon has access to almost all objects of the TeleFrame main process if you need them. See demo TeleFrame-webRemote (self-promotion :-))

You can read the details in the README of the addon interface.

With the implementation it became also possible to use TeleFrame in a frame-only mode, without bot configuration

  • config: { "botToken": "bot-disabled" }

This could be used to update images and images.json on the TeleFrame by implementing a sync addon. Simply copying the files and restarting the TeleFrame would also be possible, but is rather uncomfortable.

Let me know what you think. Suggestions for changes or additions are welcome.

Happy addon coding!

Discussion: List of available addons

Since you will probably create some addons in the future, it would be IMO useful to have a list of available addons.

How do you think we could implement this in a meaningful way?

Sending commands to TeleFrame

Hi,
I wonder if it makes sense to send commands to the TeleFrame. Background why I am asking:
The TeleFrame I have made is in a case where you have no access to the buttons of the screen. It will not get a schedule for turning on and off as the usage times vary. The screen can be turned off by modifying the menue but how to turn it on again? Also the user will send pictures to the TeleFrame.
Long story short: I have modified the bot.js in this way that the screen can be turned on and off with a simple command.
I like to have your opinion to this modification.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.