Origin of the insulating state in honeycomb iridates and rhodates