Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

BridgeStateUpdatedCallback fires two times for one update #30

Open
jeroenbeuz opened this issue Apr 25, 2018 · 1 comment
Open

BridgeStateUpdatedCallback fires two times for one update #30

jeroenbeuz opened this issue Apr 25, 2018 · 1 comment

Comments

@jeroenbeuz
Copy link

Whenever I update a single light state I get the first bridgeStateUpdateEvent callback after a couple of miliseconds. This is great, but then after about 2 seconds another bridgeStateUpdateEvent is called. I know for sure my action only ececuted once and there's nobody else communicating with my bridge. This is quite annoying since I update my UI based on these callbacks. Now for every action I send to the bridge I get two state update callbacks, and one is fired only after 2 seconds.

This is how I build my bridge object:

Bridge bridge = new BridgeUtils().getBridgeBuilder()
                .setBridgeId(bridgeUID)
                .setIpAddress(bridgeIp)
                .setConnectionType(connectionType)
                .setBridgeConnectionCallback(bridgeConnectionCallback)
                .addBridgeStateUpdatedCallback(bridgeStateUpdatedCallback)
                .build();

And this is how I update the light state:

light.updateState(lightState);

Bridge info:
BSB0002 with software version 1802201122 (latest available update)

@jhvdb87
Copy link

jhvdb87 commented Apr 30, 2018

Which events do you get ? Are they the same ?
I assume that you don't have a heartbeat running in the background ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants