server/upload.py: use state from the hardware module