Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom areas and spots as separate device #63

Closed
Glujaz opened this issue Apr 19, 2021 · 43 comments
Closed

Custom areas and spots as separate device #63

Glujaz opened this issue Apr 19, 2021 · 43 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Glujaz
Copy link

Glujaz commented Apr 19, 2021

Hello (again) here, doing a feature request (don't know if this is possible).

I created some custom areas, which are specific rooms (like kitchen or so).
The cleaner is seen as a single device in HomeKit, with a lot of actions.

is it possible to add a way to separate these custom areas as a separate device, so that I can move them into other rooms ? Separating the switches in HomeKit and assigning them to a specific room changes the room for every other switches, which is not very useful.

thanks in advance for the reply !

@nicoduj nicoduj self-assigned this Apr 20, 2021
@nicoduj nicoduj added the enhancement New feature or request label Apr 20, 2021
@nicoduj nicoduj added this to the 1.5.0 milestone Apr 20, 2021
@nicoduj
Copy link
Owner

nicoduj commented Apr 20, 2021

Hi, I put this in the backlog.

As soon as I get some time (not a lot those days ...)

@Glujaz
Copy link
Author

Glujaz commented Apr 20, 2021

No problem ! Take your time in these hard times :)

bon courage !

@nicoduj
Copy link
Owner

nicoduj commented Apr 20, 2021

You can give it a try in 1.4.5-beta.1

@Glujaz
Copy link
Author

Glujaz commented Apr 20, 2021

I will try that later in the day. (And also try to install the beta, I'm new to homebridge, and used the GUI to install the plugin)

thanks a lot ! :)

@Glujaz
Copy link
Author

Glujaz commented Apr 20, 2021

Ok, saw it was now the official release, so updated it quickly, activated the option, restarted homebridge, aaaaaaand.... no.

did not work as shown below.
96F20177-002A-4883-B346-1F1416C62327

it's still a single device having multiple switches. But thanks for trying so quickly! :)

@nicoduj
Copy link
Owner

nicoduj commented Apr 20, 2021

Can you share your config please (without password ;p) and logs ? You probably will have to remove the cached accessory by the way since the switch were added before on the same accessory

@Glujaz
Copy link
Author

Glujaz commented Apr 20, 2021

Ok, cleared the cache, and did the same thing. Here is mu config file :

{
    "email": "[email protected]",
    "password": "UberMegaPassword",
    "countryCode": "FR",
    "deebotNames": [
        "Hoover J. Edgar"
    ],
    "refreshTimer": 0,
    "publishBipSwitch": false,
    "publishSwitch": true,
    "publishFan": true,
    "publishMotionDetector": true,
    "publishAutoSwitch": true,
    "publishEdgeSwitch": true,
    "publishSpotSwitch": true,
    "publishCustomAreaSwitches": [
        "['(1894.0,-424.0,-491.0,2950.0)']",
        "['(1946.0,4987.0,-1002.0,2931.0)']",
        "['(1582.0,4951.0,-1198.0,6928.0)']",
        "['(-4026.0,11583.0,-1183.0,9956.0)']",
        "['(-369.0,122.0,1352.0,2268.0)']"
    ],
    "publishAreaSwitchesAsSeparateDevices": true,
    "showInfoLogs": false,
    "platform": "DeebotEcovacs"
}

And here is my log file :

