Gateway and Python are fighting over access to the GPIO?
alowhum last edited by alowhum
I have Pi Zero W with am NRF24 MQTT MySensors gateway. It works great.
At the same time I am developing a small 433 clone plugin for Domoticz in Python.
When I ask the plugin to start recording the 433 signal, which works, the MySensors gateway stops working. It doesn't come back up.
Could it be that the GPIO initialisation in the Python script "takes over" everything from MySensors? Is it not possible for software to share different parts of the GPIO?
There is another option. While trying to export pin 36 to use it as a switch, I discovered that pin 22, which MySensors uses, is also "exported". This also stopped the gateway from working. Could this be the issue again? But I couldn't find where this pin was exported (not in /etc/rc.local), so my assumption was that maybe it was MySensors itself that did this?
Some more data:
ls /sys/class/gpio/unexport shows:
export gpio16 gpio22 gpiochip0 unexport
GPIO22 seems to be the CE pin. Is that exposed to allow me to temporarily disable an then re-enable MySensors I wonder..