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

How to turn off Linux machine? #67

@mixtly87

Description

@mixtly87

Let's say I have a configuration like:

{
    "name": "Linux Computer",
    "on_cmd": "wakeonlan xx:xx:xx:xx:xx:xx",
    "off_cmd": "sshpass -p mypassword ssh -tt root@192.168.0.4 '/sbin/poweroff'",
    "state_cmd": "ping -c 2 -W 1 192.168.0.4 | grep -i '2 received'"
}

I'm aware of security risks here; but shutting down doesn't work since I updated Homebridge to be used as a system service and with Homebridge web server page.

Before it used to work fine but now I used to get message 'Pseudo-terminal will not be allocated because stdin is not a terminal.' so I added -tt parameters and that didn't help.

There is a single error message in the homebridge log now:

[9/17/2020, 14:28:10] [CMD Switch] Failed to turn off Linux Computer
[9/17/2020, 14:28:10] [CMD Switch] 

I'm not sure what else to try or if there is completely different approach to try? Did anyone face similar issues?

I'm running Homebridge on RPI, model 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions