{"id":21473205,"url":"https://github.com/johan-perso/infoscreen","last_synced_at":"2025-07-15T08:32:07.855Z","repository":{"id":224138246,"uuid":"762527303","full_name":"johan-perso/infoscreen","owner":"johan-perso","description":"Un mode Always On pour grand écran, et fonctionnel.","archived":false,"fork":false,"pushed_at":"2024-03-12T21:27:04.000Z","size":497,"stargazers_count":7,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T01:35:17.698Z","etag":null,"topics":["always-on","electronjs","home-assistant","home-automation","nowplaying","pronote-api","spotify-connect","touchscreen"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johan-perso.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null},"funding":{"ko_fi":"johan_stickman","custom":["https://paypal.me/moipastoii"]}},"created_at":"2024-02-24T01:02:57.000Z","updated_at":"2024-06-06T11:09:55.000Z","dependencies_parsed_at":null,"dependency_job_id":"726c9139-6906-4135-8df9-c00de7841b2e","html_url":"https://github.com/johan-perso/infoscreen","commit_stats":null,"previous_names":["johan-perso/infoscreen"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/johan-perso/infoscreen","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Finfoscreen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Finfoscreen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Finfoscreen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Finfoscreen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johan-perso","download_url":"https://codeload.github.com/johan-perso/infoscreen/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Finfoscreen/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265419694,"owners_count":23761858,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["always-on","electronjs","home-assistant","home-automation","nowplaying","pronote-api","spotify-connect","touchscreen"],"created_at":"2024-11-23T10:15:25.589Z","updated_at":"2025-07-15T08:32:07.534Z","avatar_url":"https://github.com/johan-perso.png","language":"JavaScript","funding_links":["https://ko-fi.com/johan_stickman","https://paypal.me/moipastoii"],"categories":[],"sub_categories":[],"readme":"# InfoScreen\r\n\r\n\u003e Un écran d'informations intelligent, optimisé pour une utilisation au tactile, et prêt à intégrer une multitude d'outils.\r\n\r\n![screenshot](screenshot.png)\r\n\r\n\r\n## Pourquoi faire ?\r\n\r\nCe projet a pour but d'afficher de multiples informations sur un écran tactile qui est constamment allumé. Il permet par exemple de gérer sa domotique ou de recevoir des notifications de certains services, pour être au courant qu'un cours s'apprête à commencer via Pronote par exemple.\r\n\r\n\r\n## Intégrations et fonctionnalités\r\n\r\n* Notification \"Heure du BeReal\" ([@oriionn](https://github.com/oriionn))\r\n* Pronote ([Papillon API](https://github.com/PapillonApp))\r\n* Spotify ([NowPlaying](https://github.com/busybox11/NowPlaying-for-Spotify))\r\n* Étendre un écran de PC ([Deskreen](https://github.com/pavlobu/deskreen))\r\n* [Home Assistant](https://www.home-assistant.io/)\r\n* Météo ([WeatherAPI](https://weatherapi.com))\r\n* Affichage de la batterie du PC sous Linux quand elle est faible\r\n* Changement de la luminosité en fonction de l'éclairage via la webcam\r\n* Personnalisation via une API ouverte\r\n\r\n\r\n## Installation\r\n\r\n\u003e Certaines fonctionnalités peuvent ne pas fonctionner sous Windows ou macOS. Testé avec Debian 12.  \r\n\u003e L'installation nécessite Git, NodeJS (version récente), NPM et PM2.\r\n\r\n```\r\n# Installation d'InfoScreen\r\ngit clone https://github.com/johan-perso/infoscreen\r\ncd infoscreen\r\nnpm install\r\n\r\n# Démarrage\r\nnpm run start\r\n\r\n# Pour laisser le projet tourner en arrière-plan, vous pouvez utiliser PM2\r\n# pm2 start \"npm run start\" --name InfoScreen\r\n\r\n# Pour la première utilisation de PM2, exécuter également ces commandes\r\n# pm2 startup\r\n# pm2 save\r\n\r\n# Vous pourrez ensuite le fermer avec\r\n# pm2 stop InfoScreen\r\n# pm2 save\r\n```\r\n\r\n\r\n## Configuration\r\n\r\n### Fichier .env\r\n\r\nRenommer le fichier `.env.example` en `.env` et modifier les valeurs présentes. Certaines fonctionnalités seront désactivées si aucune valeur ne leur est définie.\r\n\r\n### Changement automatique de la luminosité\r\n\r\nDépendances :\r\n\r\n- Commande `brightnessctl` installée\r\n- Paquet `fswebcam` sous Linux, `imagesnap` sous macOS\r\n\r\nConfigurer la variable d'environnement `VIDEO_DEVICE` par le chemin de votre webcam et `SCREEN_DEVICE` par le nom de votre écran :\r\n\r\n- Pour obtenir le nom de votre webcam, vous pouvez utiliser la commande `v4l2-ctl --list-devices`.\r\n- Pour obtenir le nom de votre écran, vous pouvez utiliser la commande `brightnessctl -l`. Vous pouvez tester un changement avec `brightnessctl -d \"le nom de votre écran\" set 50%`\r\n\r\n### Surveillance via la webcam\r\n\r\n\u003e Lorsque la surveillance est activée, la luminosité automatique renverra une erreur fréquemment dans la console et ne pourra pas fonctionner correctement.\r\n\r\n1. Télécharger l'archive la plus récente de cam2ip via leur [GitHub](https://github.com/gen2brain/cam2ip/releases/tag/1.6)\r\n2. Extraire l'exécutable `cam2ip` présent dans l'archive dans un dossier de votre choix.\r\n3. Configurer la commande à utiliser pour ouvrir un flux vidéo via le fichier .env : `CAMERA_COMMAND=\"/home/your_username/cam2ip/cam2ip -htpasswd-file /home/your_username/cam2ip/htpasswd -index 0\"`\r\n\r\n\u003e Le fichier htpasswd est facultatif mais permet une authentification lors de la connexion au flux vidéo.  \r\n\u003e Pour connecter Home Assistant à votre flux vidéo, ouvrez les réglages et ajoutez une nouvelle intégration \"MJPEG IP Camera\"\r\n\r\n### Emploi du temps via Pronote\r\n\r\nCette fonctionnalité permet de vous envoyer des notifications une heure avant le début de chaque cours, mais aussi d'afficher une barre de progression sur l'écran vous permettant d'estimer le temps avant que le cours commence.\r\n\r\nL'emploi du temps est obtenu chaque nuit à quatre heures du matin et ne prendra pas en compte les modifications effectuées pendant la journée.\r\n\r\nÀ l'heure actuel, le serveur d'API Papillon n'est plus disponible, vous pouvez utiliser l'URL `https://papillon-api.johanstick.fr` en attendant une prochaine mise à jour d'InfoScreen.\r\n\r\nLa variable `PRONOTE_CAS` vous permet de vous connecter à Pronote via un CAS, laissez vide ou entrer une valeur à partir de [cette liste](https://github.com/bain3/pronotepy/blob/master/pronotepy/ent/ent.py).\r\n\r\n### Utilisation sans Spotify/Home Assistant\r\n\r\nSi aucune valeur n'est définie pour `SPOTIFY_MINIPLAYER` **et** `HA_DASHBOARD`, les fonctionnalités correspondantes seront désactivées. Les informations essentielles (heure, date, météo, barre de progression via Pronote) seront affichées en plein écran après vingt secondes.\r\n\r\n\r\n## API\r\n\r\nInfoScreen ouvre un serveur WEB avec une API sur le port `3000` (modifiable avec la variable d'env `PORT`), celui-ci vous permet d'effectuer diverses actions sur votre écran afin d'étendre ses fonctionnalités et intégrations.\r\n\r\n### Exemples d'intégration\r\n\r\n- Vous pouvez créer des automatisations sur Home Assistant :\r\n  - Activation/désactivation de la webcam\r\n  - Activation/désactivation de l'écran\r\n  - Mettre à jour la luminosité dès qu'une lumière change d'état\r\n- Vous pouvez créer des raccourcis (avec Raccourcis sur iOS ou Automate sur Android) :\r\n  - Allumer/éteindre l'écran lorsque vous vous en éloignez/rapprochez\r\n  - Afficher les SMS d'authentifications à deux facteurs\r\n  - Vous informez du niveau de batterie de votre téléphone\r\n  - Vous prévenir lors d'un appel entrant ou du déclenchement d'une alarme\r\n- Vous pouvez développer un robot Telegram pour :\r\n  - Afficher ou enlever une page web sur l'écran, pour étendre un moniteur avec Deskreen par exemple\r\n\r\n### Liste des endpoints\r\n\r\n#### GET `/change`\r\n\r\n\u003e Active ou désactive la vérification automatique de la luminosité via la webcam\r\n\r\nQuery :\r\n- `state` : boolean\r\n\r\n#### GET `/camera`\r\n\r\n\u003e Change l'état de la surveillance via la webcam, peut provoquer des problèmes avec la détection de la luminosité\r\n\r\nQuery :\r\n- `state` : boolean\r\n\r\n#### GET `/recheck`\r\n\r\n\u003e Revérifie la luminosité via la webcam si la vérification automatique est active\r\n\r\n#### POST `/pcmonitor`\r\n\r\n\u003e Affiche une page web en plein écran, les URLs Deskreen seront automatiquement améliorées pour une meilleure intégration\r\n\r\nBody :\r\n- `url` : string, ou rien pour fermer la page\r\n\r\n#### POST `/notification`\r\n\r\n\u003e Envoie une notification personnalisée sur l'écran\r\n\r\nBody :\r\n- `title` : string\r\n- `content` : string\r\n- `iconPath` : string\r\n- `timeout` : int\r\n\r\n\r\n## Problèmes rencontrés\r\n\r\n\u003e Si le problème que vous rencontrez n'est pas listé ici, ouvrez une issue sur ce dépôt ou [contactez moi](https://johanstick.fr/contact).\r\n\r\n#### `Missing X server or $DISPLAY` / `The platform failed to initialize.`\r\n\r\nExécuter la commande `sudo xhost +` pour permettre l'ouverture d'une fenêtre sur votre écran. Dans certaines configurations, vous devrez peut-être exécuter la commande depuis l'appareil lui-même et non via SSH.\r\n\r\n#### `Impossible d'obtenir le niveau de batterie`\r\n\r\nPour permettre à InfoScreen d'obtenir le niveau de la batterie de votre appareil, assurez-vous d'avoir installé le paquet \"upower\" sous Debian (ou autres distributions basées).\r\n\r\n\r\n## Licence\r\n\r\nMIT © [Johan](https://johanstick.fr). Soutenez ce projet via [Ko-Fi](https://ko-fi.com/johan_stickman) ou [PayPal](https://paypal.me/moipastoii) si vous souhaitez m'aider 💙\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-perso%2Finfoscreen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohan-perso%2Finfoscreen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-perso%2Finfoscreen/lists"}