Get sensor readings from OW-SERVER

I have an OW-SERVER to gather data from my OneWire sensors. I would like for HA to pick up the sensor readings from tne OW-SERVER but I am not sure how.

The OW-SERVER does support publishing them as XML (see below) or sending them as a POST-call. It can also open a TCP server exposing the 1-wire interface.

Any ideas on what route would be the easiest to take in this case? I am a HA newbie.

<?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>5771</PollCount>
<DevicesConnected>8</DevicesConnected>
<LoopTime>6.965</LoopTime>
<DevicesConnectedChannel1>4</DevicesConnectedChannel1>
<DevicesConnectedChannel2>1</DevicesConnectedChannel2>
<DevicesConnectedChannel3>3</DevicesConnectedChannel3>
<DataErrorsChannel1>7</DataErrorsChannel1>
<DataErrorsChannel2>1</DataErrorsChannel2>
<DataErrorsChannel3>6</DataErrorsChannel3>
<VoltageChannel1>4.66</VoltageChannel1>
<VoltageChannel2>4.62</VoltageChannel2>
<VoltageChannel3>4.64</VoltageChannel3>
<VoltagePower>4.87</VoltagePower>
<DeviceName>OWServer_v2-Enet</DeviceName>
<HostName>EDSOWSERVER2</HostName>
<MACAddress>00:04:A3:C1:47:CC</MACAddress>
<DateTime>2019-02-21 08:57:21</DateTime>
<owd_DS18S20 Description="Parasite power thermometer">
<Name>DS18S20</Name>
<Family>10</Family>
<ROMId>340008022A1DEF10</ROMId>
<Health>7</Health>
<Channel>1</Channel>  
<RawData>48004B46FFFF0E10E30000000000</RawData>
<PrimaryValue>36.0000 Deg C</PrimaryValue>
<Temperature Units="Centigrade">36.0000</Temperature>
<UserByte1 Writable="True">75</UserByte1>
<UserByte2 Writable="True">70</UserByte2>
</owd_DS18S20>
<owd_DS2423 Description="RAM with counters">
<Name>DS2423</Name>
<Family>1D</Family>
<ROMId>4000000012B5AC1D</ROMId>
<Health>7</Health>
<Channel>1</Channel>
<RawData>0116060000000000BFFA0100000000000000294E00000</RawData>
<PrimaryValue>398849, 1</PrimaryValue>
<Counter_A>398849</Counter_A>
<Counter_B>1</Counter_B>
</owd_DS2423>
<owd_DS18S20 Description="Parasite power thermometer">
<Name>DS18S20</Name>
<Family>10</Family>
<ROMId>560008022A0D0E10</ROMId>
<Health>7</Health>
<Channel>2</Channel>
<RawData>0D004B46FFFF06108A00000000000000000000000000000</RawData>
<PrimaryValue>6.5000 Deg C</PrimaryValue>
<Temperature Units="Centigrade">6.5000</Temperature>
<UserByte1 Writable="True">75</UserByte1>
<UserByte2 Writable="True">70</UserByte2>
</owd_DS18S20>
</owd_DS18S20>
</Devices-Detail-Response>

Hi, did you solve this? I have a couple of OW-Servers aswell and would be great to intergrate them to Home Assistant, i have had them working well with VERA with the OW-SERVER plugin for VERA (Micasaverde)

Sorry, I was kind of hoping that someone else had already figured this out. :slight_smile:

But my next try for this will be to poll individual sensor data using a RESTful sensor.
It is not very well documented but you can poll individual sensor data from the OW-SERVER using the following syntax: http://owserver.local/gettag.csv?romid=FA0008022A1B3610&tag=Temperature&title=0
You can add more tags if you feel like it.

So next thing is to make this work as a RESTful sensor.

Hi, i figured out how to use ow-server yesterday.
Use SNMP sensor and SNMP Switch to read sensors and control/read values of 1-wire devices connected to ow-server since it has SNMP.
Works well and hass has native support for SNMP.

SNMP Switch
https://www.home-assistant.io/components/switch.snmp/https://www.home-assistant.io/components/switch.snmp/

SNMP sensor

1 Like

That worked just great, thanks!!!

Hello, where did you find baseoid for owserver ???

Tks for your help.
Arnaud

I used some kind of SNMP-browser, it took me a while though. You might get helped by my configuration:

sensor:
  - platform: snmp
    name: ow_boiler_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.6.1.1.1
    scan_interval: 30

  - platform: snmp
    name: ow_boiler_out_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.6.1.1.2
    scan_interval: 30

  - platform: snmp
    name: ow_outside_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.6.1.1.5
    scan_interval: 1800

  - platform: snmp
    name: ow_pool_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.5.1.1.10
    scan_interval: 600

  - platform: snmp
    name: ow_pool_techroom_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.6.1.1.6
    scan_interval: 600

  - platform: snmp
    name: ow_kitchen_temp
    host: 192.168.10.31
    baseoid: 1.3.6.1.4.1.31440.10.6.1.1.7
    scan_interval: 600

Note that the “ow_pool_temp” has a slightly different baseoid than the rest, I think it is because it is a different type of device (DS18B20 instead of DS18S20).

I’d suggest anyone polling the OW-SERVER-ENET-2 or OW-SERVER-WiFi-2G via SNMP to lock the sensor order through the OW-SERVER’s web interface. The Lock Order will prevent the OIDs of a sensor from changing following power cycles. You can lock the order with the following steps:
Connect all the 1-Wire sensors to the OW-SERVER (if you add additional sensors repeat these steps)
Go to OW-SERVER’s web interface
Select System Configuration>Lock Order
Click the link “To set the lock order”

1 Like

Thanks David, this was great information to get since I had just this issue a while back and didn’t know about the feature. I had to remap some of my sensors which was a bit of a hassle.

That box you built is amazing, it just keeps on working day in and day out :wink:

I’m currently moving to Home Assistant. I figured out a better solution for me and want to share it:

  • Make sure you have the current firmware for OW-SERVER-ENET-2, at least 2.11, see OWFS-Hint
  • Open the Low-Level-Onewire-Interface on the OW-SERVER-ENET-2 under System Configuration --> 1-wire Interface
  • Create an OWFS-Server. As my Home Assistant is a docker instance, I used roobbb/owserver
  • Create a config file (see below) and make the folder where it resides available as /root/.local/share
  • You can test the OWFS-Server now using the HTTP-Access, e.g. on http://localhost:2121
  • Now add the 1-wire-Integration in Home Assistant. For me, the predefined localhost and port were just fine
  • Unfortunately, not all devices are supported (I have one out of 20 which is not), see 1-Wire-Integration documentation of Home Assistant
######################## SOURCES ########################
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = 127.0.0.1:4304
# owserver tcp address - the "enet" is the key for OW-SERVER-ENET-2
server: enet = 192.168.2.100:8080
# random simulated device
#server: FAKE = DS18S20,DS2405
######################### OWFS ##########################
mountpoint = /mnt/1wire
allow_other
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
server: port = 4304

I also use the great 1-wire device OW-SERVER-ENET-2
it is easy to query with rest

rest:
  resource: "http://192.168.1.12/details.xml"
  scan_interval: 180
  sensor:
    - name: "1 wire EDS"
      unique_id: "owserver1"
      value_template: "{{ value_json['Devices-Detail-Response']['HostName']}}"
      force_update: true
      json_attributes_path: "$.['Devices-Detail-Response']"
      json_attributes:
        - MACAddress
        - DeviceName
        - VoltagePower
        - DateTime
        - LoopTime
        - PollCount
        - DevicesConnected
        - DevicesConnectedChannel1
        - DevicesConnectedChannel2
        - DevicesConnectedChannel3
        - VoltageChannel1
        - VoltageChannel2
        - VoltageChannel3
        - DataErrorsChannel1
        - DataErrorsChannel2
        - DataErrorsChannel3

    - name: "Temperatur Außen Nord"
      unique_id: owserver1.temp.aussen.nord
      value_template: "{{ (value_json['Devices-Detail-Response']['owd_DS18B20'] | selectattr('ROMId','==','A2000002CC54D928') | list | first)['Temperature']['#text'] | round(1) }}"
      force_update: true
      device_class: temperature
      unit_of_measurement: "°C"
      json_attributes_path: "$.['Devices-Detail-Response']['owd_DS18B20'][?(@.ROMId =='A2000002CC54D928')]"
      json_attributes:
        - Channel
        - Health
        - ROMId

    - name: "Temperatur Außen Süd direkt"
      unique_id: owserver1.temp.aussen.sued.direkt
      # alternative Art den Wert zu lesen
      value_template: >
        {% for x in value_json['Devices-Detail-Response']['owd_DS18B20'] %}
          {% if x['ROMId'] == '6F00000CA7AEC528' %}
            {{ x['Temperature']['#text'] | round(1)}}
          {% endif %}
        {% endfor %}
      force_update: true
      device_class: temperature
      unit_of_measurement: "°C"
      json_attributes_path: "$.['Devices-Detail-Response']['owd_DS18B20'][?(@.ROMId =='6F00000CA7AEC528')]"
      json_attributes:
        - Channel
        - Health
        - ROMId

    - name: "Temperatur Außen Süd"
      unique_id: owserver1.temp.aussen.sued
      value_template: "{{ (value_json['Devices-Detail-Response']['owd_DS18B20'] | selectattr('ROMId','==','2600000CA6A7D728') | list | first)['Temperature']['#text'] | round(1) }}"
      force_update: true
      device_class: temperature
      unit_of_measurement: "°C"
      json_attributes_path: "$.['Devices-Detail-Response']['owd_DS18B20'][?(@.ROMId =='2600000CA6A7D728')]"
      json_attributes:
        - Channel
        - Health
        - ROMId

    - name: "Temperatur Teich"
      unique_id: owserver1.temp.teich
      value_template: "{{ (value_json['Devices-Detail-Response']['owd_DS18B20'] | selectattr('ROMId','==','8400000FD6022B28') | list | first)['Temperature']['#text'] | round(1) }}"
      force_update: true
      device_class: temperature
      unit_of_measurement: "°C"
      json_attributes_path: "$.['Devices-Detail-Response']['owd_DS18B20'][?(@.ROMId =='8400000FD6022B28')]"
      json_attributes:
        - Channel
        - Health
        - ROMId