afuerhoff / ioBroker.fb-checkpresence

The adapter checks the presence of family members over the fritzbox. Also you can have a list of all devices in the Fritzbox. Unknown devices are reported in the blacklist.
MIT License
23 stars 7 forks source link

Log getting spammed with newActive messages every other minute (v. 1.1.5) #56

Open MojitoJoe1813 opened 3 years ago

MojitoJoe1813 commented 3 years ago

Not sure if this behaviour is intended, a bug or just me lacking information:

My iobroker log is getting spammed by "newActive xxx false" and "newActive xxx true" messages every other minute and for each family-member.

fb-checkpresence.0 | 2021-06-14 11:19:52.740 | info | newActive U true fb-checkpresence.0 | 2021-06-14 11:19:52.679 | info | newActive C true fb-checkpresence.0 | 2021-06-14 11:19:42.028 | info | newActive U false fb-checkpresence.0 | 2021-06-14 11:19:41.967 | info | newActive C false fb-checkpresence.0 | 2021-06-14 11:18:58.665 | info | newActive U true fb-checkpresence.0 | 2021-06-14 11:18:58.602 | info | newActive C true fb-checkpresence.0 | 2021-06-14 11:18:47.896 | info | newActive U false fb-checkpresence.0 | 2021-06-14 11:18:47.832 | info | newActive C false

I don't get what that message is trying to tell (might be useful on debug-loglevel for some but info?) and didn't find any documentation about it. And then I simply don't see a value and consider it as spam in my log. Can I switch that off or reduce the spam by that message in my log?

afuerhoff commented 3 years ago

The message is an info when a presence change occurs for a family member. When this is to often, you should think about if your WiFi connection is good enough. I have had the same in my installation with a WiFi access point. It was not placed good enough so my daughters cell phone toggles every few minutes.

MojitoJoe1813 commented 3 years ago

@afuerhoff It is hardly about "too often". There is simply no "presence change", not even any move of the devices. I do have four floors in my house, in the basement and on the first floor I do have a FritzBox 6490 each, ground floor does have a repeater , there is a another powerline-WiFi-repeater (of AVM) mainly for the garden available as well. All of this is setup as a Mesh-Network. Signal strength is roughly between -40 to -60db in my office (where my phone usually is the whole day) and which is ground floor next to the room with the repeater. I hardly expect having a "bad WiFi" as nothing is or ever was indicating this. While writing this I do have 23 devices with an active WiFi connection in my network, six of them using the 5GHz network (my phone/device included in the latter). I can see this happening to the same extend to a Xiaomi Mi 10T Pro as well as to a Samsung S10. First is using the 5GHz network, the second one the 2,4GHz network.

I tested it this afternoon by putting my phone next to the router (1m). The same message flooded the log frequently several times per hour. I switched off preferences on my device like switching dynamically to mobile network (in case it is considered being stronger, switched off the battery saver for network connection etc.). I'm not judging this to be an error - I simply don't know. It might be a device-issues or an issue happening on every FritzBox. But it is just simply too often and following a pattern which indicates no one-time-external influence. So it seems out of my control.

However, I would still consider this issue as something - from my point of view - too unstable/unreliable (or too complex to set up properly) for the use case of indicating presence in a smart home environment.

Of course I could try working around this, but I guess that is not what was intended, so I reported it.

Edit: While writing this (on my desktop) and having the phone still next to the router it occurred again:

fb-checkpresence.0 2021-06-15 16:16:35.963 info newActive U true
fb-checkpresence.0 2021-06-15 16:16:24.875 info newActive U false
afuerhoff commented 3 years ago
  1. Could you please check the Fritzbox device list to see whether the status changes from active to inactive. If this is the case, it is due to the Fritzbox or the network. As I said, I had the same case and there was the repeater on the other side of the wall and my daughter's iPhone kept disconnecting. At the moment you are the only one who is reporting this issue and I cannot recreate the problem.

  2. It could be also a problem, that mac-spoofing is enabled in the phone. Then the mac address and ip changes in the fritzbox and the adapter could not get the correct status of the device. Mac spoofing can be disabled in the phone or you have to use the hostname in the family member configuration. Then the adapter get the information over the hostname and not over ip or mac.

For further investigations I need following:

  1. Could you provide the family member configuration from one of the effected cell phones.

  2. Could you provide a picture from the object data of the cell phone in 3.

  3. Could you provide the log (in log level debug) from start to the point where the message occurs.

MojitoJoe1813 commented 3 years ago
  1. The moment this happened, the phones weren't listed in the fritzbox connected devices list. Suspicious is that it happens ALWAYS to both devices SIMULTANEOUSLY and while both were connected to a DIFFERENT mesh device in the network (mine to the repeater next room, the one of my girlfriend to the second router acting as a mesh repeater near the stairs a floor below).
  2. I checked mac randomization and it was disabled on my phone already. However, I also changed the family member configuration to use the Hostname. The log below shows it didn't improved.
  3. obfuscated: image
  4. obfuscated (including objects from previous family member configuration, I guess): image
  5. see fb-checkpresence.log (IPs and names obfuscated)
afuerhoff commented 3 years ago

It seems that the problem is, that the devices in the fritzbox are loosing periodicly the connection as you mentioned in the first statement. Hope I understand this correctly. You should check this.

afuerhoff commented 2 years ago

Hello, is the problem still existent?

MojitoJoe1813 commented 2 years ago

Need to check, not sure whether I have the adapter still running. With that behaviour it was useless back then. Give me some days and I'll check.