[SOLVED] Network Binding experiencing issues today

Hi there,

I have openhab 2.5.2-1, and Network Binding was working wituout any issues. Last week I realized that on the middle of the night, the presence was not detected and after 10 minutes was recovered.
But today, it is not working well. I got several disonections, below the logs:

I have a Samsung Galaxy S9+ updated last version.

It is wuite annoying when I am homeoffice and everything turn off because the system detects that I am out, when it is not.

And even if I receive a notification from whatever in the phone (message, whassapp, telegram…) the Binding does not detect the phone. Only when I unlock the screen, the binding detect it.

2020-04-21 08:42:42.595 [vent.ItemStateChangedEvent] - phone changed from ON to OFF

2020-04-21 08:42:42.599 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone

2020-04-21 08:52:17.203 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 08:52:17.211 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone

2020-04-21 08:58:37.677 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone
2020-04-21 08:58:37.681 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 09:00:40.885 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 09:00:40.888 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone
2020-04-21 09:04:56.612 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 09:04:56.618 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone
2020-04-21 12:49:13.519 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 12:49:13.522 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone
2020-04-21 13:06:46.929 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 13:06:46.933 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone
2020-04-21 13:12:03.344 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 13:12:03.348 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone
2020-04-21 13:25:27.408 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 13:25:27.413 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone
2020-04-21 14:22:14.481 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 14:22:14.485 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone
2020-04-21 14:27:29.650 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone
2020-04-21 14:27:29.657 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 14:28:29.884 [vent.ItemStateChangedEvent] - phone changed from OFF to ON
2020-04-21 14:28:29.888 [GroupItemStateChangedEvent] - gPresence changed from OFF to ON through phone
2020-04-21 14:34:46.212 [vent.ItemStateChangedEvent] - phone changed from ON to OFF
2020-04-21 14:34:46.217 [GroupItemStateChangedEvent] - gPresence changed from ON to OFF through phone

You are neither telling what experiments you did to the setup nor are you telling how the originally ( working 100%??) setup is/was.
How are we supposed to know, only you know what changes have been made to the setup of openHAB, the network binding (using arping? How?) your network (WiFi, router, etc…) and your phone.

Many people think the volunteers here enjoy a stupid guessing game. :astonished: :confounded: :tired_face:

There have not been any changes.

I installed the Openhab 2.5, almost 2 months ago, everything was fine, and today the Binding does not detect the phone. It is simple, I cannot explain anything else because I have not worked with the system since I installed the version 2.5 2 months ago. And less the network binding. I had a lot of issues 2 years ago with the Network Binding, which I got solved and now I try to avoid touching anything like Network Binding and presence because it seems unstable.

What I epxeriment: Continuisly disconection of my phone (I posted the log above). Network binding does not detect my phone. I use same IP, same phone, same setup like 2 years ago. I just update the Openhab to 2.5 2 months ago the binding worked fine aftherthat, and today not. It is simply, I have not done anything on the system.

If I am touching anything of the System I tell you: Hey I am uninstalling and installing this and this, or I have removed this, and I get this error whatever…

If I post something is because it is not stable when I expected. So maybe we have to play to guess, also me, yes.

This kind of thing at the end, encourage me to move to a another system., and give up Openhab, to be honest. I have a very simple system, and all of a sudden Network binding stops working as usually. Let’s play to guess, yes. Maybe you think that I love to bother from time to time.

Thanks for the support.

OK, forget this post. I will solve by my own, uninstalling and installing binding, cleaning cache, restarting system and so on. If it does not work, I will move definitively to another System. It is a waste of time to mantain the system every 2 or 3 months because something is not stable even when I am not touching anything.

When did you update your Galaxy?

1 Like

Good luck with that. Many of us moved here from other systems such as Home Assistant that are more “user friendly” but extremely unstable.

If you’ve not changed anything on OH, have you changed anything on your phone? As rossko57 asks, when did you update it? Did the problem appear after updating the phone?

How about your home network, maybe it was experiencing interference or some other intermittent problem. From a computer try pinging your phone. Does it seem to get a nice steady set of replies when the Network binding is flapping between ON and OFF?

Something changed in your environment and openHAB is not the only thing that could have changed to cause this problem. If you’ve done nothing to it than the likely cause is outside of openHAB. The Network binding itself is really simple. It just pings an address and if it gets a response it sets the Switch to ON. If it times out it sets the switch to OFF. Or it uses arping to do the same thing. There really isn’t a whole lot there that would be unstable. And given that the Network binding is one of the most used bindings in all of openHAB and this is the very first post describing this particular problem, I would look for other potential causes for the problem:

  • something changed on the phone after that update that changes how it responds to pings
  • something is going on with your network

