[SOLVED] Hue bridge flapping

I have a hue bridge that keeps flapping online/offline every 500ms (default sensor query interval). It’s a version 1 bridge (the round one) with a couple of LivingColors bulbs attached (that’s the predecessors of Hue - they work on a Hue bridge, too, and OH control used to work as well.
Running latest OH snapshot 1502 using latest java (Zulu 8u192) on RPi. Not sure when exactly the problem started but it has been around for a while - at least a couple of weeks since before 2.4 was released.
The bridge is not auto-discovered by the binding - I remember that used to work in earlier times - and so there is no log output which username to use. I manually added the thing, extracting the username to use from the hue bridge via its API.

Debugging does not really get me anywhere. Of course I tried all the usual stuff to restart bundle and OH to no avail. There’s no output from the binding even at TRACE level All I get is repetition of this in events.log:

2019-01-16 17:48:09.956 [hingStatusInfoChangedEvent] - 'hue:bridge:17192c95' changed from OFFLINE: Verbindung zur Hue Bridge unterbrochen.  to ONLINE
2019-01-16 17:48:09.960 [hingStatusInfoChangedEvent] - 'hue:bridge:17192c95' changed from ONLINE to OFFLINE: Verbindung zur Hue Bridge unterbrochen.
2019-01-16 17:48:10.460 [hingStatusInfoChangedEvent] - 'hue:bridge:17192c95' changed from OFFLINE: Verbindung zur Hue Bridge unterbrochen.  to ONLINE
2019-01-16 17:48:10.467 [hingStatusInfoChangedEvent] - 'hue:bridge:17192c95' changed from ONLINE to OFFLINE: Verbindung zur Hue Bridge unterbrochen.

Sniffing on the bridge, I keep seeing repeated attempts of OH to query the sensor list with the bridge to answer ‘OK’. That’s probably when the bridge toggles ONLINE but something’s happening after that, making it drop back OFFLINE. Below is a tcpdump of the OH-bridge communication that keeps repeating.

Thanks for any pointers or ideas where else to look.

18:15:00.664027 IP openhab.36294 > philips-hue.fritz.box.http: Flags [S], seq 1418582833, win 29200, options [mss 1460,sackOK,TS val 1815122977 ecr 0,nop,wscale 7], length 0
        0x0000:  4500 003c 07ee 4000 4006 4d35 c0a8 b228  E..<..@.@.M5...(
        0x0010:  c0a8 b21f 8dc6 0050 548d db31 0000 0000  .......PT..1....
        0x0020:  a002 7210 e5c7 0000 0204 05b4 0402 080a  ..r.............
        0x0030:  6c30 9421 0000 0000 0103 0307            l0.!........
18:15:00.664413 IP philips-hue.fritz.box.http > openhab.36294: Flags [S.], seq 28737101, ack 1418582834, win 2920, options [mss 1460], length 0
        0x0000:  4500 002c 5208 0000 ff06 842a c0a8 b21f  E..,R......*....
        0x0010:  c0a8 b228 0050 8dc6 01b6 7e4d 548d db32  ...(.P....~MT..2
        0x0020:  6012 0b68 693b 0000 0204 05b4 0000       `..hi;........
18:15:00.664493 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 1, win 29200, length 0
        0x0000:  4500 0028 07ef 4000 4006 4d48 c0a8 b228  E..(..@.@.MH...(
        0x0010:  c0a8 b21f 8dc6 0050 548d db32 01b6 7e4e  .......PT..2..~N
        0x0020:  5010 7210 e5b3 0000                      P.r.....
18:15:00.666183 IP openhab.36294 > philips-hue.fritz.box.http: Flags [P.], seq 1:229, ack 1, win 29200, length 228: HTTP: GET /api/fd41c342dd1a06fe05025c37553dd7/sensors HTTP/1.1
        0x0000:  4500 010c 07f0 4000 4006 4c63 c0a8 b228  E.....@.@.Lc...(
        0x0010:  c0a8 b21f 8dc6 0050 548d db32 01b6 7e4e  .......PT..2..~N
        0x0020:  5018 7210 24df 0000 4745 5420 2f61 7069  P.r.$...GET./api
        0x0030:  2f66 6434 3163 3334 3264 6431 6130 3666  /fd41c342dd1a06f
        0x0040:  6530 3530 3235 6333 3735 3533 6464 372f  e05025c37553dd7/
        0x0050:  7365 6e73 6f72 7320 4854 5450 2f31 2e31  sensors.HTTP/1.1
        0x0060:  0d0a 436f 6e74 656e 742d 5479 7065 3a20  ..Content-Type:.
        0x0070:  6170 706c 6963 6174 696f 6e2f 6a73 6f6e  application/json
        0x0080:  0d0a 5573 6572 2d41 6765 6e74 3a20 4a61  ..User-Agent:.Ja
        0x0090:  7661 2f31 2e38 2e30 5f31 3932 0d0a 486f  va/1.8.0_192..Ho
        0x00a0:  7374 3a20 3139 322e 3136 382e 3137 382e  st:.192.168.178.
        0x00b0:  3331 0d0a 4163 6365 7074 3a20 7465 7874  31..Accept:.text
        0x00c0:  2f68 746d 6c2c 2069 6d61 6765 2f67 6966  /html,.image/gif
        0x00d0:  2c20 696d 6167 652f 6a70 6567 2c20 2a3b  ,.image/jpeg,.*;
        0x00e0:  2071 3d2e 322c 202a 2f2a 3b20 713d 2e32  .q=.2,.*/*;.q=.2
        0x00f0:  0d0a 436f 6e6e 6563 7469 6f6e 3a20 6b65  ..Connection:.ke
        0x0100:  6570 2d61 6c69 7665 0d0a 0d0a            ep-alive....
18:15:00.666949 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], seq 1:18, ack 229, win 2692, length 17: HTTP: HTTP/1.1 200 OK
        0x0000:  4500 0039 5209 0000 ff06 841c c0a8 b21f  E..9R...........
        0x0010:  c0a8 b228 0050 8dc6 01b6 7e4e 548d dc16  ...(.P....~NT...
        0x0020:  5010 0a84 c121 0000 4854 5450 2f31 2e31  P....!..HTTP/1.1
        0x0030:  2032 3030 204f 4b0d 0a                   .200.OK..
18:15:00.667004 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 18, win 29200, length 0
        0x0000:  4500 0028 07f1 4000 4006 4d46 c0a8 b228  E..(..@.@.MF...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 7e5f  .......PT.....~_
        0x0020:  5010 7210 e5b3 0000                      P.r.....
18:15:00.667350 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], seq 18:272, ack 229, win 2692, length 254: HTTP
        0x0000:  4500 0126 520a 0000 ff06 832e c0a8 b21f  E..&R...........
        0x0010:  c0a8 b228 0050 8dc6 01b6 7e5f 548d dc16  ...(.P....~_T...
        0x0020:  5010 0a84 69c2 0000 4361 6368 652d 436f  P...i...Cache-Co
        0x0030:  6e74 726f 6c3a 206e 6f2d 7374 6f72 652c  ntrol:.no-store,
        0x0040:  206e 6f2d 6361 6368 652c 206d 7573 742d  .no-cache,.must-
        0x0050:  7265 7661 6c69 6461 7465 2c20 706f 7374  revalidate,.post
        0x0060:  2d63 6865 636b 3d30 2c20 7072 652d 6368  -check=0,.pre-ch
        0x0070:  6563 6b3d 300d 0a50 7261 676d 613a 206e  eck=0..Pragma:.n
        0x0080:  6f2d 6361 6368 650d 0a45 7870 6972 6573  o-cache..Expires
        0x0090:  3a20 4d6f 6e2c 2031 2041 7567 2032 3031  :.Mon,.1.Aug.201
        0x00a0:  3120 3039 3a30 303a 3030 2047 4d54 0d0a  1.09:00:00.GMT..
        0x00b0:  436f 6e6e 6563 7469 6f6e 3a20 636c 6f73  Connection:.clos
        0x00c0:  650d 0a41 6363 6573 732d 436f 6e74 726f  e..Access-Contro
        0x00d0:  6c2d 4d61 782d 4167 653a 2030 0d0a 4163  l-Max-Age:.0..Ac
        0x00e0:  6365 7373 2d43 6f6e 7472 6f6c 2d41 6c6c  cess-Control-All
        0x00f0:  6f77 2d4f 7269 6769 6e3a 202a 0d0a 4163  ow-Origin:.*..Ac
        0x0100:  6365 7373 2d43 6f6e 7472 6f6c 2d41 6c6c  cess-Control-All
        0x0110:  6f77 2d43 7265 6465 6e74 6961 6c73 3a20  ow-Credentials:.
        0x0120:  7472 7565 0d0a                           true..
18:15:00.667361 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 272, win 30016, length 0
        0x0000:  4500 0028 07f2 4000 4006 4d45 c0a8 b228  E..(..@.@.ME...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 7f5d  .......PT......]
        0x0020:  5010 7540 e5b3 0000                      P.u@....
18:15:00.667677 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], seq 272:411, ack 229, win 2692, length 139: HTTP
        0x0000:  4500 00b3 520b 0000 ff06 83a0 c0a8 b21f  E...R...........
        0x0010:  c0a8 b228 0050 8dc6 01b6 7f5d 548d dc16  ...(.P.....]T...
        0x0020:  5010 0a84 4af0 0000 4163 6365 7373 2d43  P...J...Access-C
        0x0030:  6f6e 7472 6f6c 2d41 6c6c 6f77 2d4d 6574  ontrol-Allow-Met
        0x0040:  686f 6473 3a20 504f 5354 2c20 4745 542c  hods:.POST,.GET,
        0x0050:  204f 5054 494f 4e53 2c20 5055 542c 2044  .OPTIONS,.PUT,.D
        0x0060:  454c 4554 450d 0a41 6363 6573 732d 436f  ELETE..Access-Co
        0x0070:  6e74 726f 6c2d 416c 6c6f 772d 4865 6164  ntrol-Allow-Head
        0x0080:  6572 733a 2043 6f6e 7465 6e74 2d54 7970  ers:.Content-Typ
        0x0090:  650d 0a43 6f6e 7465 6e74 2d74 7970 653a  e..Content-type:
        0x00a0:  2061 7070 6c69 6361 7469 6f6e 2f6a 736f  .application/jso
        0x00b0:  6e0d 0a                                  n..
18:15:00.667686 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 411, win 31088, length 0
        0x0000:  4500 0028 07f3 4000 4006 4d44 c0a8 b228  E..(..@.@.MD...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 7fe8  .......PT.......
        0x0020:  5010 7970 e5b3 0000                      P.yp....
18:15:00.668276 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], seq 411:413, ack 229, win 2692, length 2: HTTP
        0x0000:  4500 002a 520c 0000 ff06 8428 c0a8 b21f  E..*R......(....
        0x0010:  c0a8 b228 0050 8dc6 01b6 7fe8 548d dc16  ...(.P......T...
        0x0020:  5010 0a84 7252 0000 0d0a 0000 0000       P...rR........
18:15:00.668287 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 413, win 31088, length 0
        0x0000:  4500 0028 07f4 4000 4006 4d43 c0a8 b228  E..(..@.@.MC...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 7fea  .......PT.......
        0x0020:  5010 7970 e5b3 0000                      P.yp....
18:15:00.668599 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], seq 413:522, ack 229, win 2692, length 109: HTTP
        0x0000:  4500 0095 520d 0000 ff06 83bc c0a8 b21f  E...R...........
        0x0010:  c0a8 b228 0050 8dc6 01b6 7fea 548d dc16  ...(.P......T...
        0x0020:  5010 0a84 461a 0000 5b7b 2265 7272 6f72  P...F...[{"error
        0x0030:  223a 7b22 7479 7065 223a 342c 2261 6464  ":{"type":4,"add
        0x0040:  7265 7373 223a 222f 7365 6e73 6f72 7322  ress":"/sensors"
        0x0050:  2c22 6465 7363 7269 7074 696f 6e22 3a22  ,"description":"
        0x0060:  6d65 7468 6f64 2c20 4745 542c 206e 6f74  method,.GET,.not
        0x0070:  2061 7661 696c 6162 6c65 2066 6f72 2072  .available.for.r
        0x0080:  6573 6f75 7263 652c 202f 7365 6e73 6f72  esource,./sensor
        0x0090:  7322 7d7d 5d                             s"}}]
18:15:00.668610 IP openhab.36294 > philips-hue.fritz.box.http: Flags [.], ack 522, win 31088, length 0
        0x0000:  4500 0028 07f5 4000 4006 4d42 c0a8 b228  E..(..@.@.MB...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 8057  .......PT......W
        0x0020:  5010 7970 e5b3 0000                      P.yp....
18:15:00.668620 IP philips-hue.fritz.box.http > openhab.36294: Flags [F.], seq 522, ack 229, win 2692, length 0
        0x0000:  4500 0028 520e 0000 ff06 8428 c0a8 b21f  E..(R......(....
        0x0010:  c0a8 b228 0050 8dc6 01b6 8057 548d dc16  ...(.P.....WT...
        0x0020:  5011 0a84 7eee 0000 0000 0000 0000       P...~.........
18:15:00.668845 IP openhab.36294 > philips-hue.fritz.box.http: Flags [F.], seq 229, ack 523, win 31088, length 0
        0x0000:  4500 0028 07f6 4000 4006 4d41 c0a8 b228  E..(..@.@.MA...(
        0x0010:  c0a8 b21f 8dc6 0050 548d dc16 01b6 8058  .......PT......X
        0x0020:  5011 7970 e5b3 0000                      P.yp....
18:15:00.669139 IP philips-hue.fritz.box.http > openhab.36294: Flags [.], ack 230, win 2691, length 0
        0x0000:  4500 0028 520f 0000 ff06 8427 c0a8 b21f  E..(R......'....
        0x0010:  c0a8 b228 0050 8dc6 01b6 8058 548d dc17  ...(.P.....XT...
        0x0020:  5010 0a83 7eee 0000 0000 0000 0000       P...~.........
18:15:01.175355 IP openhab.36296 > philips-hue.fritz.box.http: Flags [S], seq 1207368874, win 29200, options [mss 1460,sackOK,TS val 1815123489 ecr 0,nop,wscale 7], length 0
        0x0000:  4500 003c 21b8 4000 4006 336b c0a8 b228  E..<!.@.@.3k...(
        0x0010:  c0a8 b21f 8dc8 0050 47f6 fcaa 0000 0000  .......PG.......
        0x0020:  a002 7210 e5c7 0000 0204 05b4 0402 080a  ..r.............
        0x0030:  6c30 9621 0000 0000 0103 0307            l0.!........
18:15:01.176376 IP philips-hue.fritz.box.http > openhab.36296: Flags [S.], seq 28743915, ack 1207368875, win 2920, options [mss 1460], length 0
        0x0000:  4500 002c 5210 0000 ff06 8422 c0a8 b21f  E..,R......"....
        0x0010:  c0a8 b228 0050 8dc8 01b6 98eb 47f6 fcab  ...(.P......G...
        0x0020:  6012 0b68 39b9 0000 0204 05b4 0000       `..h9.........
18:15:01.176453 IP openhab.36296 > philips-hue.fritz.box.http: Flags [.], ack 1, win 29200, length 0
        0x0000:  4500 0028 21b9 4000 4006 337e c0a8 b228  E..(!.@.@.3~...(
        0x0010:  c0a8 b21f 8dc8 0050 47f6 fcab 01b6 98ec  .......PG.......
        0x0020:  5010 7210 e5b3 0000                      P.r.....

Same issue here. I have the old Bridge.

Same here after upgrading to OH 2.4, also with V1 Bridge.

Also, I get the same effect after removing my manual configuration file from the /things folder, having the bridge discovered + added in the inbox, re-pairing bridge and adding all bulbs etc. in PaperUI.

Fascinatingly, everything seems to work fine nonetheless, except for the massive logfiles I now expect to flood my tiny machine…

EDIT: the toggling betwen “online” and “offline - bridge_offline” can also be seen “live” in PaperUI’s things configuration.

@mstormi
@fpallas

Did you change it for testing e.g. to 2000 ms or 5000 ms? Maybe the Gen1 bridge has a lower query interval (by default)?

Hi all,

I recently submitted a PR to omit pulling for lights / sensors if you have not added a related thing for it. I think it will help for your issues too. Should be available in the new 2.5.0.M1 milestone build which has been released today.

yes but no luck. Same flapping just less often.

Thanks. But I have the problem with as well as without bulb things so guess it won’t tackle the cause.

EDIT: Bulbs are recognized BTW and exist as things.
Just installed 2.5.0M1 right now. Didn’t change anything.

For me too (I didn’t notice earlier as my bulb things were wrong but yes I can control the bulbs now).
It’s just the flapping.

Did an update of the bridge software - no time to check at the moment, but could it be that the weird behavior disappeared now?

Updated my bridge and seems that made the problem disappear.
Tried updating earlier but the only way of doing so (use of Hue app) didn’t offer me an update for my bridge at that time but today it did.