[4/20/2021, 6:02:21 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[4/20/2021, 6:02:27 PM] [HB Supervisor] OS: Linux 4.19.0-16-amd64 x64
[4/20/2021, 6:02:27 PM] [HB Supervisor] Node.js v14.16.1 /usr/bin/node
[4/20/2021, 6:02:27 PM] [HB Supervisor] Homebridge Path: /usr/local/lib/node_modules/homebridge/bin/homebridge
[4/20/2021, 6:02:27 PM] [HB Supervisor] UI Path: /usr/local/lib/node_modules/homebridge-config-ui-x/dist/bin/standalone.js
[4/20/2021, 6:02:29 PM] [Homebridge UI] Homebridge Config UI X v4.41.0 is listening on :: port 8581
[4/20/2021, 6:02:29 PM] [HB Supervisor] Starting Homebridge with extra flags: -D
[4/20/2021, 6:02:29 PM] [HB Supervisor] Started Homebridge v1.3.4 with PID: 9399
Initializing HAP-NodeJS v0.9.4...
[4/20/2021, 6:02:30 PM] Loaded config.json with 0 accessories and 2 platforms.
[4/20/2021, 6:02:30 PM] Loaded 1 cached accessories from cachedAccessories.
[4/20/2021, 6:02:30 PM] ---
[4/20/2021, 6:02:31 PM] Loaded plugin: [email protected]
[4/20/2021, 6:02:31 PM] Registering platform 'homebridge-config-ui-x.config'
[4/20/2021, 6:02:31 PM] ---
[4/20/2021, 6:02:31 PM] Loaded plugin: [email protected]
[4/20/2021, 6:02:31 PM] Registering platform 'homebridge-deebotecovacs.DeebotEcovacs'
[4/20/2021, 6:02:31 PM] ---
[4/20/2021, 6:02:31 PM] Loading 2 platforms...
[4/20/2021, 6:02:31 PM] [Config] Initializing config platform...
[4/20/2021, 6:02:31 PM] [Config] Running in Service Mode
[4/20/2021, 6:02:31 PM] [DeebotEcovacs] Initializing DeebotEcovacs platform...
[4/20/2021, 6:02:31 PM] [DeebotEcovacs] INFO - API :EU/FR
[4/20/2021, 6:02:31 PM] [DeebotEcovacs] Hoover J. Edgar Got cached Accessory 45694d5b-c573-4973-9869-fa4121777b55
[4/20/2021, 6:02:31 PM] [DeebotEcovacs] DidFinishLaunching
Preparing Advertiser for 'Mac mini Server 6EC0' using bonjour-hap backend!
Setup Payload:
X-HM://00246QV5J59NH
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 433-57-751 │     
    └────────────┘     
                       
Starting to advertise 'Mac mini Server 6EC0' using bonjour-hap backend!
[4/20/2021, 6:02:31 PM] Homebridge v1.3.4 (Mac mini Server) is running on port 51380.
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - connected
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - getDeebots : [{"did":"SomeCode","name":"SomeOtherCode","class":"2pv572","resource":"yHIj","nick":"Hoover J. Edgar","company":"eco-ng","bindTs":1618507449703,"service":{"jmq":"jmq-ngiot-eu.dc.ww.ecouser.net","mqs":"api-ngiot.dc-as.ww.ecouser.net"}}]
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - stopping deebots discovery, number of deebots found : 1
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - Discovered Deebot : Hoover J. Edgar
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - Edge Cleaning for Hoover J. Edgar : false
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - Spot Cleaning for Hoover J. Edgar : false
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - SpotArea Cleaning for Hoover J. Edgar : true
[4/20/2021, 6:02:33 PM] [DeebotEcovacs] INFO - CustomArea Cleaning for Hoover J. Edgar : true
[4/20/2021, 6:02:34 PM] [DeebotEcovacs] INFO - Vacbot Hoover J. Edgar ready: "Client connected. Subscribe successful"
[4/20/2021, 6:02:34 PM] [DeebotEcovacs] INFO - Clean speed fro Hoover J. Edgar : 2 - 2
[4/20/2021, 6:02:34 PM] [DeebotEcovacs] INFO - Clean status for Hoover J. Edgar : stop
[4/20/2021, 6:02:34 PM] [DeebotEcovacs] INFO - Battery level for Hoover J. Edgar : 100 100 100
[4/20/2021, 6:02:34 PM] [DeebotEcovacs] INFO - Charge status for Hoover J. Edgar : charging false true
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getLowBatteryCharacteristic for Hoover J. Edgar
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getBatteryLevelCharacteristic for Hoover J. Edgar
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getChargingStateCharacteristic for Hoover J. Edgar
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getDeebotEcovacsOnCharacteristic for Hoover J. Edgar
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getDeebotEcovacsSpeedCharacteristic for Hoover J. Edgar
[4/20/2021, 6:02:59 PM] [DeebotEcovacs] INFO - getDeebotEcovacsOnCharacteristic for Hoover J. Edgar
[4/20/2021, 6:03:00 PM] [DeebotEcovacs] INFO - Charge status for Hoover J. Edgar : charging false true
[4/20/2021, 6:03:00 PM] [DeebotEcovacs] INFO - Clean status for Hoover J. Edgar : stop
[4/20/2021, 6:03:00 PM] [DeebotEcovacs] INFO - Charge status for Hoover J. Edgar : charging false true
[4/20/2021, 6:03:00 PM] [DeebotEcovacs] INFO - Battery level for Hoover J. Edgar : 100 100 100
[4/20/2021, 6:03:00 PM] [DeebotEcovacs] INFO - Clean status for Hoover J. Edgar : stop

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

Thanks, might have found the problem. You can test 1.4.5-beta.2 when it will be available soon.

By the way your config is not good concerning areas, you should remove parenthesis and sub arrays (was a mistake in my original readme) :

    "publishCustomAreaSwitches": [
        "1894.0,-424.0,-491.0,2950.0",
        "1946.0,4987.0,-1002.0,2931.0",
        "1582.0,4951.0,-1198.0,6928.0",
        "-4026.0,11583.0,-1183.0,9956.0",
        "-369.0,122.0,1352.0,2268.0"
    ],

@julien94800
Copy link

Bonjour Nicolas,
I just tried the new beta and still no separate accessory from my side

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

Did you remove the current accessory in cache ?

@julien94800
Copy link

Yes i did, I removed accessory from cache before restart. And I see in start log that the plugin did not found anything in cache and then create a new accessory

@julien94800
Copy link

image
image

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

Sorry, another mistake ... You can give a try to 1.4.5-beta.3 hen it will be up (need to remove cached accessory).

@julien94800
Copy link

Just tried after cleaning cache. I thought it was ok as the switch is not anymore linked to other ones... but there is no switch anymore shown now. I checked on all rooms and it seems to be not present

@julien94800
Copy link

image

@baltun2010
Copy link

Hey, I also have the same problem, there are no more switches present after cleaning the cache with the new beta 3

@julien94800
Copy link

There is a warning in log that told that the switch is removed as seen on previous snapshot. Is it normal?

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

It is not, will check (blind coding this, since I d'ont have such features, thanks for testing ;) )

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

1.4.5-beta.4 will be last try for today :) coming soon

@julien94800
Copy link

Hello Nicolas,
Just tried the last beta!
Now the switch is back! But I do not have anymore the other switches or fan!
Thanks very much for your hard work on this and support

@Glujaz
Copy link
Author

Glujaz commented Apr 21, 2021

Thanks everyone ! I couldn't imagine so much people would be interested in that feature... sorry @nicoduj ! 😇

thank you very much for your hard work ! :)

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

