arendst / Tasmota

Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at
https://tasmota.github.io/docs
GNU General Public License v3.0
21.77k stars 4.73k forks source link

filter out scanned/connected BT sensors #9750

Closed martinlindjarv closed 3 years ago

martinlindjarv commented 3 years ago

Have you looked for this feature in other issues and in the docs?
Yes, the future i'd like is partly like NRFIgnore (it would be one half) and the second part is limiting BT sensors per tasmota device. Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. No it's not related to any problem.

Describe the solution you'd like
A clear and concise description of what you want to happen. I'd like to have some kind on string or parameter (which should be driveable trough mqtt) where i can specify mac addresses to scan / monitor. Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Additional context
Add any other context or screenshots about the feature request here. The problem arises when there's small house but big enough for one collector to lose connectivity. I'd like to have two collectors - one for each floor. At the moment bot collectors connect to both floors sensors and drain battery due to bad connection. (Please, remember to close the issue when the problem has been addressed)

Staars commented 3 years ago

Yes, that makes sense.

I have already thought about it, but never had the perfect idea so far.

It would probably be possible to extend the -ignore and -use command to work with MAC addresses, like that: Nrfignore x - like before, ignore a type Nrfignore aabbccddeeff or aa:bb:cc:dd:ee:dd:ff - ignore device with MAC

Do you mean something like that?

martinlindjarv commented 3 years ago

At first i was thinking that some group of sensors (like nrfingnore now) might be excluded. But idea about excluding mac addresses would be even better. Maybe it can be json of different mac addresses?

Staars commented 3 years ago

Before I begin with the „wrong“ driver: Which device do you use? (I assume it would make sense to implement this for all 3 drivers at the end)

martinlindjarv commented 3 years ago

At the moment i'm having two different devices - MiFlora and LYWSD03MMC. And i'd actually would like to exclude mifloga devices and use only LYWSD03MMC. But it would be excellent if i could use some mifloras on one "collector" and others on other.

Staars commented 3 years ago

😁 No, I mean your bluetooth device (HM-1x, ESP32 or NRF24)?

martinlindjarv commented 3 years ago

oh :) esp32 :)

Staars commented 3 years ago

I finally have started with it. So your suggestion is a JSON like this(?): MI32Ignore {"0": ["AA:BB:CC:DD:EE:FF", "FF:EE:DD:CC:BB:AA"]}

At least https://jsonlint.com wants a leading string before the array for a valid JSON.

The simple approach would be (similar to other commands) like I wrote above: MI32Ignore AA:BB:CC:DD:EE:FF

martinlindjarv commented 3 years ago

Can simple approach have multiple mac addresses or just one ? In my opinion one address at a time would be sufficient but only one wouldn't work - that's why i suggested josn. If multiple mac addresses can be added without json - one at a time - i think would be ok.

And afterward's it would be excellent to get the list of ignored mac's on specific device as well...

Staars commented 3 years ago

You can chain as many commands in a rule with BACKLOG as there is space in (a specific part of the) memory, which is constrained for a JSON too. And yes, there will be a list output to the console, like that:

17:44:13 CMD: mi32ignore
17:44:13 11:22:33:44:55:66
17:44:13 11:22:33:11:22:33
martinlindjarv commented 3 years ago

But will the list be available over mqtt as well? So one could use home automation to drive what collector collects what ... and don't need to log into collector directly?

Staars commented 3 years ago

Yes, this is the plan.

github-actions[bot] commented 3 years ago

This issue has been automatically marked as stale because it hasn't any activity in last few weeks. It will be closed if no further activity occurs. Thank you for your contributions.

github-actions[bot] commented 3 years ago

This issue was automatically closed because of being stale. Feel free to open a new one if you still experience this problem.