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

on/off loop because timeout is too short #14

Open
dieteroo opened this issue Feb 22, 2023 · 0 comments
Open

on/off loop because timeout is too short #14

dieteroo opened this issue Feb 22, 2023 · 0 comments

Comments

@dieteroo
Copy link

default timeout is 4000 ms; on my system it takes on average 5700 ms for the Set command, and on average 3000 ms for the Get command. (tested 20 times each; only 1 listed for each command)

*SHELL*> cat /proc/cpuinfo
Hardware        : BCM2835
Revision        : a02082
Model           : Raspberry Pi 3 Model B Rev 1.2

*SHELL*> env -i bash --noprofile --norc

bash-5.0$ time bash /var/lib/homebridge/appletv_control.sh Set 'ATV Power' 'On' '0'

real    0m5.695s
user    0m5.319s
sys     0m0.248s

bash-5.0$ time bash /var/lib/homebridge/appletv_control.sh Get 'ATV Power' 'On' 
0

real    0m2.988s
user    0m2.802s
sys     0m0.141s

Config

        {
            "platform": "Cmd4",
            "name": "Cmd4",
            "interval": 5,
            "timeout": 4000,
            "debug": true,
            "stateChangeResponseTime": 3,
            "queueTypes": [
                {
                    "queue": "A",
                    "queueType": "WoRm"
                }
            ],
            "accessories": [
                {
                    "type": "Switch",
                    "displayName": "ATV Power",
                    "on": "FALSE",
                    "queue": "A",
                    "polling": [
                        {
                            "characteristic": "on"
                        }
                    ],
                    "state_cmd": "bash /var/lib/homebridge/appletv_control.sh"
                }
            ]
        }
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

1 participant