{"id":15437928,"url":"https://github.com/tchapi/tweet-a-light","last_synced_at":"2025-07-18T09:34:50.286Z","repository":{"id":25576831,"uuid":"29010701","full_name":"tchapi/tweet-a-light","owner":"tchapi","description":"FB + Twitter + Raspberry Pi + BlinkM","archived":false,"fork":false,"pushed_at":"2015-02-02T20:54:35.000Z","size":3060,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-12T12:28:05.134Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tchapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-09T09:52:22.000Z","updated_at":"2015-02-02T20:54:36.000Z","dependencies_parsed_at":"2022-08-02T10:42:26.429Z","dependency_job_id":null,"html_url":"https://github.com/tchapi/tweet-a-light","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Ftweet-a-light","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Ftweet-a-light/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Ftweet-a-light/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tchapi%2Ftweet-a-light/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tchapi","download_url":"https://codeload.github.com/tchapi/tweet-a-light/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247445648,"owners_count":20939953,"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":[],"created_at":"2024-10-01T18:59:48.437Z","updated_at":"2025-04-06T06:46:17.615Z","avatar_url":"https://github.com/tchapi.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Installation\n\nInstaller les dépendances\n\n    sudo apt-get update\n    sudo apt-get install -y htop wget curl python-setuptools python-pip avahi-daemon i2c-tools python-smbus vim nginx\n\nPuis les modules python nécessaires :\n\n    sudo pip install bottle wifi smbus\n    easy_install twython\n\nChanger le nom d'hôte et étendre le file system avec :\n\n    sudo raspi-config\n\n\u003e Nous utilisons le nom d'hôte `totem1` par la suite\n\n### Configuration\n\nDans le fichier suivant :\n\n    sudo nano /etc/modprobe.d/raspi-blacklist.conf\n\nCommenter le module i2c :\n\n    # blacklist spi and i2c by default (many users don't need them)\n    blacklist spi-bcm2708\n    #blacklist i2c-bcm2708\n\nEt dans le fichier de modules :\n\n    sudo nano /etc/modules\n\nAjouter le module i2c :\n\n    snd-bcm2835\n    i2c-dev\n\nPuis :\n\n    sudo adduser pi i2c\n\nAjouter une configuration de proxy à nginx :\n\n\n    sudo vi /etc/nginx/available/totem.conf\n\nAvec :\n\n    server {\n      server_name totem1.local totem1;\n      rewrite ^/(.*)$ http://totem1:8080/$1 permanent;\n    }\n\npuis :\n\n    cd /etc/nginx/enabled \u0026\u0026 ln -s ../available/totem.conf .\n    sudo service nginx restart\n\nPour lancer `avahi` au démarrage :\n\n    sudo update-rc.d avahi-daemon defaults\n\nPuis :\n\n    sudo insserv avahi-daemon\n\nÉditer le fichier de service :\n\n    sudo pico /etc/avahi/services/multiple.service\n\nAvec ce contenu :\n\n```xml\n\u003c?xml version=\"1.0\" standalone='no'?\u003e\n\u003c!DOCTYPE service-group SYSTEM \"avahi-service.dtd\"\u003e\n\u003cservice-group\u003e\n        \u003cname replace-wildcards=\"yes\"\u003e%h\u003c/name\u003e\n        \u003cservice\u003e\n                \u003ctype\u003e_device-info._tcp\u003c/type\u003e\n                \u003cport\u003e0\u003c/port\u003e\n                \u003ctxt-record\u003emodel=TOTEM\u003c/txt-record\u003e\n        \u003c/service\u003e\n        \u003cservice\u003e\n                \u003ctype\u003e_ssh._tcp\u003c/type\u003e\n                \u003cport\u003e22\u003c/port\u003e\n        \u003c/service\u003e\n\u003c/service-group\u003e\n```\n\nEt enfin :\n\n    sudo /etc/init.d/avahi-daemon restart\n\nEt finalement, redémarrez (`sudo reboot`)\n\n### Créer un script de démarrage\n\nAvec :\n\n    sudo vi /etc/init.d/totem\n\n\n```bash\n#! /bin/sh\n\ncase \"$1\" in\n  start)\n    echo \"Starting totem ..\"\n    cd /home/pi/firmware/ \u0026\u0026 sudo python totem.py\n    ;;\n  stop)\n    echo \"Stopping totem ..\"\n    sudo pkill -f \"totem\"\n    ;;\n  *)\n    echo \"Usage: /etc/init.d/totem {start|stop}\"\n    exit 1\n    ;;\nesac\n\nexit 0\n```\n\nPuis \n\n    sudo update-rc.d totem defaults\n\n\n### Accès à l'interface\n\nSur le même réseau wifi, aller sur http://totem1.local ou http://totem1\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Ftweet-a-light","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftchapi%2Ftweet-a-light","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftchapi%2Ftweet-a-light/lists"}