Skip to content

Issues with multiple commands sent in quick succession? #20

@lockyt

Description

@lockyt

Hi @the1laz - great work with cgateweb. It's a great little script.

I am however having an issue with CBUS which may or may not be the cgateweb script causing the problem which I am hoping you can help with.

To explain the situation. We have a Qnap NAS running docker containers in the following configuration. CBUS(CNI)<->Cgate<->Cgateweb<->mosquito eclipse<->Home Assistant<->Homekit. All works just fine for turning single lights on/off and works super fast. However, when we send more complex commands such as turning off the kitchen lights or downstairs lights, it has problems where it seems some lights fail to report back to HA that they turned on/off. So for example, you tell Siri to turn off all kitchen lights and any lights that are on turn off. However, in HA it shows that some kitchen lights are still on but they have actually turned off. Looking at the cgateweb logs, it shows the command being sent to turn the lights off and they work (lights go out) but the responses don't come back for the lights (which are showing as still on).

Looking at cgate logs, I can see the commands come in to turn on the lights and see the responses go back for all the lights. So it seems that somewhere between cgate and cgateweb the responses to update what happened are getting lost.

I have isolated it down to one of these two (cgate/cgateweb) as everything else seems to be working as expected.

Here are the screenshots of both cgate and cgateweb during the kitchen lights on/off scenario as above, as well as what is happening in Home Assistant:

Turn off all kitchen lights either through HA or SIRI:
Screen Shot 2019-07-24 at 7 51 30 pm
all physically turn off as requested but HA doesn't get a response for 28 and 30 so it thinks they are still on
Screen Shot 2019-07-24 at 7 51 24 pm

Turn on all kitchen lights through either HA or SIRI:
Screen Shot 2019-07-24 at 7 51 54 pm
only turns on those in HA/CBUS that it thinks are off (ie, everything but 28/30)
Screen Shot 2019-07-24 at 7 51 48 pm

If you go from the bottom up on the logs you can find where all lights were turned on or off. You can see the device ids being turned on/off and the responses from cgate confirming them. But cgateweb only shows some of the responses coming in, not all and the ones that don't are the lights that stay on/off. Now it could be cgate logging something it isn't sending or perhaps cgateweb not processing and accepting the responses. We have a very large cbus installation and it could be related to that.. a total of ~190 lights and blinds in the place. However this issue happens even on the smallest group - in this instance only 6 lights.

Any help would be greatly appreciated. I will need to confirm what version of cgate we are using and whether there is anything special with the cbus installation (need to speak with the CBUS guy) but thought I'd check with you first.

Thanks for your help in advance.

Locky.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions