1Wire device not showing up
The 1 Wire Pi Plus and 1 Wire Pi Zero are a 1 Wire interface for the Raspberry Pi
23/10/2017
Posted by:
kebro
I've bought the Raspberry Pi 1Wire and I'm trying to connect it to my Raspberry Pi 3. I've gone trough the steps as described
My chip is detected I think.
Output of i2cdetect -l is: i2c-1 i2c bcm2835 I2C adapter I2C adapter.
The output of i2cdetect -y contains the number 18, as expected.
When running (sudo) python 1wiretest.py (the code provided in the tutorial) I'm getting the following error:
Traceback (most recent call last):
File "1wiretest.py", line 2, in
ow.init('localhost:4304')
File "/usr/lib/python2.7/dist-packages/ow/__init__.py", line 224, in init
raise exNoController
ow.exNoController
I'm also getting an error when booting my Raspberry Pi, telling me that my /etc/rc.local failed (this was after adding this line of code: sudo /opt/owfs/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid) I have changed it to sudo /usr/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid, since the path posted in the tutorial seems outdated, but I'm still getting the same error.
Output of systemctl status rc-local.service:
rc-local.service - /etc/rc.local Compatibility
Loaded: loaded (/lib/systemd/system/rc-local.service; static; vendor preset: enabled)
Drop-In: /lib/systemd/system/rc-local.service.d
+-debian.conf
/etc/systemd/system/rc-local.service.d
+-ttyoutput.conf
Active: failed (Result: exit-code) since Mon 2017-10-23 14:25:30 UTC; 51min ago
Process: 531 ExecStart=/etc/rc.local start (code=exited, status=203/EXEC)
Oct 23 14:25:30 raspberrypi systemd[1]: Starting /etc/rc.local Compatibility...
Oct 23 14:25:30 raspberrypi systemd[1]: rc-local.service: Control process exited, code=exited status=203
Oct 23 14:25:30 raspberrypi systemd[1]: Failed to start /etc/rc.local Compatibility.
Oct 23 14:25:30 raspberrypi systemd[1]: rc-local.service: Unit entered failed state.
Oct 23 14:25:30 raspberrypi systemd[1]: rc-local.service: Failed with result 'exit-code'.
Warning: rc-local.service changed on disk. Run 'systemctl daemon-reload' to reload units.
Running owserver and owhttpd works fine when using a fake device (server: FAKE = DS18S20,DS2405), I can see the two fake devices in my browser (localhost:2121). But when changing the line to server: device = /dev/i2c-1, I get a 'The site can't be reached, localhost refused to connect' in the browser.
Output of sudo services owserver status:
? owserver.service - LSB: 1-wire TCP server
Loaded: loaded (/etc/init.d/owserver; generated; vendor preset: enabled)
Active: active (exited) since Mon 2017-10-23 14:57:27 UTC; 22min ago
Docs: man:systemd-sysv-generator(8)
Process: 2092 ExecStop=/etc/init.d/owserver stop (code=exited, status=0/SUCCESS)
Process: 2100 ExecStart=/etc/init.d/owserver start (code=exited, status=0/SUCCESS)
CGroup: /system.slice/owserver.service
Oct 23 14:57:26 raspberrypi systemd[1]: Starting LSB: 1-wire TCP server...
Oct 23 14:57:26 raspberrypi OWFS[2106]: DEFAULT: ow_daemon.c:(144) Entered background mode, quitting.
Oct 23 14:57:26 raspberrypi OWFS[2106]: DEFAULT: owlib.c:(52) No valid 1-wire buses found
Oct 23 14:57:27 raspberrypi owserver[2100]: Starting 1-Wire TCP Server: owserver failed!
Oct 23 14:57:27 raspberrypi systemd[1]: Started LSB: 1-wire TCP server.
What am I doing wrong here?
23/10/2017
Posted by:
andrew
Can you try removing the line you added into rc.local.
I just tried setting up a fresh install of Raspbian Stretch and went through the steps in our OWFS tutorial. The 1 wire settings have moved in raspi-config which I have updated and when I tried leaving out the "sudo /opt/owfs/bin/owserver -c /etc/owfs.conf --pid-file /var/run/owfs/owserver.pid)" line in rc.local the python script still worked and the devices on the 1 Wire bus were found so I don't think that line is needed any more.
27/10/2017
Posted by:
kebro
See this screenshot for the output from various commands I ran, when there was no device connected to the RJ12 port.
When I do connect a device to the RJ12 port on the 1 Wire Pi Plus and I (re)start the owserver with 'sudo service owserver restart' I get different output than without any device attached. See this screenshot. The 1wiretest.py also fails with the 'ow.exNoController' error now, but I guess that this is because the owserver failed to start, and thus is related to that issue and not an issue by itself.
Should the 1-wire also be displayed when I do not connect anything to the RJ12 port on the 1 Wire Pi Plus?
How could it be that the owserver runs fine when there is nothing connected, but when there is something connected, it fails to start? Where should I begin looking for problems here?
I've tested the cable I'm using with the RJ12 connector and the data it delivers with a "P1 tester" this tester shows me that the P1 telegram it outputs is correct.
27/10/2017
Posted by:
andrew
If the sensor is wired wrong and is shorting the connection between OW and ground or OW and RT then that could cause the 1 Wire Pi to stop working when you connect your cable to the board.
27/10/2017
Posted by:
kebro
Pin 1: NC
Pin 2: RTS
Pin 3: GND
Pin 4: NC
Pin 5: RxD
Pin 6: NC
The 1 Wire Pi Plus expects the following layout according to your website:
Pin 1: RTS
Pin 2: GND
Pin 3: OW
Pin 4: RT
Pin 5: NC
Pin 6: NC
So indeed, the pin layout differs.
Is it possible to remap these pin layout within the 1 wire software? Should cutting open the RJ12/RJ11 cable and mapping the pins to the correct veins might be a solution? Or have I bought the wrong product:p
27/10/2017
Posted by:
andrew
What device are you trying to connect to?
Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.