{"analyzedAt":"2023-01-06T20:09:04.634Z","collected":{"metadata":{"name":"homebridge-valetudo-xiaomi-vacuum","scope":"unscoped","version":"0.3.2","description":"A Homebridge plugin for Xiaomi Vacuum Cleaner 1st gen (Mi Robot) and 2nd gen (Roborock S50), with Valetudo installed.","keywords":["homebridge-plugin","xiaomi","mi robot","vacuum cleaner","roborock s50","xiaomi vacuum gen1","xiaomi vacuum gen2"],"date":"2023-01-06T19:51:56.448Z","publisher":{"username":"macbirdie","email":"dev@nomadic.works"},"maintainers":[{"username":"macbirdie","email":"dev@nomadic.works"}],"repository":{"type":"git","url":"git+https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum.git"},"links":{"npm":"https://www.npmjs.com/package/homebridge-valetudo-xiaomi-vacuum","homepage":"https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum","repository":"https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum","bugs":"https://github.com/onfoot/homebridge-valetudo-xiaomi-vacuum/issues"},"license":"MIT","devDependencies":{"eslint":"^7.23.0","eslint-config-airbnb":"^18.2.1","eslint-config-airbnb-base":"^14.2.1","eslint-plugin-import":"^2.22.1","eslint-plugin-jsx-a11y":"^6.4.1","eslint-plugin-react":"^7.23.1"},"releases":[{"from":"2022-12-07T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":2},{"from":"2022-10-08T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":2},{"from":"2022-07-10T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":2},{"from":"2022-01-06T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":3},{"from":"2021-01-06T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":10}],"readme":"# homebridge-valetudo-xiaomi-vacuum\n\n`homebridge-valetudo-xiaomi-vacuum` is a [Homebridge](https://github.com/nfarina/homebridge) plugin which you can use to control your Xiaomi Roborock vacuum that has [Valetudo](https://github.com/Hypfer/Valetudo) installed.\n\n## Installation\n\n`npm -g install homebridge-valetudo-xiaomi-vacuum`\n\n## Configuration\n\nAn entry in `config.json` is needed.\n\nExample:\n\n```\n{\n    \"accessory\": \"ValetudoXiaomiVacuum\",\n    \"name\": \"<Accessory name, e.g. Vacuum>\",\n    \"ip\": \"<Vacuum's ip address>\"\n}\n```\n\nOptionally, you can enable switches for controlling speed modes of the device by adding the `power-control` dictionary with `default-speed` and `high-speed` keys (both mandatory in that case), where the speed preset may be one of: `quiet`, `balanced`, `turbo`, and `max`.\n\nFor a mopping-capable vacuum (i.e. Gen 2 - S50/S55), a mop mode button can be also enabled using the `mop-enabled` option that is a `true`/`false` value. You can skip that option altogether - `false` will be the default.\n\nExample:\n\n```\n{\n    \"accessory\": \"ValetudoXiaomiVacuum\",\n    \"name\": \"Mo\",\n    \"ip\": \"192.00.486.259\",\n    \"power-control\": {\n        \"default-speed\": \"quiet\",\n        \"high-speed\": \"turbo\",\n        \"mop-enabled\": true\n    }\n}\n```\n\n## Valetudo RE\n\nIf running your vacuum using Valetudo RE, `legacy-mode` needs to be set to `true`.\n\nExample:\n\n```\n{\n    \"accessory\": \"ValetudoXiaomiVacuum\",\n    \"name\": \"<Accessory name, e.g. Vacuum>\",\n    \"ip\": \"<Vacuum's ip address>\",\n    \"legacy-mode\": true\n}\n```\n\n## Authentication\n\nIf your vacuum access is restricted with login and password, you need to add a `authentication` option with the value of `<username>:<password>` to device's config.\n\nExample for when username and password are \"admin\" (not recommended!):\n\n```\n{\n    \"accessory\": \"ValetudoXiaomiVacuum\",\n    \"name\": \"<Accessory name, e.g. Vacuum>\",\n    \"ip\": \"<Vacuum's ip address>\",\n    \"authentication\": \"admin:admin\"\n}\n```\n\n## Compatibility\n\nTested on Roborock S50 with firmware v001748 and Valetudo 0.6.1.\n\n## Vacuum map in Home app\n\nI played a little with an idea of setting up a HomeKit camera that grabs the generated Vacuum image and streams it as a video.\n\nHere's how to achieve it:\n\n1. An mqtt broker running on a home server. [hmq](https://github.com/fhmq/hmq) in my case.\n2. Vacuum set up to connect to said mqtt broker.\n3. [I can't believe it's valetudo](https://github.com/Hypfer/ICantBelieveItsNotValetudo) running on the camera server, with webserver enabled, running on port 3030.\n4. [homebridge-camera-ffmpeg](https://www.npmjs.com/package/homebridge-camera-ffmpeg) installed on the camera server's homebridge, properly configured.\n5. Camera added to Home.\n\n`homebridge-camera-ffmpeg` config:\n\n```\n{\n      \"name\": \"Vacuum\",\n      \"videoConfig\": {\n        \"source\": \"-loop 1 -i http://localhost:3030/api/map/image\",\n        \"videoFilter\": \"pad='ih*16/9:ih:(ow-iw)/2:(oh-ih)/2',scale=1920:1080\",\n        \"maxFPS\": 5\n      }\n}\n```\n\n- `-loop 1` sets up ffmpeg so it's constantly loading the generated png for each frame\n- `pad` filter is set up so it expands the generated png to an 16:9 aspect ratio image so it looks right in Home app, then it's scaled using `scale` down to 1920x1080\n- `maxFPS` set to a reasonable value; at `1` it was having hard time to start live streaming in Home app; at `5` it's instantaneous\n\nLooks cool!"},"npm":{"downloads":[{"from":"2023-01-05T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":10},{"from":"2022-12-30T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":171},{"from":"2022-12-07T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":184},{"from":"2022-10-08T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":328},{"from":"2022-07-10T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":573},{"from":"2022-01-06T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":1278}],"starsCount":0},"github":{"starsCount":21,"forksCount":10,"subscribersCount":5,"issues":{"count":24,"openCount":8,"distribution":{"3600":3,"10800":0,"32400":3,"97200":2,"291600":2,"874800":0,"2624400":3,"7873200":0,"23619600":3,"70858800":5,"212576400":3},"isDisabled":false},"contributors":[{"username":"onfoot","commitsCount":4},{"username":"maciej-rutkowski-intive","commitsCount":1},{"username":"greatestview","commitsCount":1}],"commits":[{"from":"2022-12-30T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":5},{"from":"2022-12-07T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":5},{"from":"2022-10-08T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":5},{"from":"2022-07-10T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":5},{"from":"2022-01-06T00:00:00.000Z","to":"2023-01-06T00:00:00.000Z","count":8}]},"source":{"files":{"readmeSize":3371,"testsSize":0},"linters":["eslint"]}},"evaluation":{"quality":{"carefulness":0.42,"tests":0,"health":1,"branding":0},"popularity":{"communityInterest":39,"downloadsCount":109.33333333333333,"downloadsAcceleration":0.5784817351598174,"dependentsCount":0},"maintenance":{"releasesFrequency":1,"commitsFrequency":0.7628253424657534,"openIssues":0.7777777777777778,"issuesDistribution":0}},"score":{"final":0.3875914456745315,"detail":{"quality":0.4418911785289755,"popularity":0.06957338935830083,"maintenance":0.6590668738298103}}}