{"id":28574729,"url":"https://github.com/roleoroleo/yi-hack_ha_integration","last_synced_at":"2025-06-10T22:02:47.320Z","repository":{"id":38416825,"uuid":"360213486","full_name":"roleoroleo/yi-hack_ha_integration","owner":"roleoroleo","description":"Home Assistant custom integration for Yi cameras: yi-hack-MStar, yi-hack-Allwinner, yi-hack-Allwinner-v2, yi-hack-v5 and sonoff-hack","archived":false,"fork":false,"pushed_at":"2025-04-18T18:50:54.000Z","size":265,"stargazers_count":240,"open_issues_count":6,"forks_count":34,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-19T07:06:48.662Z","etag":null,"topics":["camera","custom","custom-component","firmware","hack","home-assistant","rtsp","yi"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/roleoroleo.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,"zenodo":null}},"created_at":"2021-04-21T15:10:04.000Z","updated_at":"2025-04-18T18:49:30.000Z","dependencies_parsed_at":"2023-12-01T13:59:53.770Z","dependency_job_id":"b48c249c-7d51-43e1-9d95-c4fed248ed0b","html_url":"https://github.com/roleoroleo/yi-hack_ha_integration","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roleoroleo%2Fyi-hack_ha_integration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roleoroleo%2Fyi-hack_ha_integration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roleoroleo%2Fyi-hack_ha_integration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roleoroleo%2Fyi-hack_ha_integration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/roleoroleo","download_url":"https://codeload.github.com/roleoroleo/yi-hack_ha_integration/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/roleoroleo%2Fyi-hack_ha_integration/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259159618,"owners_count":22814490,"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":["camera","custom","custom-component","firmware","hack","home-assistant","rtsp","yi"],"created_at":"2025-06-10T22:01:40.546Z","updated_at":"2025-06-10T22:02:47.294Z","avatar_url":"https://github.com/roleoroleo.png","language":"Python","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=JBYXDMR24FW7U\u0026currency_code=EUR\u0026source=url"],"categories":["Python"],"sub_categories":[],"readme":"# yi-hack Home Assistant integration\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://github.com/roleoroleo/yi-hack_ha_integration/raw/main/images/icon.png\"\u003e\n\u003c/p\u003e\n\n## Overview\nyi-hack Home Assistant is a custom integration for Yi cameras (or Sonoff camera) with one of the following custom firmwares:\n- yi-hack-MStar - https://github.com/roleoroleo/yi-hack-MStar\n- yi-hack-Allwinner - https://github.com/roleoroleo/yi-hack-Allwinner\n- yi-hack-Allwinner-v2 - https://github.com/roleoroleo/yi-hack-Allwinner-v2\n- yi-hack-v5 (partial support) - https://github.com/alienatedsec/yi-hack-v5 (seems like full support with 0.4.1j release)\n- sonoff-hack - https://github.com/roleoroleo/sonoff-hack\n\u003cbr\u003e\nAnd make sure you have the latest version.\n\u003cbr\u003e\n\nThis integration is available from the Lovelace frontend without the need to configure the devices in the file configuration.yaml\nThe wizard will connect to your cam and will install the following entities:\n- ffmpeg cam with stream and snapshot capabilities\n- mqtt cam with the last frame saved during a motion detection event\n- mqtt binary sensor for status (connection)\n- mqtt binary sensor for motion detections: human, animal, vehicle, ... (*)\n- mqtt binary sensor for sound detection (*)\n- mqtt binary sensor for baby crying detection (*)\n- media player entity useful to play Home Assistant standard tts service (*)\n- switches and selects to enable/disable some cam configuration\n- ptz service (*)\n- speak service (only available if you install the internal tts engine from here https://github.com/roleoroleo/yi-hack-utils)\n\n(*) available only if your cam supports it.\n\nIf you configure motion detection in your camera and media source in your home assistant installation, you will be able to view the videos in the \"Media\" section (left panel of the main page).\n\n## Dependencies\n1. Home Assistant\n   - [MQTT Integration](https://www.home-assistant.io/integrations/mqtt) installed\n   - [Mosquitto broker](https://github.com/home-assistant/addons/tree/master/mosquitto) add-on installed and connected to MQTT\n2. Camera\n   - MQTT enabled\n   - Configured with MQTT Broker credentials\n   - Default Topics configuration\n\n## Installation\n**(1)** Copy the  `custom_components` folder your configuration directory.\nIt should look similar to this:\n```\n\u003cconfig directory\u003e/\n|-- custom_components/\n|   |-- yi_hack/\n|       |-- translations/\n|       |-- __init__.py\n|       |-- binary_sensor.py\n|       |-- camera.py\n|       |-- config.py\n|       |-- config_flow.py\n|       |-- const.py\n|       |-- manifest.json\n|       |-- media_player.py\n|       |-- media_source.py\n|       |-- select.py\n|       |-- services.yaml\n|       |-- strings.json\n|       |-- switch.py\n|       |-- views.py\n```\n**(2)** Restart Home Assistant\n\n**(3)** Configure device and entities:\n- Go to Settings -\u003e Integrations\n- Click \"Add Integration\" in the lower-right corner\n- Select \"Yi Cam with yi-hack\" integration\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/39277388/118390725-eadd7700-b630-11eb-87f9-9b03b1e587f4.png\" width=\"400\"\u003e\n\u003c/p\u003e\n\n- Enter the settings to connect to the web interface of your cam: host, port, username, password and ffmpeg parameters\n\u003cp align=\"center\"\u003e\n\u003cimg src=\"https://user-images.githubusercontent.com/39277388/118390634-67bc2100-b630-11eb-8f73-008cad6b2b3d.png\" width=\"400\"\u003e\n\u003c/p\u003e\n\n- Confirm and wait for the wizard completion\n- Set the \"Area\" if you need it\n- Enjoy your cam\n\u003cbr\u003e\u003cbr\u003e\n\n## Add the stream to lovelace\nIf you want to add your live stream to lovelace, use this custom components: https://github.com/AlexxIT/WebRTC/\n\nAnd add a simple configuration like this:\n```\ntype: 'custom:webrtc-camera'\nentity: camera.yi_hack_m_XXXXXX_cam\nui: true\n```\nIf you have the camer setup in the motionEye Addon you can display the stream with the following:\n```\ntype: picture-entity\nentity: camera.camera1\n```\n_The Adress to add the Cam to motionEye is visible on the \"Home\" webinterface page. In my case it was: rtsp://192.168.178.243/ch0_0.h264_\n\n## Add PTZ-Buttons to Dashboard _(only if supported by the camera)_\nExample for left movement\n```\ntype: button\ntap_action:\n  action: call-service\n  service: yi_hack.ptz\n  target: {}\n  data:\n    movement: left\n    entity_id: camera.yi_hack_v5_abb....\nicon: mdi:arrow-left-bold-circle-outline\nname: yicam_ptz_left\n```\n\n## Requirements\nThis component requires MQTT integration to be installed.\nPlease be sure you added MQTT to you Home Assistant configuration.\n\nIf you want to browse mp4 files saved on your cam, add media source component to your home assistant installation.\nAdd the linw below to your configuration file:\n```\n# Example configuration.yaml entry\nmedia_source:\n```\n\n---\n\n### DISCLAIMER\n**I AM NOT RESPONSIBLE FOR ANY USE OR DAMAGE THIS SOFTWARE MAY CAUSE. THIS IS INTENDED FOR EDUCATIONAL PURPOSES ONLY. USE AT YOUR OWN RISK.**\n\n## Donation\nIf you like this project, you can buy me a beer :) \n\nClick [here](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=JBYXDMR24FW7U\u0026currency_code=EUR\u0026source=url) or use the below QR code to donate via PayPal\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/roleoroleo/yi-hack_ha_integration/assets/39277388/196e34bf-8a72-4ed9-92ce-59010cd81b37\"/\u003e\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froleoroleo%2Fyi-hack_ha_integration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Froleoroleo%2Fyi-hack_ha_integration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Froleoroleo%2Fyi-hack_ha_integration/lists"}