-
-
Notifications
You must be signed in to change notification settings - Fork 24
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
PoC area mapping #415
base: main
Are you sure you want to change the base?
PoC area mapping #415
Conversation
Hey @timon37 I went to give this a try and got the following logs:
After fixing that with just an if statement that sets it to 0, I get another error:
I am trying to run it along side my existing bermuda, so perhaps that is causing problems. Happy to try it out, but seems like there are a number of roadblocks. |
Running alongside vanilla bermuda shouldn't be a problem, that's what I do locally. I did manage to repro the first issue but couldn't repro the second:( Nevertheless added a check for both, so if you feel like it you can try again. I understand both of these hit before you tried to configure anything? (other than adding the integration) |
I'm unable to configure a device at all - i haven't really gone into your code to figure out why. But I'd recommend removing Permuda entirely, and seeing if you are able to setup from a clean slate |
Yeah that's what I did. Which version of hass and bermuda do you have? Unfortunately I'll be out for the rest of the week, and I'm going to fosdem the weekend after that, so I won't have much time the next two weeks. |
As mentioned in #402 this is just to show the concept and allow anyone to test it, and not an actual "pull request".
The extension is renamed to 'Permuda' and all entities are prefixed with 'permuda' so that it can be used besides Bermuda and shouldn't conflict with it.
To test it just copy/link the 'custom_components/bermuda' folder as e.g. /var/lib/hass/custom_components/permuda then add the integration in home-assistant.
Currently I don't do any beacon power compensation, although the original code does and that might still work, I haven't tested it because I only have one...
So I'd recommend adding and callibrating only with one device at first, it has to be something that advertises continuously preferably quite often (e.g. 3 times per-second).
First just select it in "Configure / Select Devices" like in Bermuda.
To map an area:
a. preferably naturaly pretending to do things you'd normally be doing
b. you can click refresh to see how many points were captured
c. note abort doesn't work atm... so don't accidentally walk into another area...
You can clear specific areas or the whole mapping in "Configure / Calibration 1: Map Management".
Note that the area and some debug values are exposed as new entities "sensor.permuda_ Area" so you'd have to rename it or change your automations to actually use this instead of regular Bermuda.
Instead (at least initially) I'd recommend just opening the device and you'll see both the Bermuda and Permuda entities listed, there you can observe whether the Area changes differently and whether it's actually better or worse and where.
At the moment areas extend past their gathered points, so don't be surprised that you're likely mapped to (sometimes weird) areas when you're in a not-yet-mapped location.
You can try to limit that by mapping additional areas like "garden" or "elsewhere".
In tools there's a grah.py for visualizing the gathered points and tuning heuristics.
Just click "Download diagnostics" under the 3 dots next to "Configure", and run it: ./graph.py /path/to/diagnostics.json
Don't hesitate to ask questions or hack anything in the code, there's a bunch of tunables and alternative code that isn't exposed in the config yet.
Besides that I'd really like to see someone else's diagnostic.json file with a bunch of areas mapped!