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.
The URL used here is a domain name and not just an IP address. This
should reduce the need to update the IP address in the code if the
server, currently hosted on AWS at time of writing, needs to be
restarted. The servers on AWS do not keep the same IP address if you
stop and start them.
The abbether.net domain is a personal one and used as a way to reduce
project costs. I did not use this domain when I first wrote the code
here because I did not own it. Long story short, the Covid-19 malarkey
meant the project was put on hold and I ended up owning abbether.net
during the first lock-down. The decision to use the domain is one of
convince my end. I did not want to keep updating the code manually if
the server on AWS was stopping and starting.