Try to connect before sending messages.
Merge branch 'master' of github.com:pocmo/SensorDashboard