1-Wire
1-Wire with Temperature Sensors on Calaos
Introduction
1-Wire is a communication protocol developed by Dallas Semiconductor (now Maxim Integrated) that allows communication between a master (such as a microcontroller or computer) and multiple 1-Wire devices using a single data wire, plus a ground connection. The protocol is often used for temperature sensors like the DS18B20, which provide accurate and affordable measurements.
The DS9490R USB gateway allows connecting a 1-Wire network to a system like Calaos for temperature monitoring, using 1-Wire sensors such as DS18B20.
Prerequisites
DS9490R Adapter: A USB adapter to connect the 1-Wire network to a Calaos server.

DS18B20 Sensors: 1-Wire compatible temperature sensors.
These sensors can be wired in two ways: powered mode (3 wires) or parasite mode (2 wires, power via the data line).
Types of Sensors
- Wired Model: The sensor is enclosed in a waterproof stainless steel casing. It has 3 wires:
- Red wire: Power (5V). Labeled VDD, VCC, V+ in documentation.
- Yellow wire: 1-Wire data.
- Black wire: GND, 1-Wire ground (0V).
- Bare Model:
Wiring
Powered Mode
In this mode, the DS18B20 sensor uses a dedicated power supply in addition to the data line and ground:
- Data (DQ): Connected to the 1-Wire data line.
- Power (Vdd): Connected to a 3.3V or 5V power supply.
- Ground (GND): Connected to the common ground.
This mode is recommended because it provides more stable communication, especially over longer distances.
Parasite Mode
In parasite mode, the DS18B20 sensor uses the data line for power, eliminating the need for the Vdd connection:
- Data (DQ): Connected to the 1-Wire data line.
- Ground (GND): Connected to the common ground.
This mode is easier to wire but may be less reliable, especially over long distances or with multiple sensors.
DS9490R Wiring
Sensor Identification
Once your 1-Wire sensors are properly connected to the DS9490R adapter, you will need to retrieve the unique IDs of the sensors to assign them to specific rooms.
It is recommended to connect the sensors one by one and retrieve their unique ID once the new sensor is connected. This will help avoid confusion with the IDs in case multiple sensors are connected.
Scanning Sensors
In Calaos-OS, the calaos_1wire tool is used to scan the 1-Wire bus to list the sensors and their temperatures.
Note: You need to temporarily stop the
calaos-serverservice to scan the bus. Both cannot run at the same time, andcalaos_1wirewill return an error.
In the terminal, use the following command:
The
-uoption tells the tool to use the USB gateway. If you are using another gateway, you will need to use a different connection option. Refer to the OWFS documentation in that case.
This command will return the unique addresses of the connected sensors, in the form of a unique identification number (ID) for each sensor. Note these IDs as they will be necessary for adding them in Calaos Installer.
Example:
28.74DDB4040000for the first sensor.
Adding Sensors in Calaos Installer
To add a temperature sensor in Calaos Installer, simply provide the sensor’s ID and the connection option to the 1-Wire gateway (in this case -u in the example for the DS9490R gateway).