Okay, will check asap :) Interested in the log if possible ;p

@baltun2010
Copy link

The last beta worked for me after cleaning the cache twice! Now the switches are separated and I can move them in the rooms! Thank you very much, this literally was the only thing I missed so much, great work!

@Glujaz
Copy link
Author

Glujaz commented Apr 21, 2021

Oh ! Will do the update now to check then !

@julien94800
Copy link

image

@julien94800
Copy link

image

In the cache I now see two lines. Will try to remove both lines and try again as it seems to work for others. Currently only clean cache once

@nicoduj
Copy link
Owner

nicoduj commented Apr 21, 2021

concerning the cache, if you want to clear it, don't use my option but the option in config-ui-X in latest homebridge.
If you use my option, you must put it to true while it is "up" and restart, and then put it back to false I think

@julien94800
Copy link

Hello again,
So I confirm that after a second cache cleaning it's now ok! I performed all the clean cache accessory from the UI and did not used your option for this!
I will try to add some more area now and see if everything works fine.
Merci beaucoup Nicolas!!

@Glujaz
Copy link
Author

Glujaz commented Apr 21, 2021

On my side, it's not working. I do have separate switches now, but they are not doing anything...
The switch stays on, but nothing happens, and the ecovacs app does nothing too.

moreover, on the 4 custom area zones I made, the last one is not controllable. HomeKit says that the device is not compatible.

you will find attached my logs, and some home app screenshots!
6876DD65-0076-4B28-B5A0-BB627B62BE84
4C5EA80F-9D56-45C7-A1F3-D35B44E55920
6D9AF255-111F-4295-AA29-7463571815AB
F8C60F88-D6C4-46A9-8527-A2B316B5D0A8

For information, I did multiple cache cleaning.

@julien94800
Copy link

Ah strange. I tried again right now and everything working for me. I had same error in log during first tests, but after a second clean cache the error disappeared and everything was fine. When you do clean cache, do you remove all Deebot accessories?

@julien94800
Copy link

I tried to restart homebridge and I now get the error too.... so that means that it works only once, but after no way to restart homebridge
image

@julien94800
Copy link

I only removed the spot switch from cache and restart homebridge. Now it works again. So if I'm correct, once you get the switch, then you cannot restart homebridge without deleting the switch from cache

@nicoduj
Copy link
Owner

nicoduj commented Apr 22, 2021

HI, 1.4.5-beta.5 on its way to try to fix this, sorry guys !

@julien94800
Copy link

Hello,
No problem, thanks very much for your support, reactivity and awesome work on all your plugins!!
New beta installed right now, without clean cache and working as expected after homebridge restart. So I assume that the problem is gone. Will try later to add more switches (only one currently) to check that it works too in this case!
Thanks again

@nicoduj
Copy link
Owner

nicoduj commented Apr 22, 2021

Great ;) Will stay in beta until underlying lib goes final however, but doesn't change anything in the end ;)

@Glujaz
Copy link
Author

Glujaz commented Apr 22, 2021

Works for me too !!!

