[solved] Using Domoticz with many LAN raspberry and DS18B20

Moderator: leecollings

Post Reply
PeM1664
Posts: 13
Joined: Monday 31 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

[solved] Using Domoticz with many LAN raspberry and DS18B20

Post by PeM1664 »

Hi everybody, I'm a newbie with Domotics and I'm using it for recording temperature issue coming from DS18B20 1-wire sensors.
I've put one or more sensors in each raspberry I have in my house (more than 5) and I'm wondering if I can regroup all the measurement in one Domoticz window?
All the raspberry are in the same network and I've tried to locate them with a Domotics windows in my Ubuntu server but I didn't find the way to do this.. On All Raspb I've installed Domotics but I have to open 1 windows by raspb for have one measurement and 1 log of it..
Is it possible to use only one interface of Domoticz for capture the measurement of different raspb by ssh?
tks for yours answers :)
Last edited by PeM1664 on Wednesday 02 November 2016 11:36, edited 1 time in total.
antwan
Posts: 116
Joined: Saturday 13 July 2013 13:28
Target OS: Linux
Domoticz version: Latest
Location: Hilversum, The Netherlands
Contact:

Re: Using Domoticz with many LAN raspberry and DS18B20

Post by antwan »

Check the manual and look for domoticz remote server.
Rasp Pi 2B: 3x DS18S20 (1-wire), BME280 (i2c)
Cubietruck 1: Aeotec Z-Wave+, RFXtrx433XL+P1, RFXtrx868, TE923 display, SolarEdge API
Cubietruck 2: Aeotec Z-Wave, Voltcraft CO-20
PeM1664
Posts: 13
Joined: Monday 31 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Using Domoticz with many LAN raspberry and DS18B20

Post by PeM1664 »

I found it! Thanks :)
https://www.domoticz.com/wiki/Setting_up_Device_sharing
it's working perfectly!
PeM1664
Posts: 13
Joined: Monday 31 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by PeM1664 »

Hi all I re-send... why can"t I see the GPIO ports declared in 1 domoticz web server (and I can see and control them) threw/via a global server using raspberry remote server control config( witch is working very well for temp)?
PeM1664
Posts: 13
Joined: Monday 31 October 2016 13:15
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by PeM1664 »

I found it! just have to action the switch in domoticz remote server to update in domoticz primary
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by madrian »

Hi,

Installing Domoticz on all client is a bit overkill.

I solved like this:

temp.sh

Code: Select all

TEMP=$(cat /sys/bus/w1/devices/28-00000463dd89/w1_slave | grep  -E -o ".{0,0}t=.{0,5}" | cut -c 3-)
VAR=$(echo "scale=2; $TEMP/1000" | bc)
curl --connect-timeout 60 "http://192.168.1.54:8080/json.htm?type=command&param=udevice&idx=51&nvalue=0&svalue=$VAR"
And you can run every 5min with cron.
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by kniazio »

I'm trying to implement this script but it does not show me the temperature.
Sensor updates but nothing else
Sensor ID and IDX from Domoticz I have inserted correctly
Maybe some error in the script is
Attachments
temp11.jpg
temp11.jpg (57 KiB) Viewed 3449 times
temp1.png
temp1.png (14.56 KiB) Viewed 3458 times
temp1.jpg
temp1.jpg (237.63 KiB) Viewed 3458 times
madrian
Posts: 231
Joined: Saturday 27 August 2016 1:18
Target OS: -
Domoticz version:
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by madrian »

Uh, I am not using this anymore, but I am trying to help.

What is the output of:

Code: Select all

TEMP=$(cat /sys/bus/w1/devices/28-00000463dd89/w1_slave | grep  -E -o ".{0,0}t=.{0,5}" | cut -c 3-)
echo $TEMP
VAR=$(echo "scale=2; $TEMP/1000" | bc)
echo $VAR
curl --connect-timeout 60 "http://192.168.1.54:8080/json.htm?type=command&param=udevice&idx=51&nvalue=0&svalue=$VAR"
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by kniazio »

Unfortunately it does not work
temp.jpg
temp.jpg (64.11 KiB) Viewed 3400 times
It only works if I manually make each line separately
temp2.jpg
temp2.jpg (83.72 KiB) Viewed 3398 times
When you add 1.3 at the end of the line ";" works but the console reports errors
temp3.jpg
temp3.jpg (68.46 KiB) Viewed 3395 times

Code: Select all

TEMP=$(cat /sys/bus/w1/devices/28-031552e458ff/w1_slave | grep -E -o ".{0,0}t=.{0,5}" | cut -c 3-);
echo $TEMP
VAR=$(echo "scale=2; $TEMP/1000" | bc);
echo $VAR
curl --connect-timeout 60 "http://192.168.1.100:8078/json.htm?type=command&param=udevice&idx=59&nvalue=0&svalue=$VAR"
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by kniazio »

Everything works.
It helped:

Code: Select all

Resolved with Notepad++ :
1) Menu->Edit->EOL Conversion -> Unix/OSX Format
2) Then Save
Fixed
Can you write how to add script to cron every 5 minutes?
pvm
Posts: 550
Joined: Tuesday 17 June 2014 22:14
Target OS: NAS (Synology & others)
Domoticz version: 4.10538
Location: NL
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by pvm »

'crontab -e' there's a description in the file which shows up then.
Synology NAS, slave PI3, ZWave (Fibaro), Xiaomi zigbee devices, BTLE plant sensor, DzVents, Dashticz on tablet, Logitech Media Server
kniazio
Posts: 200
Joined: Thursday 06 October 2016 8:14
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.7243
Contact:

Re: [solved] Using Domoticz with many LAN raspberry and DS18B20

Post by kniazio »

Everything works great.
Thanks a lot!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest