+ clock_gettime(CLOCK_MONOTONIC, &ts);
+ ts.tv_sec = 0;
+ ts.tv_nsec = 500 * 1000 * 1000; // 500ms
+
+ bool try_to_connect = true;
+ grpc_connectivity_state state = channel->GetState(try_to_connect);
+
+ while (state != GRPC_CHANNEL_READY) {
+ state = channel->GetState(try_to_connect);
+
+ HMI_DEBUG("HomesScreen", "waiting for channel state to be ready, current state %d", state);
+ nanosleep(&ts, NULL);
+ }
+
+