Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long delay when turning light off immediatly after turning it on #95

Open
1RandomDev opened this issue Aug 14, 2022 · 5 comments
Open

Comments

@1RandomDev
Copy link

Many times when I turn off a light immediately after it turned on, there's a really long delay until it turns back off. Don't know if this is on purpose or can be changed in the config, but I couldn't find any setting that solves it.

@devWaves
Copy link
Owner

are u using the bot or plug mini?

the bot currently waits 2 seconds between every command sent to it using this value defaultBotWaitTime = 2 . You can set that to 0 or 1 and it might help. it currently wait 2 secs between every command. This is because if the bot is in the middle of pressing and a command is sent to it, it will return a busy response. The code does retry on busy responses now though

consider if you had a hold value set on the bot of 5 seconds. You would want to wait at least 5 seconds before sending the next command otherwise you would get a ton of busy responses

when a command is sent the devices work by creating a connection, then disconnecting after a command is sent. This is to save battery

@1RandomDev
Copy link
Author

I'm using a SwitchBot on a light switch. And yes I have checked those 2 settings, but the delay in my case in from 20-60 seconds and is more or less completely random. Do you think it's more like a connection issue?

@devWaves
Copy link
Owner

devWaves commented Aug 26, 2022

20-60 seconds would be a connection issue. how close is the bot to the esp32? if u place it real close does it have the same issue?

what is the typical rssi linkquality value foe the bot? you will want it at a.minimum in the 70s. 40-60 is good, 30-50 is excellent

things like having doors closed vs open can also affect signal. So like it could be a great signal with the room door open then you close the door and signal goes bad

@Joe-DN
Copy link

Joe-DN commented Aug 30, 2022

I am having the same issue. Using a Switchbot on a light switch. Have a defaultBotWaitTime of 2.

I only issue the command every 5 seconds. Works fine for 3-10 events, then the command just seems to get lost. After 20-60 seconds the command is received and triggers the switch bot. The ESP is 5cm from my switch bot so range isn't an issue.

Is there anything I can do to help debug?

RSSI is -48

@devWaves
Copy link
Owner

devWaves commented Sep 3, 2022

I am unable to reproduce the issue. One thing to try if you haven't is to use an MQTT user/pass specific for the ESP32 alone, don't use the generic HA one. If using HA create a new account and use those credentials

In order to confirm the ESP32 is receiving the command to process it you will need to look at these things.

  1. using MQTT explorer and the Arduino IDE you should see these appears in this order... (don't turn debugging on)

step1
step2
step3
step4

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

No branches or pull requests

3 participants