I've taken a look at the code (current version on GitLab) and have found the following (not directly related to the problem):
- The calls to logger.critical() upon receipt of invalid data should be logger.error() or logger.warning() - critical is used to indicate that the program cannot continue to run, which doesn't seem to be the case here.
- There are a couple of duplicate logger calls about system startup near line 110.
I didn't find anything seriously wrong in minsterbells.py, so I then looked in minstermusic.py, where it looks like instead of asking for the bells pi status, you're sending it the list of status information at line 443:
Code: Select all
bells_socket.write(Status) # Request the Bells Pi status
I think this should instead be:
Code: Select all
bells_socket.write("Status") # Request the Bells Pi status
This is perhaps one of the disadvantages of using global data to hold state, but in a simple(ish) program like this it's not too much of an issue. Hopefully that solves your problem.