reef-pi / reef-pi

An opensource reef tank controller based on Raspberry Pi
http://reef-pi.com
Other
396 stars 132 forks source link

DS1820(not B) not regonised as temperature sensor #1980

Open zajc3w opened 1 year ago

zajc3w commented 1 year ago

I have a bunch of DS1820(without B) they do appear in /sys/bus/w1/devices/ as 10-xxxxxxxx It would be nice to be able to use them...

ranjib commented 1 year ago

Reef-pi temperature driver is only builds for ds18b20 , hence it detects sensor based on 28-xxxx pattern. Can you cat the 10-xxx files, if the content is similar then we need less work to support this, otherwise we have to do more work On Mon, Nov 28, 2022 at 9:13 AM Sasquatch @.***> wrote:

I have a bunch of DS1820(without B) they do appear in /sys/bus/w1/devices/ as 10-xxxxxxxx It would be nice to be able to use them...

— Reply to this email directly, view it on GitHub https://github.com/reef-pi/reef-pi/issues/1980, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACNHERFXK7F7GWHNJYSS73WKTR35ANCNFSM6AAAAAASNSEBDE . You are receiving this because you are subscribed to this thread.Message ID: @.***>

zajc3w commented 1 year ago

Only difference is lack of parasite power capability and lower resolution.

It has the same registers as 18b20 just 9 bit/0.5 Celsius resolution. When read using Arduino like 18b20 without code changes it reads correctly, only in 0.5deg ncrememts.

I'll cat the 10-xxxxxx files later today.

1820:

guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ ls alarms driver ext_power hwmon name subsystem uevent conv_time eeprom_cmd features id power temperature w1_slave guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat alarms 70 75 guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat ext_power 1 guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat name 10-0008014a1cee guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat uevent DRIVER=w1_slave_driver W1_FID=10 W1_SLAVE_ID=0000000000000008014A1CEE guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat conv_time 750 guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat eeprom_cmd cat: eeprom_cmd: Permission denied guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat features 0 guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat id ��guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat temperature 18437 guru@reef-pi:/sys/bus/w1/devices/10-0008014a1cee $ cat w1_slave 25 00 4b 46 ff ff 06 10 08 : crc=08 YES 25 00 4b 46 ff ff 06 10 08 t=18375

18B20:

guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ ls alarms eeprom_cmd hwmon power temperature conv_time ext_power id resolution uevent driver features name subsystem w1_slave guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat alarms 70 75 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat eeprom_cmd cat: eeprom_cmd: Permission denied guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat temperature 18375 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat conv_time 750 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat ext_power 1 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cad id -bash: cad: command not found guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat id (�� yguru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat resolution 12 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat uevent DRIVER=w1_slave_driver W1_FID=28 W1_SLAVE_ID=0000000000000000010AF9B7 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat features 0 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat name 28-0000010af9b7 guru@reef-pi:/sys/bus/w1/devices/28-0000010af9b7 $ cat w1_slave 26 01 4b 46 7f ff 0a 10 64 : crc=64 YES 26 01 4b 46 7f ff 0a 10 64 t=18375

Apart from resolution file and prefix(10 vs 28) I see no difference, even temperature reported is identical. 1820 is a grandpa(bought them in 2003 as obsolete, lol) then there was 18s20, also 10 family code and 9 bit resolution but with parasite power capability.

TheRealFalseReality commented 1 year ago

If the arduino reads it without any changes in the code, then it may be an easy addition, makes me wonder how ReefPi works!

zajc3w commented 1 year ago

Looking at files above i's going to be 1-2 liner fix, I spent 30 minutes browsing the code to find 1 wire driver part to no avail or I would fix it myself... I dropped Reef-PI anyway in my own reef, I'm going with homebrew solution based on domoticz, arduino and mysensors I can control and modify easily to my liking.

TheRealFalseReality commented 1 year ago

I Kinda doing both using ReefPi as a jumping off point.

Looking at files above i's going to be 1-2 liner fix, I spent 30 minutes browsing the code to find 1 wire driver part to no avail or I would fix it myself... I dropped Reef-PI anyway in my own reef, I'm going with homebrew solution based on domoticz, arduino and mysensors I can control and modify easily to my liking.