Can´t connect to pi after installing Hue binding

Hey!

So I´m new to Openhab and was following some Tutorials on Youtube/from here. They basically say to install openhabian on sd card and to update/upgrade as a first step. Then to go on further.
So it worked normal, this means ssh login, editing files in vscode, paperui in browser and so on.
But it seems like installing the Hue binding messes up everything every time…
So here is basically what i did:

-download latest img for raspberry(3 model b) and write it to an sd card with etcher
-edit config file for wlan
-start pi
-login via ssh, “openhabian-config” -> update&upgrade
-restart
-open my.local.ip:8080 and install standart
-open paperui and install hue binding
-it gets recognized, so i add it to things and push hue button to initiate
-hue bridge is online and lists bulbs
-after some secounds i cannot reach pi anymore

When i restart my pi (unplug power) i can cummunicate to it(paperui,log viewer,ssh) for some secounds and then it´s offline again. In the logviewer it says the bridge is
“ONLINE to OFFLINE: Hue bridge connection lost
OFFLINE: Hue bridge connection lost. to ONLINE”
about 20 times a second.

Here is what i tried:
Different sd card, redownload openhabian, wired connection(so no wlan setup), different cable for hue bridge

Any suggestions?

Welcome to the openHAB Community @alex_91 :heart:

This sound very odd.
Can you provide the openhab.log when this happens?

Did you try to attach a monitor and observe whats happening?

Yeah i have a monitor attached. Had some problems with dchpcd, when i configured wifi settings via openhabian.config, that´s why i cofig it before starting.
There were no errors on first boot, update/upgrade and now nothing while booting. Is there any option to monitor services? Like task manager or anything like that?

You mean the log is get from “tail -f /var/log/openhab2/openhab.log /var/log/openhab2/events.log”?
Log:

==> /var/log/openhab2/openhab.log <==
2020-02-25 13:26:04.450 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.54:8443
2020-02-25 13:26:05.574 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-02-25 13:26:05.756 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-02-25 13:26:05.953 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui
2020-02-25 13:50:36.480 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-02-25 13:50:39.426 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.54:8080
2020-02-25 13:50:39.433 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.54:8443
2020-02-25 13:50:40.562 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-02-25 13:50:40.738 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-02-25 13:50:40.941 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

==> /var/log/openhab2/events.log <==
2020-02-25 13:45:22.121 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from OFFLINE: Hue bridge connection lost. to ONLINE
2020-02-25 13:45:27.124 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from ONLINE to OFFLINE: Hue bridge connection lost.
2020-02-25 13:45:27.630 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from OFFLINE: Hue bridge connection lost. to ONLINE
2020-02-25 13:45:32.636 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from ONLINE to OFFLINE: Hue bridge connection lost.
2020-02-25 13:45:32.646 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from OFFLINE: Hue bridge connection lost. to ONLINE
2020-02-25 13:45:37.651 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from ONLINE to OFFLINE: Hue bridge connection lost.
2020-02-25 13:45:37.663 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from OFFLINE: Hue bridge connection lost. to ONLINE
2020-02-25 13:50:42.879 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from UNINITIALIZED to INITIALIZING
2020-02-25 13:50:44.574 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from INITIALIZING to ONLINE

==> /var/log/openhab2/openhab.log <==
2020-02-25 13:52:32.480 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007
2020-02-25 13:52:35.200 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.0.54:8080
2020-02-25 13:52:35.208 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.0.54:8443
2020-02-25 13:52:36.381 [INFO ] [panel.internal.HABPanelDashboardTile] - Started HABPanel at /habpanel
2020-02-25 13:52:36.547 [INFO ] [ebuilder.internal.HomeBuilderServlet] - Started Home Builder at /homebuilder
2020-02-25 13:52:36.754 [INFO ] [openhab.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

==> /var/log/openhab2/events.log <==
2020-02-25 13:52:38.443 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from UNINITIALIZED to INITIALIZING
2020-02-25 13:52:39.837 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from INITIALIZING to ONLINE
2020-02-25 13:52:59.707 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from ONLINE to OFFLINE: Hue bridge connection lost.
2020-02-25 13:53:00.211 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from OFFLINE: Hue bridge connection lost. to ONLINE
2020-02-25 13:53:21.636 [hingStatusInfoChangedEvent] - 'hue:bridge:ecb5fa079484' changed from ONLINE to OFFLINE: Hue bridge connection lost.
packet_write_wait: Connection to 192.168.0.54 port 22: Broken pipe

The whole system is out of service after that? or just network?

“Broken pipe” means the connection was lost.
Maybe an IP address conflict with DHCP and fixed addresses?

1 Like

Just the network. I pluged in an keyboard and i can type so it seems fine.

I tried sudo systemctl restart openhab2.service, but network dosen´t work after that either. I don´t know if it should restart the network service again(i think it was neccesary after setting wifi via openhab.config,so i just thought give it a try).

Ok, that means…?
I have everything on normal settings(auto). So my pi has .54 and hue bridge has .204 set automatically.
I tried to set them both to fixed addres (.77&.78) but nothing changed.

Can you ping the Pi after the “broken pipe”?
does “arp -a” show the correct MAC from the Pi?

ping dosen´t work after “broken pipe”.
mac addres from “arp -a” shows Pi MAC.

@alex_91 I would boot the pi login to ssh and stop openHAB.

Start a looping ping to that pi IP address and let it run for several minutes. If the connection persists then start openHAB and try the same thing.

This should prove or disprove whether openHAB is causing the issue. It definitely seems like you are having a network issue.

One other option would be plug in a wired connection and try running on that for several hours just to see if everything works. Maybe the pi won’t play well with you WiFi router for some reason. I had that happen once with a router only one computer would not work.

Ok, i just dicovered sth like that. While i tried to ping the pi.
After the ping didnt work after “broken pipe” i wanted to be sure pinging it works when the rest also works, so i rebooted the pi and started a ping loop. And here we go, pi keeps running(tested for about 15 min) and the errors were much less(it droped a oing like every 5s, when an error came up).
When i " sudo systemctl stop openhab2.service" pings still work.

So i just kept looking arround and found that when i increase the “Sensor Polling Interval” in hue binding from 500 to 2000 i get no errors at all and the system runs stable.
It´s the same behavior on both, eth and wifi connection.
So i think there is some service or sensor just messing the network/openhab(and maybe my router dosent like that?).

Anyways for now it´s just my test setup. I want to get into openhab for now. Later this year i will get into a new place and get a new router(like an avm fritzbox. for now i just have a basic one from my provider). So i hope it will work then and for now for testing.

Thank you for your help :slight_smile:
When someone has any suggestions… i will still try to solve it and post when i find a solution

edit:
I changed it back to 500 and it is runnung without any error for over 20min now. So maybe there is some initiation going on with hue bridge?

Fine that you have sorted out this finally.
I personally have no experiences with the hue hub, I try to avoid any intermediate hub / bridge / or whatever.
Most of my devices are for instance z-wave as this is supported directly and (thanks chris and others) perfectly maintained.
A test system is for sure the best to get familiar with OH, after a few weeks or even months you will know exactly how to make your next home smart :wink:

If you have a router from your provider this may be part of the issue. The router given by my provider did not allow for chrome cast to work reliably.
I had to install an old router that only chrome cast used. This provider based setup stayed until I moved to my ubiquiti setup. Now I have not issues with my chrome cast.

I believe the hue hub uses some broadcast methods possibly upnp. Good to hear you will be moving to an improved setup. I am confident you will be happy!