You are not logged in.
Pages: 1
Topic closed
I don't seem to be able to get the OW Temp sensor working.
if I log into the Pi, I can see the sensor however I get an error when trying to read the temperature
pi@raspberrypi:~ $ ls /sys/bus/w1/devices
10-000802e6f12a w1_bus_master1
pi@raspberrypi:~ $ owread /10-000802e6f12a/temperature12
ServerRead: Data error on /10-000802e6f12a/temperature12
pi@raspberrypi:~ $
Offline
Hello Darren,
did you install "owserver"? See OW Driver documentation and go through - hope you will find some valuable information for you.
If you have any further question, feel free to let us know.
Good luck, Tomas
Offline
Hello again,
I asked my colleague about your OW issue and he advised to read the temperature this way:
owread /10.2af1e6020800/temperature12
(it is the ID you get by ls /.../w1/devices but written backwards by pairs)
For more information refer to Getting started with REX on Raspberry Pi - part 5.2.2 Software connection of the sensor
Have a nice day, Tomas
Last edited by jaroslav_sobota (2016-04-12 13:54:12)
Offline
Hi Tomas,
I have tried the setup on "OW Driver Documentation", however when I edit the owfs.conf to include "i2c=ALL:ALL" I get no response to the owdir command. if I change this to server: w1 as per the "getting started with Rex on Raspberry Pi" after a while I get the following response from the owdir command
/bus.1
/bus.0
/uncached
/settings
/system
/statistics
/structure
as you can see there is no ow device detected here, but if do a ls /sys/bus/w1/devices command I get the following.
pi@raspberrypi:~ $ ls /sys/bus/w1/devices
10-000802e6f12a w1_bus_master1
so I am not sure if this is working or not.
I have followed the setup step by step in the "Getting started with Rex on Raspberry Pi" chapter 5
I have tried combinations of "backwards by pairs" syntax
pi@raspberrypi:~ $ ls /sys/bus/w1/devices
10-000802e6f12a w1_bus_master1
pi@raspberrypi:~ $ owread 10-000802e6f12a
ServerRead: Data error on 10-000802e6f12a
pi@raspberrypi:~ $ owread 10.000802e6f12a
ServerRead: Data error on 10.000802e6f12a
pi@raspberrypi:~ $ owread 10-2af1e6020800
ServerRead: Data error on 10-2af1e6020800
pi@raspberrypi:~ $ owread 10.2af1e6020800
ServerRead: Data error on 10.2af1e6020800
pi@raspberrypi:~ $
still no luck
Offline
Hi Darren,
I updated the previous post with correct command. From the command line, you can read the temperature via owserver using
owread /10.2af1e6020800/temperature12
or via w1 kernel module
cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
In the REX control algorithm, you can only read data via the owserver, therefore you have to use /10.2af1e6020800/temperature12 in the 1-Wire driver configuration.
The owdir command does not work with w1 kernel module in the current version of Raspbian and this is not something we can influence. The command "freezes" for couple minutes and then returns no sensors. You can either compile newest version of owserver (OWFS), where this bug is fixed or read the device ID from /sys/bus/w1/devices/. In the latter case, NOTE the reversed order of bytes in the ID when using the two approaches to read the temperature.
Hope this helps!
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
Thanks,
I am now starting to suspect a faulty sensor as I am now getting results with both methods, however it is showing 85 degrees for both?
if I hold my finger over the sensor it still stays at 85
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
aa 00 4b 46 ff ff 0c 10 87 : crc=87 YES
aa 00 4b 46 ff ff 0c 10 87 t=85000
Offline
Hi Darren,
is your sensor powered and is it wired up correctly? 85 degrees is the startup value of the sensor, which in your case indicates that no temperature conversion was performed yet (typically due to insufficient power).
So far I was not successful setting up 1-Wire parasitic mode on the GPIO pins of Raspberry Pi.
If you have your sensor powered and still get the 85 deg reading then I would say the sensor is faulty.
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
It looks like the sensor is working, however only using kernel mode. The sensor I am using is a DS18S20-PAR which only supports parasitic power. I have edited the boot config to include pullup=yes, which has now provided consistently reliable readings in w1 kernel mode. When I try this using the owserver and I get inconsistent, unusable results.
jaroslav_sobota, I am wondering if this is similar to the results that you have had using parasitic power?
Does the owserver have compatibility issues with this model sensor?
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
ServerRead: Data error on /10.2af1e6020800/temperature12
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
ServerRead: Data error on /10.2af1e6020800/temperature12
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
ServerRead: Data error on /10.2af1e6020800/temperature12
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
ServerRead: Data error on /10.2af1e6020800/temperature12
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
85pi@rasp
pi@raspberrypi:~ $ owread /10.2af1e6020800/temperature12
ServerRead: Data error on /10.2af1e6020800/temperature12
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
2f 00 4b 46 ff ff 02 10 9f : crc=9f YES
2f 00 4b 46 ff ff 02 10 9f t=23625
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
2f 00 4b 46 ff ff 02 10 9f : crc=9f YES
2f 00 4b 46 ff ff 02 10 9f t=23625
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
2f 00 4b 46 ff ff 02 10 9f : crc=9f YES
2f 00 4b 46 ff ff 02 10 9f t=23625
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
36 00 4b 46 ff ff 10 10 df : crc=df YES
36 00 4b 46 ff ff 10 10 df t=26750
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
39 00 4b 46 ff ff 08 10 bf : crc=bf YES
39 00 4b 46 ff ff 08 10 bf t=28250
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
39 00 4b 46 ff ff 07 10 a7 : crc=a7 YES
39 00 4b 46 ff ff 07 10 a7 t=28312
pi@raspberrypi:~ $ cat /sys/bus/w1/devices/10-000802e6f12a/w1_slave
37 00 4b 46 ff ff 01 10 b4 : crc=b4 YES
37 00 4b 46 ff ff 01 10 b4 t=27687
Offline
Yes, these were the conclusions I ended up with. I recommend
switching to powered DS18B20, or
switching to dedicated 1-Wire master (I2C or USB) if you insist on using parasitic power
If neither of these is an option for you, you can write e.g. a Python script which will parse the /sys/bus/w1/... files and store the temperatures in files on a disk (preferably ramdisk/tmpfs). These can be read into REX algorithm using SILO blocks.
Hope this helps!
Monarco HAT for Raspberry Pi - Lightweight I/O for monitoring, archiving and control.
Raspberry Pi in industrial automation!
Offline
I just received the non parasitic version of the same sensor today.
After swapping this out and updating the serial number, it now works flawlessly.
Thank you so much for your expertise and advise in getting this resolved, I really appreciate it
Darren
Offline
Pages: 1
Topic closed