-
Notifications
You must be signed in to change notification settings - Fork 0
tutorials
What is a 1-Wire Network?
A 1-Wire network is a simple data communication network that allows data transmission to occur over one wire (hence the name.) Most simply, there are two primary network topologies that can be used—star networks and bus networks (Ring networks are not supported for 1-Wire networks. If a ring network is used, no data will be received).

My personal research has found that bus networks tend to be the preferred topology as bus networks reduce the potential for network collisions and data errors (there is a type of star network—a switched star network—which is supported; however, switched networks are beyond the scope of this tutorial).
Actually Wiring your 1-Wire Network
As with most things, there is more than one way to wire a 1-Wire network. I make no claims that my way is best; all I
can say is that it has proved to be very successful and trouble free for me. There is also more than one style of cable
that will work, I chose to use twisted-pair Category 5 Ethernet cable (Cat-5) for my backbone. To keep things simple,
I also decided to isolate the downstream part of my 1-Wire network and opted for dedicated wiring. The network itself
requires 3 wires—positive, ground and data. I chose to use an old wiring standard, but honestly (for the most part) it
doesn’t really matter what you choose as long as you stick with it.
My wiring schema is:
| Wire | Color |
|---|---|
| Positive | Orange |
| Ground | Blue |
| Data | Blue with White Stripe |
The most important thing to keep in mind is that you need to leave the wires twisted, and to always keep the ground wire and the data wire in the same twisted pair. On the server end of your wiring, you will need an RJ-12 jack (which I sourced from Monoprice.) Note: the RJ-12 schema in the image below is seen with the pins facing away from you—you’re looking at the end the wire goes into.
In reading about 1-Wire networks online, you may read about a need for a pull-down resistor that some 1-Wire networks may require; if you choose to use the OWS, it has this feature built-in so you needn't worry about that.

PRO TIP:
Make sure that your data wire is in the same twisted pair as your ground wire. Most importantly, do not use a data wire
that is in the same twisted pair as the positive wire.
The other ‘end’ of the channel wiring is where your sensor(s) will go. I started simply, with nothing but Dallas/Maxim DS18B20 temperature sensors which I sourced off eBay. The bonus with this approach is that these things are cheap! The DS18B20 has three leads corresponding to the three wires on the 1-Wire circuit. I soldered the wires to the sensor leads, isolated them electrically, and then covered the entire thing in shrink tubing. Some people choose to be even fancier and create “modular” network topologies there they use RJ-12 connectors at every sensor terminus—-which has the added bonus of making it easy to replace inline sensors should the need arise. Rather than use this approach, I chose to leave a bit of slack wire at each sensor so that there would be sufficient wire should I need to cut and replace a sensor. I chose this approach primarily because I feel that this method makes the junctions less prone to lose connections—-and helps to minimize data transmission errors. Place your sensor(s), insert the RJ-12 jack into the appropriate channel jack on the OWS and apply power (this tutorial does not go into the steps to configure the OWS itself; that information can be found in the OWS user manual). Head to your favorite browser and enter the following URL: http://your_ows_server_ip/details.xml
PRO TIP:
I recommend installing sensors one at a time—-especially if you are using multiples of the same type of sensor. It makes
identifying them in the system a lot easier.
If everything went well, you should see a result that looks something like this:
<?xml version="1.0" encoding=“UTF-8"?>
<Devices-Detail-Response xmlns="http://www.embeddeddatasystems.com/schema/owserver" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <PollCount>378237</PollCount>
<DevicesConnected>21</DevicesConnected>
<LoopTime>2.012</LoopTime>
<DevicesConnectedChannel1>1</DevicesConnectedChannel1>
<DevicesConnectedChannel2>2</DevicesConnectedChannel2>
<DevicesConnectedChannel3>3</DevicesConnectedChannel3>
<DataErrorsChannel1>1</DataErrorsChannel1>
<DataErrorsChannel2>2</DataErrorsChannel2>
<DataErrorsChannel3>3</DataErrorsChannel3>
<VoltageChannel1>4.71</VoltageChannel1>
<VoltageChannel2>4.72</VoltageChannel2>
<VoltageChannel3>4.73</VoltageChannel3>
<VoltagePower>4.95</VoltagePower>
<DeviceName>OWServer_v2-Enet</DeviceName>
<HostName>EDSOWSERVER2</HostName>
<MACAddress>00:00:00:00:00:00</MACAddress>
<owd_DS18B20 Description="Programmable resolution thermometer"> <Name>DS18B20</Name>
<Family>28</Family>
<ROMId>1C000003C24D4528</ROMId>
<Health>7</Health>
<Channel>1</Channel> <RawData>3F014B467FFF01107AFF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000</RawData>
<PrimaryValue>19.9375 Deg C</PrimaryValue>
<Temperature Units="Centigrade">21.9375</Temperature>
<UserByte1 Writable="True">71</UserByte1>
<UserByte2 Writable="True">70</UserByte2>
<Resolution>12</Resolution>
<PowerSource>255</PowerSource>
</owd_DS18B20>
If you see an XML return similar to this one, you are successfully communicating with your 1-Wire sensors. Now you are ready to either add more sensors to your 1-Wire network, or link your 1-Wire network to Indigo with the OWServer Plugin. Note the ROMId value in the XML return above. This value is what you will use to identify the sensor within the OWServer plugin framework. The OWS (Rev. 2) has three data ports that correspond to three data channels.
PRO TIP:
Make a map of your sensor network or place labels at each sensor location that displays the corresponding ROMId.
I chose to assign the three channels so that they would correspond to “levels” within my house:
| Channel | Description |
|---|---|
| Channel 3 | Second Floor and Attics |
| Channel 2 | First Floor |
| Channel 1 | Basement and Outdoors |
Copyright DaveL17 2023
This plugin is distributed under the MIT license; however the author reserves the right to change the license at any
time.