Hi everyone, i am a Home Automation addict. But this topic is about a different problem. I have Hass.io on raspberry pi 3 and that sits in the kitchen because it makes so much fan noise. So i looked at Andreas Spiess’s article to install an intelligent fan which controls its speed based on cpu temperature. it works pretty well. A python script keeps on checking the temperature and controlling fan speed and i have added a bit of my own modification to have both speed and temp sent to MQTT and shown in HA.
however, i am unable to find a way to call the concerned Python script from HA. i want it called when HA restarts which may be dumb as it should be started when raspberry pi starts but HA is all i use the RPI for. and also i failed at auto loading the script on RPI start. happy to post that python script here if someone is interested. Would highly appreciate if someone can give me a clue about what i am doing wrong. i am trying the following shell command
shell_command: fancontrol: 'ssh "[email protected]" "python /home/pi/projects/fancontrol.py &"'
and calling it in automation as
- action: - service: shell_command.fancontrol alias: FanControl condition:  id: '1519036529317' trigger: - event: start platform: homeassistant
(excuse the silly formatting but this is auto generated from the configuration portal)
a hunch i have is that maybe because the Python script calls PAHO MQTT library and the shell command when executed, cannot find that. and hecne the script is failing, but dont know how to pass in the library/module path.