Logging temperatures over local network with Python sockets and DS18S20

This is a straight forward server/client python communication project. There are two versions of the scripts, one uses the UDP network protocol and the other uses the TCP.
Because UDP lacks all the back-and-forth communication that TCP uses to make sure your data is transfered properly, it might be wiser to use the TCP version of the scripts if reliability is a priority.

In this specific project I have used the UDP version without any problems for more than a year.
If the server controls something like a robot and speed is critical, UDP is the way to go.

My code uses the function getTemps to with the help of the W1ThermSensor library get the temperature from two different DS18S20 sensors, one inside and one outside. The W1ThermSensor can be installed through pip and 1-Wire need to be enabled in the Raspberry Pis config. The SERVER variable in the client script is hardcoded so the machine running the server script should have a static IP.

Images:

Raspberry Pi 2/3/4

Dallas DS18S20 sensor

You can find the python scripts here.