Quantcast
Channel: Configuration - Home Assistant Community
Viewing all articles
Browse latest Browse all 106621

Command Line Sensor not doing anything

$
0
0

I’m trying to create a sensor to let me know if a service is running on a remote linux machine.
I have the command sorted, I’ve tested it in Terminal and it returns the expected “running”
However when I put the command into a yaml file it doesn’t seem to do anything, I’m not even getting a blank sensor.

in configuration. yaml I have:

command_line: !include_dir_merge_list command_line/

Then in the command_line folder I have a Mythtv_backend.yaml file which contains

command_line:
  - sensor:
    name: "MythTV Backend Status"
    command: "ssh -i /config/.ssh/id_rsa -o UserKnownHostsFile=/config/.ssh/known_hosts bert@192.168.1.116 systemctl show mythtvbackend | awk -F= '/^SubState=/ {print $2}'"
    scan_interval: 60

I’ve increased the loggin level to debug and I even tried appending >2 /config/command.log to the command. In both instances there were no errors.

So no sensor in Developer tools/States and nothing in the logs.

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 106621

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>