Being new to (using a) Raspberry Pi and python, I am wondering if the following functions can be performed by one RPI 0 W, running raspbian and python. There will be two and possibly three independent functions I like to do with this RPi0:
(A) Using time and weather forecast, control a home ventilation system. The ventilation system is controlled using the (hardware) PWM GPIO output. The frequency of changes is very low, the minimum time between two changes is two minutes. For this function a few sensors will be added in a later stage, which will be connected using I2C. These sensors will be polled, with a low frequency.
(B) Receive multiple messages per second via a serial port and send a summary via Wifi to a server once every 5 minutes
(C) Query a power meter, connected to the converter of solar cells, using bluetooth and send a summary via Wifi to a server once every 5 minutes. As many details about the bluetooth connection are still unknown to me, it is not certain that this function will be implemented.
One objective is to have the CPU utilisation as low as possible. Besides the above mentioned functions, the RPI0 will also need to support a few SSH sessions (via Wifi) for maintenance, monitoring of the log files and periodic backups.
I think a handful of independent watchdog timers are needed, each with a different function to perform if the timer expires. For GPIO there seems to be methods to handle events through call-back functions, however I did not find something similar for serial I/O (handling of a BREAK is in this case important) or bluetooth.
Any comments on the feasibility of implementing these functions using python, or on alternative approaches will be appreciated.