Use proper 1-wire master - DS2482-800 - with Domoticz ?

User avatar
Redguy
Posts: 31
Joined: Saturday 19 November 2016 22:26
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Maassluis
Contact:

Use proper 1-wire master - DS2482-800 - with Domoticz ?

Postby Redguy » Wednesday 28 December 2016 0:34

My "old" sensor bus uses loads of DS1820 sensors and other 1-wire devices, connected to the raspberry pi through some DS2482-800 - 8-Channel 1-Wire Master chips. These are connected to the rpi through the I2C bus, which works great..


Does domoticz support the use of these chips directly ? or only through the use of OWFS ?

djmoon
Posts: 12
Joined: Wednesday 16 March 2016 17:54
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Use proper 1-wire master - DS2482-800 - with Domoticz ?

Postby djmoon » Monday 02 January 2017 18:54

Hi,

I've such a chip too with a Rpi and it work fine now from... yesterday !

I don't find other solution than OWFS.

In resume :
Configure I2C
Installing OWFS
Create proper folder
Setup OWFS
Put OWFS on startup
Reboot
In domoticz, Add a "One Wire" hardware that can read value directly in the folder previously created for OWFS.

Complete guide :

Installation OWFS (not sure python-ow needed)
sudo apt-get install owfs python-ow

Config :
sudo nano /etc/owfs.conf

Comment out the following line
# server: FAKE = DS18S20,DS2405

Find the following section
# USB device: DS9490
#server: usb = all
#

Insert the line below to enable i2c support.
server: device = /dev/i2c-1

Find the section titled
######################### OWFS ##########################

Remove the hashes from the lines
mountpoint = /mnt/1wire
allow_other

Save your changes and exit the nano editor.

Create destination folder
sudo mkdir /mnt/1wire

To make it possible to access the 1wire devices without root privileges you'll have to modify the FUSE settings. Open the fuse configuration file:

sudo nano /etc/fuse.conf
Change

#user_allow_other
to

user_allow_other


Launch OWFS
sudo owfs --i2c=ALL:ALL --allow_other /mnt/1wire/

Autorun OWFS

Create the startup script in /etc/init.d/

cd /etc/init.d
sudo nano start1wire.sh

Add the folowing to the file (remove the first space on each row):

#!/bin/bash

### BEGIN INIT INFO
# Provides: start1wire
# Required-Start: $local_fs $syslog
# Required-Stop: $local_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start OWFS at boot time
# Description: Start OWFS at boot time
### END INIT INFO

# Starts OWFS
owfs --i2c=ALL:ALL --allow_other /mnt/1wire

To make the script executable, run the following command:

sudo chmod +x start1wire.sh
Add the script to the default runlevel.

sudo update-rc.d start1wire.sh defaults

User avatar
Redguy
Posts: 31
Joined: Saturday 19 November 2016 22:26
Target OS: Raspberry Pi
Domoticz version: 3.5877
Location: Maassluis
Contact:

Re: Use proper 1-wire master - DS2482-800 - with Domoticz ?

Postby Redguy » Saturday 07 January 2017 15:57

I have had such a system active for quite a while connected to my pi before switching to domoticz, mainly for monitoring temperatures in my heating systems and guarding my water leakage sensors etc..

i am in doubt about reusing the system or converting the "hub" nodes in that network to MySensors nodes, but i find using 1-wire devices with arduinos a huge pain in the butt compared to OWFS.


Return to “PiFace & 1-wire”

Who is online

Users browsing this forum: No registered users and 1 guest