I did a similar project, using Node.js to implement it with REST.
The advantage of that is I can create a CA with OpenSSL and sign a certificate for the server and one for the Raspberry Pi, and that way you can check if the other end is presenting a certificate signed by the same CA.
The advantage of that is I can create a CA with OpenSSL and sign a certificate for the server and one for the Raspberry Pi, and that way you can check if the other end is presenting a certificate signed by the same CA.
https://jacklew.is/raspberry-pi-redux/