Previously, the light-meter was creating a new HTTP request to send every new reading. This now
uses a persistant session to reduce the amount of requests made to the server -- and reduce low
on the system.
The extra exceptions listed and expanded on are mostly for testing. At the time of writing, the
system as a whole is hanging at various parts throughout the day and the intention is to monitor
the Light Meter to see if any of the new exceptions are the cause (or contributing) to the
hanging. The current trains-of-thought at the minute are too many requests (system load too
high) and requests not timing out properly.
I have given the 'mid-point' server a domain name to reduce the need to manually update the IP address if/when the
server needs to be restarted (for whatever reason). The changes here include the new URL.
The base URL uses ritherdon.abbether.net now, in the main part of the
python code. I have added checks to see which device is running the
code and forms a complete URL for the API call.
The way the URL is formed for the API call is not the most elegant
solution but is was quick to write and the code has a limited
life-span. It will not require any further modification when it goes
live. So, the speed it took to write it was a good trade-off in my opinion.