{"id":25291273,"url":"https://github.com/tbowmo/roku2mqtt","last_synced_at":"2025-06-10T10:34:58.020Z","repository":{"id":139934645,"uuid":"127132973","full_name":"tbowmo/roku2mqtt","owner":"tbowmo","description":"Binds an emulated roku to mqtt topic for home automation rules","archived":false,"fork":false,"pushed_at":"2024-05-08T21:15:21.000Z","size":19,"stargazers_count":6,"open_issues_count":0,"forks_count":8,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-05-08T22:28:49.593Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tbowmo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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,"publiccode":null,"codemeta":null}},"created_at":"2018-03-28T11:54:52.000Z","updated_at":"2024-05-08T22:28:51.246Z","dependencies_parsed_at":"2024-05-08T22:28:50.818Z","dependency_job_id":"cbfbd381-c7da-47a9-b1e0-e0fa3d1d436b","html_url":"https://github.com/tbowmo/roku2mqtt","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/tbowmo%2Froku2mqtt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbowmo%2Froku2mqtt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbowmo%2Froku2mqtt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tbowmo%2Froku2mqtt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tbowmo","download_url":"https://codeload.github.com/tbowmo/roku2mqtt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238574749,"owners_count":19494725,"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":"2025-02-13T00:52:24.338Z","updated_at":"2025-02-13T00:52:24.860Z","avatar_url":"https://github.com/tbowmo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Roku2Mqtt\n===\n\nPython program to emulate a roku device, which sends keypresses on mqtt\n\nThese keypresses can then be used in mqtt flows, to control other things.\n\nInstallation\n===\n\nStarting python script with virtual-environment\n-----------------------------------------------\n\nFirst ensure that you have at least python3.6 and venv installed, then create a new virtual environment for your python script:\n\n```shell\n$ python3 -m venv ~/roku_dummy\n$ source ~/roku_dummy/bin/activate\ncd ~/roku_dummy\n$ pip install --no-cache-dir -r requirements.txt\n```\n\nYou are now ready to start the script with\n\n`python -m roku2mqtt \u003coptions\u003e`\n\nStarting with systemd\n---\nStart by following the description above with virtual-environment\n\nThen create a file named roku.service in /etc/systemd/system, with the following content (update paths and hosts as desired)\n```\n[Unit]\nDescription=Roku\nWants=network.target\nAfter=network.target\n\n[Service]\nType=simple\nWorkingDirectory=/home/pi/roku_dummy\nExecStart=/home/pi/roku_dummy/bin/python -m roku -H 192.168.1.64\n\n[Install]\nWantedBy=multi-user.target\n```\n\nThen in a terminal, execute the following two commands to enable your new service\n```shell\n# systemctl enable roku.service\n# systemctl start roku.service\n```\n\n---\nIf you wish to run inside a docker container, you can build your own image with `docker build . --tag roku_dummy` and then run it with `docker run roku_dummy \u003coptions\u003e` \n\nCommand line options\n-------------\nConfigure through command line options, as shown below\n```\nusage: roku2mqtt [-h] [-r MQTTROOT] [-H MQTTHOST] [--mqttport MQTTPORT]\n                 [--mqttuser MQTTUSER] [--mqttpass MQTTPASS] [-l LOGFILE] [-d]\n                 [-v] [-V] [--listen LISTEN] [--usn USN]\n\nRoku emulator\n\nEmulates a roku box, and publishes keystrokes on mqtt,\nthis is particular usefull in conjunction with a\nharmony hub based remote control\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -r MQTTROOT, --mqttroot MQTTROOT\n                        Root topic for mqtt publish\n  -H MQTTHOST, --mqtthost MQTTHOST\n                        Hostname / ip address for mqtt broker\n  --mqttport MQTTPORT   Port number for mqtt broker\n  --mqttuser MQTTUSER   User for mqtt connection\n  --mqttpass MQTTPASS   Password for mqtt connection\n  -l LOGFILE, --logfile LOGFILE\n                        Log to filename\n  -d, --debug           loglevel debug\n  -v, --verbose         loglevel info\n  -V, --version         show program's version number and exit\n  --listen LISTEN       IP address and port for roku api, in the form of\n                        192.168.3.113:8080\n  --usn USN             Roku usn\n\nI have detected this machines ip as: 192.168.3.113\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbowmo%2Froku2mqtt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftbowmo%2Froku2mqtt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftbowmo%2Froku2mqtt/lists"}