This very much points to a recent update on the phone has changed how it responds to pings.

2 Likes

I cannot explain what is happening exactly because suddenly happened. The Galaxy OS was updated 2nd April but I never had this issues like today before in front of my face. I have been working in homeoffice for 3 weeks and I use several computers and never happened until today.

I have restarted 3 times the OH, clean cache, uninstall and install the Thing of my phone…, and now is not experimenting these issues like this morning, now the OH stay stable, and report that the phone is connected without any disconnection untill next time.

All my devices, computer and phones in my network have fix IP and I did not have new devices this morning in my network. I have the same devices and setup like yesterday and the day before, so there is no reason to have this behaviour without changing something on the setup.

So far, the issue is solved until next time it happened. Sorry but I cannot provide more info. I can provide you my setup, which is the same setup than last weeks and I did not touch anything in the Configuration and no new devices in my network.

Make sense, but why today and not yesterday or last week or just after update the new OS ? So now you can understand my feeling, when I do not have any clue about the issue if I did not touch anything on the setup and the update of the OS was 20 days before.

I do not know if the issue has been solved or not, but now is working fine.

It could also be a loading, routing or other network issue with your cell phone provider?

I had a similar issue after my phone updated from Android 8 to Android 9. Didn’t realize the presence detection was faulty immediately, only a while later. I could narrow it down to the OS upgrade and the change in power savings options.

That’s why we need more information. And do you know that it just started today and that it hasn’t been periodically doing this for quite some time?

As I also said, it could also be issues with your overall network. Maybe a neighbor got a new WiFi AP which interferes with yours. Who knows. But the simple facts are:

  • the Network binding has not changed since you installed OH 2.5 two months ago. In fact I’m not sure anything has changed in the Network binding since OH 2.4. So the code hasn’t changed.

  • all the binding does is ping or arping, there isn’t likely anything that can be unstable or go wrong there beyond it always works right or it never works right.

  • you assert you’ve not changed anything with the OH configuration.

All I can conclude is the root cause is therefore outside of OH.

My best recommendations are:

  • when/if it happens again, try pinging and arpinging the phone from one of your other computers and see if the phone is responding properly or not
  • if you are not using arping, you may have to now, try configuring it and playing with the settings until you get reliable status

But when you are dealing with networking, there is no such thing as everything remaining untouched. There are so many variables outside of your control and so many things between OH and your phone that can cause this behavior. Like the example I gave above, a neighbor can have installed an AP that’s using the same channels as your AP which is causing high latency or poor connectivity on your side which is just bad enough to cause the pings to time out. You’ve not changed anything but something changed.

1 Like

You used this word in the title as well, reading both it sounds to me as if you really wanted to say experiencing. Reading your OP that way you did NOT do any experiments, sorry for the missunderstanding.

1 Like

I cannot answer this question 100% because I did not realised about this before. Usually 5 minutes after I am gone, lights, heating and my whole studio (monitors, leds …) turn off (Timer of 5 minutes after phone is OFF). I have been working at home fro 3 weeks and I did not experiencing this issue, otherwise my monitors would have gone off automatically. I can tell you that improving some rules 2 o 3 weeks ago I realised only through the log a puntual disconnection of my phone, but after a few minutes was connected again and I did not even realised because of the Timer that I mentioned before.

I know that you need all information but I am not able to consider all possible variables (external factors like if my neighbours has changed the wifi) when I open a Post. I am not tester and my way of thinking is from a user, not from a Tester. I never would have thought about external factors.

Mainly, I had this issue only today morning. Today was crazy. Of course I could not imagine that interference in the wifi signal might affect so much to the phone when the router is 4 meters and I made sure that the IP was linked to the router even when the OH did not detect the phone.

Thanks for the feedback. I see you are a Master in English. Your contribution to the Post was totally productive. Congrats and thanks too.

Thank you for your conclusion. I do not know if it was external factors but I am fully sure, that it has not been because I have changes something on the setup, so maybe it is router, external factor or since I updated the OS Galaxy is doing strange things, and I must change the binding setup a little bit. You know the System pretty well and better than the users. Thank you for your conclusions.

Regards and have a nice week.