{"analyzedAt":"2022-07-01T23:29:09.078Z","collected":{"metadata":{"name":"homebridge-xiaomi-roborock-vacuum-zones","scope":"unscoped","version":"0.4.2","description":"Xiaomi Vacuum Cleaner, plugin for Homebridge. With added zone configuration","keywords":["homebridge-plugin","xiaomi","mi robot","vacuum cleaner","roborock s50","xiaomi vacuum gen1","xiaomi vacuum gen2"],"date":"2019-02-22T05:02:11.717Z","publisher":{"username":"smileydude","email":"idsmileydudeid@gmail.com"},"maintainers":[{"username":"smileydude","email":"idsmileydudeid@gmail.com"}],"repository":{"type":"git","url":"git+https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum.git"},"links":{"npm":"https://www.npmjs.com/package/homebridge-xiaomi-roborock-vacuum-zones","homepage":"https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum","repository":"https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum","bugs":"https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum/issues"},"license":"MIT","dependencies":{"miio":"git://github.com/Smileydude/miio.git#master"},"releases":[{"from":"2022-06-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2022-04-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":1},{"from":"2022-01-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":1},{"from":"2021-07-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":1},{"from":"2020-07-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":1}],"readme":"# Homebridge-xiaomi-roborock-vacuum-zones\n\n[![PayPal Donate](https://img.shields.io/badge/PayPal-Donate-blue.svg)](https://www.paypal.me/smileydude)\n[![GitHub last commit](https://img.shields.io/github/last-commit/smileydude/homebridge-xiaomi-roborock-vacuum.svg)](https://github.com/smileydude/homebridge-xiaomi-roborock-vacuum)\n[![npm](https://img.shields.io/npm/dt/homebridge-xiaomi-roborock-vacuum-zones.svg)](https://www.npmjs.com/package/homebridge-xiaomi-roborock-vacuum-zones)\n[![npm version](https://badge.fury.io/js/homebridge-xiaomi-roborock-vacuum-zones.svg)](https://badge.fury.io/js/homebridge-xiaomi-roborock-vacuum-zones)\n[![dependencies Status](https://david-dm.org/smileydude/homebridge-xiaomi-roborock-vacuum.svg)](https://david-dm.org/smileydude/homebridge-xiaomi-roborock-vacuum.svg)\n\n## Config Overview\n\nCurrently you need to replicate the config for each room, and just change the zones coordinates. You can get the coordinates by either trial and error, then checking the map after sending it off or send it off and and take a screen shot of the zone. Print it out and figure out the scale, and calculate all the zones.\n\nThe dock is around the middle [25600, 25600], the whole map can get as big as 51200 x 51200. Mine is no where near that. The coordinate order is [bottom-left-x, bottom-left-y, top-right-x, top-right-y]\n\nFor Xiaomi roborock v2 you can save your map, this will prevent it from getting rotated. Make sure to do one cleanup and then save the map! You will not need the all zone config (House Vacuum in example) as it can still do a default cleanup now without rotating the map. Just remove the zones part of config and it will do a normal cleanup (I still prefer one as I think it does a better job when you tell it what the outline of the room is)\n\nFor Xiaomi roborock v1 you are going to need a zone that has a list of all your zones. i.e. Like the house vacuum in the example. If you omit the zones config here it will do all the space, but as one big room. It does the worst job and takes forever.\n**If your map gets screwed up because it got stuck or you picked it up, just keep starting new full cleanups till it matches again should rotate by 90 degrees each time**\n\nYou can add in an extra number to a zone for the amount of times you want it to do a single area. \n\n```json\n\"accessories\": [\n    {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Bathroom Vacuum Running Twice\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    23000,\n                    26900,\n                    26000,\n                    29000,\n                    2\n                ]\n            ]\n        }\n    ]\n```\n\nYou can also add in a target option and configure the x,y coordinate you want the robot to go to.\n**Make sure to not include the zones config, as it will override the target config**\n\n```json\n\"accessories\": [\n    {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Bathroom Vacuum Running Twice\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"target\": [\n                23000,\n                29000\n            ]\n        }\n    ]\n```\n\n\n#### Example\n\n<img src=\"https://github.com/Smileydude/homebridge-xiaomi-roborock-vacuum/blob/master/example.PNG?raw=true\" alt=\"Layout example\" width=\"650\">\n\n```json\n\"accessories\": [\n    {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Bathroom Vacuum\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    23000,\n                    26900,\n                    26000,\n                    29000\n                ]\n            ]\n        },\n        {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Kitchen Vacuum\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    20010,\n                    28200,\n                    22035,\n                    29955\n                ],\n                [\n                    22090,\n                    27160,\n                    23325,\n                    32035\n                ]\n            ]\n        },\n        {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Bedroom Vacuum\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    23000,\n                    22285,\n                    26000,\n                    26910\n                ]\n            ]\n        },\n        {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"Living Room Vacuum\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    19360,\n                    22285,\n                    23000,\n                    27745\n                ]\n            ]\n        },\n        {\n            \"accessory\": \"XiaomiRoborockVacuum\",\n            \"name\": \"House Vacuum\",\n            \"ip\": \"ip\",\n            \"token\": \"token\",\n            \"dock\": false,\n            \"pause\": false,\n            \"zones\": [\n                [\n                    19360,\n                    22285,\n                    23000,\n                    27745\n                ],\n                [\n                    23000,\n                    22285,\n                    26000,\n                    26910\n                ],\n                [\n                    20010,\n                    28200,\n                    22035,\n                    29955\n                ],\n                [\n                    22090,\n                    27160,\n                    23325,\n                    32035\n                ],\n                [\n                    23000,\n                    26900,\n                    26000,\n                    29000\n                ]\n            ]\n        }\n    ]\n```\n\n#### Token\nThere are [many ways](https://github.com/jghaanstra/com.xiaomi-miio/blob/master/docs/obtain_token.md). I followed the none jailbroken iphone way using ibackup viewer\n\n## Optional parameters\n| Name of parameter | Default value | Notes |\n|---|---|---|\n| `pause` | false | when set to true, HomeKit shows an additional switch for \"pause\" - switch is on, when pause is possible |\n| `dock` | false |  when set to true, HomeKit shows an occupancy sensor, if robot is in the charging dock |\n\n\n## Xiaomi Token\nTo use this plugin, you have to read the \"token\" of the xiaomi vacuum robots. Here are some detailed instructions:\n- :us::gb: - [python-miio - Getting started](https://python-miio.readthedocs.io/en/latest/discovery.html)\n- :de: - [Apple HomeKit Forum - HomeKit.Community](https://forum.smartapfel.de/forum/thread/370-xiaomi-token-auslesen/)\n- :de: - [Homematic-Guru.de](https://homematic-guru.de/xiaomi-vacuum-staubsauger-roboter-mit-homematic-steuern)\n\n## Lisense\nThe MIT License (MIT)\n\nCopyright (c) 2018 Smileydude\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE."},"npm":{"downloads":[{"from":"2022-06-30T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2022-06-24T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":4},{"from":"2022-06-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":22},{"from":"2022-04-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":148},{"from":"2022-01-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":211},{"from":"2021-07-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":445}],"starsCount":0},"github":{"homepage":"https://www.loggn.de","forkOf":"homebridge-xiaomi-roborock-vacuum/homebridge-xiaomi-roborock-vacuum","starsCount":16,"forksCount":4,"subscribersCount":6,"issues":{"count":16,"openCount":9,"distribution":{"3600":0,"10800":1,"32400":0,"97200":0,"291600":2,"874800":1,"2624400":3,"7873200":0,"23619600":0,"70858800":0,"212576400":9},"isDisabled":false},"contributors":[{"username":"nicoh88","commitsCount":27},{"username":"Smileydude","commitsCount":1}],"commits":[{"from":"2022-06-24T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2022-06-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2022-04-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2022-01-02T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0},{"from":"2021-07-01T00:00:00.000Z","to":"2022-07-01T00:00:00.000Z","count":0}]},"source":{"files":{"readmeSize":8263,"testsSize":0},"badges":[{"urls":{"original":"https://img.shields.io/npm/dt/homebridge-xiaomi-roborock-vacuum-zones.svg","shields":"https://img.shields.io/npm/dt/homebridge-xiaomi-roborock-vacuum-zones.svg","content":"https://img.shields.io/npm/dt/homebridge-xiaomi-roborock-vacuum-zones.json"},"info":{"service":"npm","type":"downloads","modifiers":{"type":"dt"}}},{"urls":{"original":"https://david-dm.org/smileydude/homebridge-xiaomi-roborock-vacuum.svg","service":"https://david-dm.org/smileydude/homebridge-xiaomi-roborock-vacuum.svg","shields":"https://img.shields.io/david/smileydude/homebridge-xiaomi-roborock-vacuum.svg","content":"https://img.shields.io/david/smileydude/homebridge-xiaomi-roborock-vacuum.json"},"info":{"service":"david","type":"dependencies","modifiers":{"statusType":"normal"}}}],"outdatedDependencies":{"miio":{"required":"git://github.com/Smileydude/miio.git#master","warn":{"code":"ESCM"}}}}},"evaluation":{"quality":{"carefulness":0.355,"tests":0,"health":0.75,"branding":0.3},"popularity":{"communityInterest":28,"downloadsCount":49.333333333333336,"downloadsAcceleration":-0.13320015220700152,"dependentsCount":0},"maintenance":{"releasesFrequency":0.28664383561643836,"commitsFrequency":0,"openIssues":0.4375,"issuesDistribution":0}},"score":{"final":0.34151084630081563,"detail":{"quality":0.5002936686282246,"popularity":0.060936622101455916,"maintenance":0.4859855085052534}}}