I seem to recall something about audio running in the user space but not at the system level? And the solution for that was to reconfigure things so that audio was available without anyone logging in.
This quite a while back, I don't even know if that's still a thing in the more recent version of the os, though it makes sense that it is. You don't want the system to be making noises out of the blue if no one is logged in.
If you do a search here, you'll probably find a few threads about that.
I would also wrap that code in a try/except block so that if the network goes out temporarily, the program logs it so you know it but will not crash and will just retry again later. It'll save you from crashed runs and allow you to eventually receive messages that were sent but maybe never received. But mqtt should handle that depending on how you run it, fire and forget or save it until it goes out, etc. Whatever the case, your code should be able to not crash if the network is out and just start working again when it comes back.
This quite a while back, I don't even know if that's still a thing in the more recent version of the os, though it makes sense that it is. You don't want the system to be making noises out of the blue if no one is logged in.
If you do a search here, you'll probably find a few threads about that.
I would also wrap that code in a try/except block so that if the network goes out temporarily, the program logs it so you know it but will not crash and will just retry again later. It'll save you from crashed runs and allow you to eventually receive messages that were sent but maybe never received. But mqtt should handle that depending on how you run it, fire and forget or save it until it goes out, etc. Whatever the case, your code should be able to not crash if the network is out and just start working again when it comes back.
Statistics: Posted by memjr — Thu Jul 25, 2024 2:42 pm