The Internet of Things (IoT) is rapidly developing in diverse and critical applications such as environmental sensing andindustrial control systems. IoT devices can be very heterogeneous in terms of hardware and software architectures, communication protocols, and/or manufacturers. Therefore, when those devices are connected together to build a complex system,detecting and fxing any anomalies can be very challenging. In this paper, we explore a relatively novel technique known asProcess Mining, which—in combination with log-fle analytics and machine learning—can support early diagnosis, prognosis, and subsequent automated repair to improve the resilience of IoT devices within possibly complex cyber-physicalsystems. Issues addressed in this paper include generation of consistent Event Logs and defnition of a roadmap towardefective Process Discovery and Conformance Checking to support Self-Healing in IoT.