Better Response time

Good Day

I am using a Raspberry 3 B plus, my response time is delayed my about 6 second, you need to hold a button for 10 seconds before the state change.

Is there a way to improve it?

Regards
Danie Nel

Hi.
it takes around 2-3 seconds mostly for the pi to detect the state change and send the respond to cayenne.
i am not sure why it causing a 10 second delay at your end. check if you have you connected the switch properly Cayenne Docs.

Are we talking a physical button on the PI or a virtual button on the app?

Anyway I would guess both sides should be about the same.

I my experience, everything is wrapped up in about 300ms.

See this as an example. It doesn’t get any better than that:

And this includes a subprocess call to lirc and the IR transmission.

thanks for the response @francoisgervais. i guess he is referring to a button as he said he has to hold the button down for 10 second.

well this is very good use of cayenne and would be great if you could share the project details with community.
with this i can turn ON my AirConditioner before i reach home from work .

This is exactly it, my girlfriend uses it to start AC from the bus while going home.

Ok, I’ll try to post info about this project on the forum.

1 Like

Hi

Mine do not respond nearly as fast. I have a actual push button need to hold in in for minimum 10 seconds for it to reflect so that the if this then this can run. If you do not hold it for 10 seconds it does not go on and then the trigger do not run.

And a button to switch a relay if you do not hold it 10 seconds atleast the relay do not switch.

Regards

I would try to break down the problem into 2 halfs to see what is slow.

Are you handling the button in python?

I think the best way would be to make a small python script that send a request as if the button was pressed. This will completely decouple the hardware and ensure the request is sent as soon as the script ends.

See if this is fast or not.

1 Like

you have connected your GPIO input pin to button with 3.3V connected through a resistor?
try connecting the GPIO pin at ground pin of the button.