Failed to find a better local server

Simplify the code and extend heart rate data transmission to the local
server