This is mostly documentation for myself. Feel free to use any of it if it helps, though.
- Any Raspberry Pi device (1, 2 or 3; not sure about the 0)
- A Wi-Fi adapter known to work with the Pi (mine is Asus USB-N10 Nano for 20 €)
- 1-Wire USB Adapter (mine is DS9490R, though appears as "Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter" on
lsusb
) - A bunch of 1-Wire temperature sensors (mine are the waterproof DS18B20 kind)
- Image an SD card with Raspbian (LITE is fine)
- Resize disk with
sudo raspi-config
(and update locales etc) - Set up the 1-Wire filesystem:
sudo apt-get install owfs
sudo mkdir /mnt/1wire && sudo chown pi:pi /mnt/1wire/
sudo vim /etc/owfs.conf
(see below)sudo vim /etc/init.d/owfs && sudo chmod a+x /etc/init.d/owfs && sudo update-rc.d owfs defaults
(see below)sudo vim /etc/fuse.conf
(see below)
- Check to see the sensors are visible on
owfs
(usehead
instead ofcat
):head /mnt/1wire/28.5F7CE1040000/temperature
should print out something like23.4375
(depending on the sensor address and the current temperature, of course) - Set up a cronjob for collecting stats:
* * * * * ~/bin/collect-stats > /dev/null
- Set up Graphite scripts:
~/bin/send-stat
(see below)~/bin/collect-stats
(see below)~/bin/ping-rt-avg
(see below)
- Set up a cronjob for collecting counter stats:
@reboot ~/bin/collect-counter.py > /dev/null
I followed your detailed instructions and I don't see the sensors as you point out in this step:
Check to see the sensors are visible on owfs (use head instead of cat): head /mnt/1wire/28.5F7CE1040000
I am using an RP3 running Stretch. I also have the same 1-Wire USB Adapter, DS9490R, and it also shows up as "Dallas Semiconductor DS1490F 2-in-1 Fob, 1-Wire adapter" on lsusb.
I am not aware of any kernal modifications I may (or may not have made). Do you have any ideas on what I am missing.
I appreciate your posting of the detailed instructions and code.