craftbeerpi / craftbeerpi4

GNU General Public License v3.0
133 stars 83 forks source link

No DS18b20 Onewire sensors being listed #122

Open stamandster opened 5 months ago

stamandster commented 5 months ago

EDIT: I found that https://github.com/craftbeerpi/craftbeerpi4/blob/master/cbpi/extension/onewire/config.yaml is showing name as "DummySensor" instead of "OneWire". Changing this to OneWire allowed only a single sensor to show up, oddly. Numerically it's the first one, if that means anything for the array.

chris@brewpi:~/.local/pipx/venvs/cbpi4/lib/python3.11/site-packages/cbpi/extension/onewire $ sudo nano config.yaml

Afternoon, I followed the latest CBPI4 Gitbook for setting up server. Everthing was going well until attempting to load the DS18b20 sensors. I have 4 setup (and tested with an arduino) on onewire using 3v3, GPIO4 and GND. For whatever reason, CBPI is unable to see any sensors. I tried re-enabling Onewire in the raspi-config and restarting CBPI, no avail. I tried to move to another GPIO pin and nothing. I don't see anything glaring in the logs using the 20 parameter and it looks to be loading onewire plugin. Just at a loss as to what to do. I followed the directions of removing the python3-RPi.GPIO as I'm using a RPI4. The installed server is Serverversion: 4.4.0 - Codename: Yeast Starter || GUIversion: 0.3.13.

Also performed some additional testing and confirmation, connecting a relay works fine and I can via data from a sensor via bus command so I know it's not a GPIO Pin issue.

chris@brewpi:~ $ cbpi onewire --setup
--------------------------
Welcome to CBPi 4.4.0
--------------------------
config folder path :   ./config
logs folder path   :   /home/chris/logs
*******************************
Debug-log-level is 30
*******************************
Setting up 1Wire
/boot/config.txt created
chris@brewpi:~ $ pipx runpip cbpi4 uninstall RPI-GPIO
WARNING: Skipping RPI-GPIO as it is not installed.
chris@brewpi:~ $ pipx runpip cbpi4 install RPI-LGPIO
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: RPI-LGPIO in ./.local/pipx/venvs/cbpi4/lib/python3.11/site-packages (0.6)
Requirement already satisfied: lgpio>=0.1.0.1 in /usr/lib/python3/dist-packages (from RPI-LGPIO) (0.2.2.0)

I'm able to see data from a sensor via


chris@brewpi:~ $ cd /sys/bus/w1/devices/
28-0d4c26015000/ w1_bus_master1/  
chris@brewpi:~ $ cd /sys/bus/w1/devices/
chris@brewpi:/sys/bus/w1/devices $ cd /sys/bus/w1/devices/28-0d4c26015000
chris@brewpi:/sys/bus/w1/devices/28-0d4c26015000 $ ls
alarms     eeprom_cmd  hwmon  power       temperature
conv_time  ext_power   id     resolution  uevent
driver     features    name   subsystem   w1_slave
chris@brewpi:/sys/bus/w1/devices/28-0d4c26015000 $ cat w1_slave 
2f 01 4b 46 7f ff 01 10 2e : crc=2e YES
2f 01 4b 46 7f ff 01 10 2e t=18937
chris@brewpi:/sys/bus/w1/devices/28-0d4c26015000 $ 

Then I added a second sensor, and that is showing up also.

chris@brewpi:/sys/bus/w1/devices $ ls
28-0d4c26015000  28-0d4c26645100  w1_bus_master1

So I have no idea why it's not populating into the list in the hardware tab.