Not even sure where the mount_dir is located. None of this is listed on the sensor page of HA. I found all these things from other forums and posts.
Is this correct??? Is the mount_dir correct? I added dtoverlay = w1-gpio, gpiopin = 4, pullup = on
I have no idea what the 3 variables should be set to.
I get this error when I start up HA after rebooting: ERROR (Thread-3) [homeassistant.components.sensor.onewire] No onewire sensor found. Check if dtoverlay=w1-gpio is in your /boot/config.txt. Check the mount_dir parameter if it's defined.
How do I know what GPIO Pin I am using or that I am supposed to use? When I type:
ls -l /sys/bus/w1/devices/
I get:
(homeassistant_venv) pi@raspberrypi:~ $ ls -l /sys/bus/w1/devices/ total 0 lrwxrwxrwx 1 root root 0 Nov 8 02:12 00-320800000000 -> ../../../devices/w1_bus_master1/00-320800000000 lrwxrwxrwx 1 root root 0 Nov 8 02:12 00-520800000000 -> ../../../devices/w1_bus_master1/00-520800000000 lrwxrwxrwx 1 root root 0 Nov 8 02:12 00-d20800000000 -> ../../../devices/w1_bus_master1/00-d20800000000 lrwxrwxrwx 1 root root 0 Nov 8 02:12 w1_bus_master1 -> ../../../devices/w1_bus_master1
Is that correct? I have a serial gateway set up, a motion sensor, and a Dallas Temperature sensor set up on a RPi3. I also am getting a correct reading in the serial monitor and in HA but the error still shows when I start HA. Its weird…
That command will printout GPIO states
it also shows pinout for RPi
I assume you have RPi 2 or 3
you should connect DS18B20 data connection to GPIO.7 (physical pin 7).
Be aware that connection guides show this as BCM 4 in some cases.
you should have 4.7K ohm resistor connected between GPIO7 and 5VDC.
The result you show means Sensor is not communicating. Usually caused by having it connected on incorrect pin.
EDIT
for some reason many guide say connect to GPIO4 but they are meaning BCM4 (GPIO7).
I connected GPIO4 then realized the guides I reference were incorrect. Use the command above to determine pinout configuration and try to connect as I suggest.
After connect in this manner rerun the dtoverlay command from before. The 00-xxxx should change to 28-xxxx.
I have the onewire connected to D3 on a NANO based on what MySensors.org said to do with a 4.7k ohm resistor on a Pi 3 and in the serial monitor reports the correct output with a temp reading that is correct. I only get the error when I start HA and then I never see it again. Maybe its the order I have the sensor in my configuration.yaml file. I load the Serial Gateway before any of my sensors though… Do you want me to post my config file?
There are 3 methods to enable the one wire sensor in raspberry.
The third method is what you did. If you think it is easier follow number 2.
Read this article:
Then check your wiring. Your problem could be the sensor disconnected from the pi. If not disconnected, then it could have failed… Do you have another sensor to check? Preferably a new one.
After un-plug and plug-it back and restart of HA it start working… but it will work for about 24 hours and after some time it will loose connection…
I strongly recommend using a resistor. A 4.7K should be fine.
I have 4 ds18b20 sensors and I am using at least 10meter long cables for each of them. I have them on 5v pin but I am using a resistor. I had too many problems at random times when I did not use the resistor.
I am not sure if that is your problem, but it is worth a try. Nothing else comes in my mind, so I am not sure if I can help you further…