Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Polling configuration problems #60

Open
alessandrostuppino opened this issue May 24, 2020 · 0 comments
Open

Polling configuration problems #60

alessandrostuppino opened this issue May 24, 2020 · 0 comments

Comments

@alessandrostuppino
Copy link

alessandrostuppino commented May 24, 2020

Hi,

I configured the plugin in the following way:

{
   "platform":"cmdSwitch2",
   "name":"CMD Switch",
   "switches":[
      {
         "name":"NAS",
         "on_cmd":"nas-on",
         "off_cmd":"nas-off",
         "state_cmd":"sudo lsblk | grep -i '/mnt/nas'",
         "polling":true,
         "interval":10,
         "timeout":2000
      },
      {
         "name":"Playstation",
         "on_cmd":"sudo ps4-waker -d <PS4_IP>",
         "off_cmd":"sudo ps4-waker -d <PS4_IP> standby",
         "state_cmd":"sudo ps4-waker search | grep -i '200 Ok'",
         "polling":true,
         "interval":10,
         "timeout":2000
      }
   ]
}

But setting polling to true gives me an annoying log in Homebridge console like:

pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
homebridge : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/lsblk
pam_unix(sudo:session): session opened for user root by (uid=0)
pam_unix(sudo:session): session closed for user root
homebridge : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/usr/bin/ps4-waker search

If I disable polling the logs disappear but I can't get the current state of the device (of course).

I already tried without the sudo but nothing changed.

Does anyone had the same problem?

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

No branches or pull requests

1 participant