Better Response time


#1

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


#2

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 https://mydevices.com/cayenne/docs/supported-hardware/#supported-hardware-sensors-generic-digital-input.


#3

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:
https://photos.app.goo.gl/EguMj4E5eksbduQXA

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


#4

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 .


#5

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.


#6

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


#7

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.


#8

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.