Almost complete working example of Helloworld
Check live instance to decide when to mark as connected or disconnected