I’ve moved from raspbian to Hass.io but I have some python scripts. For example one that I schedule to run every 5 minutes and read values (from hardware) and put it on a MQTT queue, after which Home Assistant can pick it up.
What approach should I use for setting up the script on Hass.io?
With raspbian I had python virtual environments I used, and used the python approach to load required libraries etc. What’s the concept of how to do this in Hass.io? e.g.
- don’t use virtual env concept?
- how to load various library files required? e.g. (see below)
- how to schedule running each 5 minutes
Example of imports in one of my files
import serial
import xml.etree.ElementTree as ET
import paho.mqtt.client as mqtt
import json
Note I do have AppDaemon4 installed with Hass.io.