Setup of platform command_line is taking over ten seconds/ HASS not starting

HASS 0.57.2 Installed on an RPI with the AIO installer. ( I know, I need to update/switch from AIO, next project :slight_smile:)
For some reason HASS is now hanging and will not start. Had it working a second ago. stopped after I tried to add a “sensor 3:” entry pointing to another python script. Nothing in the logs aside from:

2017-11-29 03:14:10 WARNING (MainThread) [homeassistant.bootstrap] Python 3.4 support has been 
deprecated and will be removed in the beginning of 2018. Please upgrade Python or your operat$
2017-11-29 03:14:14 WARNING (Thread-7) [homeassistant.components.emulated_hue] Alexa type is 
deprecated and will be removed in a future version
2017-11-29 03:14:14 WARNING (Thread-7) [homeassistant.components.emulated_hue] Listen IP 
address not specified, auto-detected address is *******
2017-11-29 03:14:23 WARNING (MainThread) [homeassistant.setup] Setup of sensor is taking over 10 
seconds.
2017-11-29 03:14:23 WARNING (MainThread) [homeassistant.components.sensor] Setup of platform 
command_line is taking over 10 seconds.

This was the way I had it setup before that worked:

 sensor:
   platform: dht
   sensor: DHT22
   pin: 7
   monitored_conditions:
      - temperature
      - humidity
 sensor2:
   platform: command_line
   name: fill calc
   command: "ssh pi@***.***.***.*** 'python /home/somescript.py'"
   unit_of_measurement: "Gal"
   scan_interval: 5

For some reason, this works:

#    platform: command_line
#    name: fill calc
#    command: "ssh pi@***.***.***.*** 'python /home/somescript.py'"
#    unit_of_measurement: "Gal"
#    scan_interval: 5
 platform: dht
 sensor: DHT22
 pin: 7
 monitored_conditions:
   - temperature
   - humidity

But commenting in the new sensor kills it. DHT22 has always worked though so that’s not the issue. I’ve tried separating the sensors with the “-” indentation, even tried retyping the commands in nano since I’ve figured out the hard way that HASS doesn’t like things pasted into it from word or chrome or the like. passwordless SSH is setup for the homeassistant user. That’s about all I could think to try for it. Looking for some tips. Thanks for the help.

You need a space between sensor and 2 / 3 etc.

sensor 2:

ugh, small typo when putting it into here. I had them separated in the actual conf file. Even just having the command_line sensor by itself will make HASS hang so it’s something with that. Tried rebooting, restarting HASS, everything, still nothing.

I think you need command_on:

Edit: - nope ignore me you are correct :slight_smile:

So an update to 5.8.1 did the trick. Switched the code on the conf file back to:

sensor:
    platform: command_line
    name: Fill Calc
    command: "ssh pi@***.***.***.*** 'python /home/somescript.py'"
    unit_of_measurement: "Gal"
    scan_interval: 5

sensor 2:
    platform: dht
    sensor: DHT22
    pin: 7
    monitored_conditions:
      - temperature
      - humidity

and it’s running great now. I installed the new version with the virtualenv method and all config and everything transferred over very nicely.

I do have a quick/hopefully easy side question for anyone still cruising the question and might know. When I run Hass normally as per the instructions, Hass closes as soon as I end the Putty session, I got around this by using the “nohup” command to keep it running in the background. Works fine, and I know that I can restart/stop/start Hass from the webUI if needed but I was wondering if there’s any way to login to an already running virtualenv?

“sudo systemctl stop home-assistant” with the pi or homeassistant user doesn’t stop the webUI from working, nor does it work if I activate the virtualenv again as per the instructions with:

$ sudo su -s /bin/bash homeassistant
$ cd /srv/homeassistant
$ python3 -m venv .
$ source bin/activate 

and then run the “sudo systemctl stop home-assistant” from within it, still nothing. Just want to make sure I can still get into the virtualenv running in the background and fix things if I ever need to . Thanks for the help guys.