thanks very much ! You help was really great, and enjoyed! 😁

will try later more insistence with some reboots of homebridge. For now, I have 4 custom area switches, and tried the last one, which works !

@mrbungle64
Copy link
Contributor

Great ;) Will stay in beta until underlying lib goes final however, but doesn't change anything in the end ;)

@nicoduj
I just published version 0.6.0 on npm

@tteuer
Copy link
Contributor

tteuer commented Apr 23, 2021

First, thanks for all the awesome work you've done on this project @nicoduj and for the underlying libraries @mrbungle64!

Forgive me if this is answered somewhere, but I haven't been able to find it in my search: How do you know which spot areas on the map correspond to which area in your house on the map? Trial and error? My logs show that the plugin finds SpotAreas 0-9, but I am not sure how to match these to a particular area in my house.

@julien94800
Copy link

Hello,
I get two ways doing this
First, in the Deebot app you can see tag on areas, and if you do not put specific icons on it, you will see letters. Then A is the first one, B the second and so on...
Second option (newer and better), if you activate the option in this plugin to get printed all informations, you can find in logs one section by area with name (corresponding to specific icons selected in the app) and area number.
I hope my explanations are clear enough, if not feel free to comment and I will try to explain in an different way

@nicoduj nicoduj modified the milestones: 1.5.0, 1.4.5 Apr 24, 2021
@nicoduj nicoduj closed this as completed Apr 24, 2021
@tteuer
Copy link
Contributor

tteuer commented Apr 25, 2021

Hello,
I get two ways doing this
First, in the Deebot app you can see tag on areas, and if you do not put specific icons on it, you will see letters. Then A is the first one, B the second and so on...
Second option (newer and better), if you activate the option in this plugin to get printed all informations, you can find in logs one section by area with name (corresponding to specific icons selected in the app) and area number.
I hope my explanations are clear enough, if not feel free to comment and I will try to explain in an different way

Thanks for your explanation! I do not see anything you're referencing within the Ecovacs Home app... I see what you're referencing as an option on the older Ecovacs software, but I'm thinking they may have removed it from Ecovacs Home? All I have are checkmarks and I have never seen any option to label rooms.
IMG_7534

@mrbungle64
Copy link
Contributor

Hello,
I get two ways doing this
First, in the Deebot app you can see tag on areas, and if you do not put specific icons on it, you will see letters. Then A is the first one, B the second and so on...
Second option (newer and better), if you activate the option in this plugin to get printed all informations, you can find in logs one section by area with name (corresponding to specific icons selected in the app) and area number.
I hope my explanations are clear enough, if not feel free to comment and I will try to explain in an different way

Thanks for your explanation! I do not see anything you're referencing within the Ecovacs Home app... I see what you're referencing as an option on the older Ecovacs software, but I'm thinking they may have removed it from Ecovacs Home? All I have are checkmarks and I have never seen any option to label rooms.

@tteuer
Unfortunately, what he described is not possible with a Deebot 900.
Here's what you can do, though:
https://github.com/mrbungle64/ecovacs-deebot.js/wiki/SpotArea#retrieve-current-spot-area-from-log-output-while-cleaning

@tteuer
Copy link
Contributor

tteuer commented Apr 25, 2021

Hello,
I get two ways doing this
First, in the Deebot app you can see tag on areas, and if you do not put specific icons on it, you will see letters. Then A is the first one, B the second and so on...
Second option (newer and better), if you activate the option in this plugin to get printed all informations, you can find in logs one section by area with name (corresponding to specific icons selected in the app) and area number.
I hope my explanations are clear enough, if not feel free to comment and I will try to explain in an different way

Thanks for your explanation! I do not see anything you're referencing within the Ecovacs Home app... I see what you're referencing as an option on the older Ecovacs software, but I'm thinking they may have removed it from Ecovacs Home? All I have are checkmarks and I have never seen any option to label rooms.

@tteuer
Unfortunately, what he described is not possible with a Deebot 900.
Here's what you can do, though:
https://github.com/mrbungle64/ecovacs-deebot.js/wiki/SpotArea#retrieve-current-spot-area-from-log-output-while-cleaning

Ahh okay, thank you for clarifying. I'm glad to know I wasn't missing anything obvious.

Thank's for the link to how to retrieve the current spot area status as well -- that's exactly what I was looking for!

@julien94800
Copy link

Hello
Sorry @tteuer, I did not think about different models and so different behaviour in the app...

@mrbungle64 thanks very much for your better solution. Your tool seems to have lot of great options! I never took time trying to install it, and as I'm running most thing on a Synology docker I'm afraid it could be complex for me. But I definitely should try sometime.
Thanks for your great work and support!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants