###### Abstract
Understanding medical measurements often demands domain-specific knowledge. For instance, a single data point like a heart rate exceeding 150 beats per minute can signify different health states depending on whether the person was at rest or running. Therefore, the data context is critical, and any misinterpretations can drastically skew diagnoses and treatment decisions. Given the gaps left by solutions such as the IoT-MP and the challenges still at play, middleware remains a promising answer to these challenges. Serving as a buffer layer between IoT devices and data-utilising applications, middleware offers compatibility, interoperability, standardisation, and abstraction, fostering seamless data integration and inter-system communication. When combined with technologies like AI and blockchain, the potential will be further amplified. On one hand, AI's prowess lies in data analysis and insight generation, particularly from heterogeneous sources. On the other hand, blockchain provides a robust framework for secure data management and sharing in IoT systems. Thus, their amalgamation into a semantic middleware may reduce some of the challenges encountered. To this end, this paper presents the Semantic IoT Middleware (SIM). This novel middleware is designed to address the challenges identified previously. SIM employs blockchain technology with artificial intelligence (AI) to enhance data security, providing an encompassing user-centric solution tailored for diverse IoT systems, especially in the healthcare area. SIM provisions semantic annotations and user feedback to ensure data security and integrity. Additionally, it facilitates service integration and improves operational efficiency. Thus, the primary contributions of this work are as follows:A comprehensive proposal of the Semantic IoT Middleware (SIM), designed for broad IoT applications with a focus on healthcare, addressing challenges in data interoperability, heterogeneity, and system complexity. * The integration of blockchain technology within SIM for enhanced data security and integrity, coupled with an innovative AI Feedback and Analysis Module for continuous system improvement based on user feedback and data analysis. * Introduction of an innovative AI Feedback and Analysis Module, harnessing the power of artificial intelligence to continually refine and enhance system operations based on user feedback and real-time data analysis. * The introduction of detailed implementation algorithms as a blueprint for practical application and a proof of concept demonstrating the feasibility and adaptability of SIM in various scenarios. * An expanded discussion on user-centric operations in SIM, showcasing its application in diverse contexts beyond healthcare, emphasising its intuitive and accessible user interface. * A comparative assessment of the proposed middleware against existing methodologies, demonstrating its capabilities in terms of security, interoperability, and user-centric design. The remainder of the paper is organised as follows: Section 2 delves into the background of IoT middleware and its application in healthcare. Section 3 presents the proposed middleware, detailing its architecture and modules. Section 4 presents a case study and scenario. The proof of concept is provided in Section 5. Section 6 focuses on the evaluation of the proposed system. Section 7 discusses the challenges encountered during this research. Section 8 offers the concluding remarks and summarises the contributions of this work.