Internet of Things (IoT) systems are complex, and consist of distributed and interdependent components, making the modeling, prediction and monitoring of their behavior a critical challenge. This challenge is specifically exacerbated by the need to develop precise models that inherently consider the domain knowledge about the underlying physical structure, and the causal interdependencies between the various components of IoT systems. In this paper, we present an approach that is capable of leading to improved modeling and monitoring at the edges. To this end, we consider an IoT system as a network that can be represented by a graph. Then, we develop an approach that combines a semantic knowledge graph with a Transformer-based neural networks, under a Graph Convolutional Neural Networks (GCNN). Our GCNN produces features that are subsequently used with the Transformer to learn the parameters of an IoT model. We exploit the parameters of the model for monitoring and anomaly detection. We validate our approach using a real robot workcell for anomaly detection during a pick and place process, and we demonstrate that our approach outperforms other competitive techniques.