Sectors · Home automation and IoT

Home automation and connected devices: software that is safe, and secure

Boiler, thermostat, shutters, door lock, household appliances, camera, gateway: in the home, software controls devices that heat, lock and monitor, and it is connected to the internet. Two requirements meet here: the device must never become dangerous, and it must not become a way in.

Smartphone controlling connected bulbs, sensors and a camera
The challenge

What the software must withstand

A household device runs for years, unsupervised, in the hands of users who are not technicians.

Heating and cut-off

A runaway control loop, a thermal cut-out that does not trip: the software must never let overheating set in.

Microcontroller failure

Corrupted memory, a drifting clock, a stuck register: the software must detect it and put the device in a safe state.

Remote update

An interrupted update must neither brick the device nor open a security hole.

Access and passwords

No password shared by every device, encrypted links, validated inputs.

Loss of network

Without internet or app, the device must keep working safely.

Hand adjusting a connected thermostat whose display shows the Wi-Fi connection is lost

Device software is most often written in C and C++ on microcontrollers. It talks to gateways, online services and mobile apps written in other languages.

Functional safety

When a control can become dangerous

IEC 60730-1 covers automatic electrical controls for household use. It classifies their software into three classes.

ClassRole of the software
Class AFunctions not related to safety, such as a room thermostat.
Class BFunctions intended to prevent unsafe operation, such as the door lock of a washing machine or a thermal cut-out.
Class CFunctions intended to prevent special hazards, such as a burner control or the thermal cut-out of a closed water heater.

In classes B and C, the software must detect microcontroller failures: registers, program counter, interrupts, clock, RAM and ROM. These self-tests run at start-up and during operation. IEC 60335-1, safety of household appliances, refers to IEC 60730-1 for the evaluation of this software.

Cybersecurity

When the device is connected to the internet

Three European texts follow on from one another and overlap.

Radio Equipment Directive

Since 1 August 2025, Delegated Regulation (EU) 2022/30 requires internet-connected radio equipment to protect the network, personal data and privacy, and to guard against fraud. The harmonised standards EN 18031-1, -2 and -3 provide the means of compliance.

Cyber Resilience Act

Regulation (EU) 2024/2847 applies to all products with digital elements. Since 11 September 2026, manufacturers must report actively exploited vulnerabilities and severe incidents: early warning within 24 hours, notification within 72 hours. Its other obligations apply from 11 December 2027.

ETSI EN 303 645

The baseline reference for consumer IoT security: no universal default passwords, management of vulnerability reports, software updates, secure communication, software integrity, input validation…

The Cyber Resilience Act takes over the cybersecurity requirements of the Radio Equipment Directive. See Software composition and Cyber Resilience Act and IEC 62443.

On the code side

What this means for the code

Code coverage

Show that the tests have executed the self-tests, the safe-state transitions and the fallback paths, including those that only a failure triggers. See the code coverage guide.

Coding rules and static analysis

MISRA C and MISRA C++, detection of overflows and unvalidated inputs before they become security holes. See the MISRA and static analysis guides.

Components and vulnerabilities

Knowing the open-source libraries and components of each version, and their known vulnerabilities: the basis of the reporting required by the Cyber Resilience Act.

Long-term tracking

A device is updated for years: each version must keep the quality and security level of the previous ones.

Testwell CTC++

Measuring coverage, from the device to the app

Testwell CTC++ measures the coverage of C and C++ code, from function coverage to MC/DC, on the device's microcontroller as well as on the host, with a low instrumentation overhead: it shows, condition by condition, the error paths that the tests never took.

Testwell CTC++ →
Testwell CTC++ or gcov? →

For desktop applications too1 min 18 s · silent animation
TiCS

Tracking the quality and security of all the code

TiCS brings together in the same dashboard the results of the analyzers on the code of the device, the gateway and the app: coding rules, vulnerabilities, complexity, coverage. It checks each change before integration, and tracks the level of each version. TIOBE's software composition analysis inventories the components and produces the SBOM.

TiCS →
Software composition and CRA →

From the developer's workstation to CI1 min 36 s · silent animation

Measure the code coverage of your devices

A free trial of Testwell CTC++ on your own C or C++ code, on the host or on the embedded target.

Free trial →

Software composition and CRA  ·  IEC 62443  ·  Code coverage  ·  MISRA  ·  Static analysis  ·  Sectors

Sources: IEC 60730-1; IEC 60335-1; Delegated Regulation (EU) 2022/30; EN 18031-1, -2 and -3; Regulation (EU) 2024/2847 (Cyber Resilience Act); ETSI EN 303 645.

Photos: Jakub Żerdzicki, HUUM (Unsplash).