-
Notifications
You must be signed in to change notification settings - Fork 32
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
white list not working #30
Comments
I agree, i would appreciate an example from someone of a working whitelist format. So i can stop adding so many garbage devices. |
did you ever figure this out, because im reading my electric and gas meters with this but am also getting others, would like to filter out just my 2 meters. What id is this looking for? |
I still can not get the white list to work. I tried the example given, but it still reads all |
I got mine working, can you paste a copy of your Mqtt data coming over and I might be able to help you locate your id. |
It reads all in th log or they end up in Home Assistant? It is going to read all of it in the log. I guess we could filter those out. |
Think I found a bug. Trying to squash it now. |
Thanks all for helping with this. I will get a copy of my log files. On a side note, This is so bulletproof that I have abandoned my other zigbee temp / humidity sensors because this is so reliable compared to them. The only problem I ever have is when the batteries die in my sensors. Thanks again! Awesome. |
Here is how i have mine configured which is now working flawlessly at only sending over data to HA of my gas and electric meters only..... ::::::::Starting RTL_433 with parameters:::::::: For Device Id:39059630 its receiving the message but but publishing it to HA hope this helps a little. |
I still don't get the whitelist working Received message: rtl_433/events : {"time": "2023-02-06 07:41:10-0800", "protocol": 40, "model": "Acurite-Tower", "id": 1946, "channel": "A", "battery_ok": 1, "temperature_F": 72.14, "humidity": 40, "mic": "CHECKSUM", "mod": "ASK", "freq": 433.94515, "rssi": -0.118229, "snr": 24.17268, "noise": -24.2909} I am going to assume my ID for this is 1946. I have entered all of those in the whitelist with spaces between them, and other devices keep getting picked up. It is a PITA to have to keep cleaning up the created devices. |
Yeah, the SDR to MQTT isn't respecting the whitelist. I haven't had a chance to get it all fixed. |
I know beggars can't be choosers, but this causes a huge knock on effect of adding so many entities that it crashes Node-Red due to so many entities in the system. So every like 3 months i have to delete like 2000 devices. Thanks for all the work so far. |
Yeah, I get it. I've been working on updates to both versions. Hoping to have those up there this week. I need to do some more testing to make sure I don't make things worse. |
Beta is a great idea. Would love to help test and provide feedback. I have 42 sensors. Thanks for all the work. A |
Ok, I pushed an update. Lots of changes that Ive been working on and testing with my setup. Finger crossed nothing breaks. I tried to clean up the whitelist logic. And I tested it on a new system and MQTT server. It appears to work at least in terms of Home Assistant. When whitelist is on, it reports in the log that it received data from a device, but didn't send it to Home Assistant. No new devices were created in home assistant that were not in the whitelist. But those devices do still end up in the MQTT server since that is done by the rtl_433 program I am using. If we want to prevent those entities from making it to the MQTT server then I will need to write a wrapper for the RTL_433 program and handle the sending to MQTT part. |
Awesome, thank you i will try it out. I don't know that i care about it going through MQTT, i already have lots of traffic there that i ignore. More of an issue with entity creation in my mind. Thank you for being response and the work you have put in. |
Ok, I think the whitelist problem is not going to be fixed by anything I added...or at least once the device has been pushed to the home assistant topic in the mqtt server it's there. From that point on, unless it is removed from the home assistant topic, and removed from HA it will continue to get updates even after the whitelist has been enabled. Because the whitelist only prevents auto discovery from happening. So I need to rethink the whitelist setup. |
The problem I was having was I initially did the setup without a whitelist, mqtt_retain ON, and with expire_after set to 0. Over year running I had a collection of about 100 weather devices from neighbors etc. I whitelisted my devices and then deleted them in HomeAssistant but they started to come back since I was running with mqtt_retain turned on. The steps I used to clear these out and keep them from coming back...
In the example, if you want to delete ALL devices below Acurite-6054M select Acurite-6054M. If you just want to delete a specific device e.g. 120, select 120. In my screenshot, 120 was actually the device I needed to keep, so I had to manually select and delete about 10 others.
|
So are you saying the whitelist works in that setup? I believe the developer doesn't think the whitelist function works. |
Yes - whitelisting works. Its just does not solve the problem of once a device is identified and gets into HA, adding your desired devices to the whitelist does not automatically remove the others. For example, A neighbor has a Acurite 606 temp sensor. My radio is detecting it and the add-in sees it, but because the device ID (112) is not in my whitelist, its not passing that in via MQTT so its not being re-added back into my HA devices. From my add-in's log I see the devices its finding but ignoring (but also letting me know in case I missed one in the whitelist):
I think what Jeff meant about "not working" was his code change was not going to be able to auto-remove the already added devices. @thejeffreystone what I'd suggest is to have people start with whitelisting enabled and a blank list. Then watch logs and see what devices are found. Maybe you could add a toggle in the config that when enabled, would add some output from of the device's measurement data on the line in the log, like the temperature, or battery, or RSSI to help people determine which device is theirs and they want to be added to the whitelist. e.g.
The 855 is my device; 112 is not. I know my device is an Acurite-5n1. If there were multiple of the same detected because a neighbor had one, knowing the temp etc. its sending to compare to the Acurite display can help know which to use/keep. |
I have all of my sensors spelled out manually in an mqtt.yaml file because i was try to stop this. I have every one of those sensors in my whitelist in this addon. Yet i keep getting new devices added. I have stopped the addon, and wiped every one of the sensors with Mqtt explorer. Since my sensors are hardcoded, is there a reason i cant just delete everyone of these devices from Home Assistant? Mine will get readded as sensors the second i reenable the addon. I have the whitelist fully enabled with every sensor listed, this should work, correct? |
Could you post a screenshot of your add-in config? That might help. The lower half of mine is posted below as an example if that helps you troubleshoot. I'm not sure about the relationship of your hard coded mqtt entities and the deletion of them all (I assume you mean via using the HA UI); I assume they would come back, but you should make sure to do a full backup before you try it just in case. Hard coding the sensors would not have any effect to stop the creation of the other entities by the add-in; hard coding is basically just saving the add-in a step. You should not have to hard code them since the add-in would create them dynamically as they are detected. The whitelist tells the add-in to only try and create (and send MQTT updates) for devices that match those included in the whitelist . ALSO - When I was taking a screenshot I noticed that there is auto_discovery toggle. The add-in's info page does not say what this is for, but I assume it is intended to enable or disable mqtt auto-creation of entities. If you turn that off, maybe it will not auto-create any entities - in that case you would have to hard code the entities as you describe. You'd have to wait for Jeffrey to provide some input on that to confirm for sure. |
p.s. On my whitelist, the items like 0d495c and 8550d495c are for soil moisture sensors (non-accurite) but the add-in is detecting them nicely when I added the appropriate protocol codes. The accurite IDs are 855 26 and 120 |
Yeah, so the whitelist still isn't working. I purged all the sensors that had been detected and added, about 600 that were trash. Attached is my config. Yeah my sensors are perm mapped so this had no effect on them. I know i don't have to hard code them, i just get tired of removing sensors, so i generally turn off auto discovery. |
Yeah, I haven't figured out the whitelist yet. It seems to act a bit weird. |
I have enabled the whitelist and added one id. it still finds 30 other devices over a week.
Thanks in advance, I'm sure I am missing something simple.
The text was updated successfully, but these errors were encountered: