cues
October 23, 2020, 2:22pm
1
Am I missing some configuration or what, cannot figure this out. I have two systems reading temperature, the other reads straight from /sys/bus/w1/devices/sensorid/temperature (domoticz), the other uses owserver (homeassistant). The one reading from /sys/bus/w1 gets correct temperatures, the one using owserver gets 85. Checkin if I should start using home assistant instead of domoticz, that’s why I’m running both, on same RPi, so hw setup is exactly the same.
owfs.conf
server: w1 = all
server: port = localhost:4304
nothing special there.
reading temperature from /sys/bus, 14.437C, correct
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/28-000001711d8a/temperature
14437
And testing with python, it gets 85, the same that home assistant keeps telling me the temp is…
pi@raspberrypi:~ $ python 1wiretest.py
Address: 288A1D7101000027
Temperature: 85
Type: DS18B20
Same hardware, same pi, same exact os, same exact settings, home assistant running on docker.
cues
October 23, 2020, 3:01pm
2
As a workaround, added my 1-wire sensors like this
- platform: command_line
name: Varasto
command: "cat /sys/bus/w1/devices/28-000001711d8a/temperature"
unit_of_measurement: "°C"
value_template: '{{ value | multiply(0.001) | round(1) }}'
scan_interval: 300
But if anyone has a clue what is going on with owserver/homeassistant I’d be happy to switch over to proper implementation.
TCr82
(Thomas)
November 15, 2023, 10:54pm
3
I found the same problem and reported it to github.
opened 10:23PM - 15 Nov 23 UTC
Hi,
I discovered some strange behavior with owserver and w1 driver as source.… First of all, the sensor works when I query the kernel driver:
```
thomas@rpitemp:~ $ cat /sys/devices/w1_bus_master1/28-0000034a5a5d/temperature
19375
thomas@rpitemp:~ $ cat /sys/devices/w1_bus_master1/28-0000034a5a5d/w1_slave
37 01 4b 46 7f ff 09 10 26 : crc=26 YES
37 01 4b 46 7f ff 09 10 26 t=19437
```
But when I query with owserver/owfs/owhttp I get different value:
```
thomas@rpitemp:~ $ echo `owread -C /28.5D5A4A030000/temperature`
85
thomas@rpitemp:~ $ echo `cat /mnt/1wire/28.5D5A4A030000/temperature`
85
thomas@rpitemp:~ $ echo `cat /mnt/1wire/settings/units/temperature_scale`
C
```
My config is quite simple:
```
######################## SOURCES ########################
#
# With this setup, any client (but owserver) uses owserver on the
# local machine...
! server: server = localhost:4304
#
# ...and owserver uses the real hardware, by default fake devices
# This part must be changed on real installation
#server: FAKE = DS18S20,DS2405
#
# USB device: DS9490
#server: usb = all
#
# Serial port: DS9097
#server: device = /dev/ttyS1
#
# owserver tcp address
#server: server = 192.168.10.1:3131
#
# random simulated device
#server: FAKE = DS18S20,DS2405
#
server: w1
######################### OWFS ##########################
#
mountpoint = /mnt/1wire
allow_other
#
####################### OWHTTPD #########################
http: port = 2121
####################### OWFTPD ##########################
ftp: port = 2120
####################### OWSERVER ########################
#server: port = localhost:4304
server: port = 4304
# Set Unit global
Celsius
```
Some system info:
```
thomas@rpitemp:~ $ lsmod | grep w1
w1_therm 28672 0
w1_gpio 16384 0
wire 49152 2 w1_gpio,w1_therm
thomas@rpitemp:~ $ modinfo w1_gpio
filename: /lib/modules/6.1.61-v8+/kernel/drivers/w1/masters/w1-gpio.ko.xz
license: GPL
author: Ville Syrjala <[email protected] >
description: GPIO w1 bus master driver
srcversion: 89D33780A3861BE22B688C6
alias: of:N*T*Cw1-gpioC*
alias: of:N*T*Cw1-gpio
depends: wire
intree: Y
name: w1_gpio
vermagic: 6.1.61-v8+ SMP preempt mod_unload modversions aarch64
thomas@rpitemp:~ $ uname -r
6.1.61-v8+
thomas@rpitemp:~ $ lsb_release -d 2>/dev/null
Description: Debian GNU/Linux 12 (bookworm)
thomas@rpitemp:~ $ dpkg -l | grep owserver
ii owserver 3.2p4+dfsg1-4.1+b1 arm64 Backend server for 1-Wire control
```
Any idea whats wrong?
Hope the maintainers pick it up…