Add support for IPX800, a standalone relay webserver
Moderators: leecollings, remb0
-
- Posts: 2
- Joined: Monday 19 May 2014 23:55
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Add support for IPX800, a standalone relay webserver
I wonder what is the best solution to add support for IPX800 V3 Domoticz.
http://gce-electronics.com/en/home/57-ipx800-v300.html
The IPX800 is a standalone relay webserver with a LAN interface, which includes 8-32 relay output, 8-32 digital inputs and 4-16 analog inputs.
Way to communicate with IPX are:
- M2M protocol
- Push from IPX (on timer or event)
- Xml stream status
- JSON protocol
I think we should define a new type of material with:
- IP address
- Number of digital extensions
- Number of analog extensions
And then set each item separately
Thanks
http://gce-electronics.com/en/home/57-ipx800-v300.html
The IPX800 is a standalone relay webserver with a LAN interface, which includes 8-32 relay output, 8-32 digital inputs and 4-16 analog inputs.
Way to communicate with IPX are:
- M2M protocol
- Push from IPX (on timer or event)
- Xml stream status
- JSON protocol
I think we should define a new type of material with:
- IP address
- Number of digital extensions
- Number of analog extensions
And then set each item separately
Thanks
-
- Posts: 1
- Joined: Thursday 24 April 2014 22:44
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Hello
+1 for me, the IPX800 is a great card
+1 for me, the IPX800 is a great card
-
- Posts: 1
- Joined: Wednesday 25 June 2014 8:05
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add support for IPX800, a standalone relay webserver
+1 ça serai un plus ^^
-
- Posts: 1
- Joined: Sunday 21 December 2014 12:23
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Bonjour,
Moi aussi je souhaite piloter un IPX800.
Protocoles M2M et IP.
Doc des protocoles (Semble simple) : http://www.gce-electronics.com/attachme ... achment=47
Avantage : IPX Autonome pour piloter des fonctions spécifiques (Volets, Portail, Eclairage extérieur...).
Possibilité de l'insérer dans un ensemble Domoticz sur raspberryPI.
Cordialement
Moi aussi je souhaite piloter un IPX800.
Protocoles M2M et IP.
Doc des protocoles (Semble simple) : http://www.gce-electronics.com/attachme ... achment=47
Avantage : IPX Autonome pour piloter des fonctions spécifiques (Volets, Portail, Eclairage extérieur...).
Possibilité de l'insérer dans un ensemble Domoticz sur raspberryPI.
Cordialement
- mbliek
- Posts: 194
- Joined: Friday 12 July 2013 14:08
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: the Netherlands
- Contact:
Re: Add support for IPX800, a standalone relay webserver
This is an English forum. In English please.
Op zoek naar een Domoticz Start Set?
-
- Posts: 1
- Joined: Tuesday 10 May 2016 11:06
- Target OS: NAS (Synology & others)
- Domoticz version:
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Hello,
That would be a really nice new feature.
Are you going to add it for IPX800 v3 and v4 ?
Cheers
That would be a really nice new feature.
Are you going to add it for IPX800 v3 and v4 ?
Cheers
-
- Posts: 374
- Joined: Friday 23 May 2014 7:55
- Target OS: Linux
- Domoticz version: 2022.1
- Location: Saint Pierre de Jards
- Contact:
Re: Add support for IPX800, a standalone relay webserver
I don't think this would a priority for the dev team, more a nice to have. I've been using the IPX800 v3 for 2 or 3 years and I had no difficulties to integrate it within Domoticz. Very easy to drive the relays (just an http url in On/Off action), fairly easy to retrieve the analog outputs.
For instance, to drive relays 5 On and 6 Off
To retrieve analog values (3 channels), a bash script is needed
This one is a bit more engaging.
Need to modify the crontab, need to install bc in order to perform math operations, need to write in log file that is setup on a ram disk that turns to be a USB key in order to avoid SD card wear.
Crontab (refresh value every 3 minutes)
For instance, to drive relays 5 On and 6 Off
Code: Select all
http://user:password@IPAdress/preset.htm?set5=1&set6=0
Code: Select all
#!/bin/bash
IPX800=192.168.21.232
LOGFILE="/mnt/usbkey/tmp/ipx800.log"
DOMOTICZSERVER=192.168.21.240
DOMOTICZPORT=8080
#Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types
IDX_TEMP_1=206
IDX_TEMP_2=198
IDX_TEMP_3=197
IDX_TEMP_4=
if ping -c 1 $IPX800 > /dev/null ; then # if host is online then
#Retrieve temperatures from IPX800
curl --silent http://$IPX800/status.xml > $LOGFILE
TEMP_1=$(cat $LOGFILE | grep "<analog0>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_1
TEMP_2=$(cat $LOGFILE | grep "<analog1>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_2
TEMP_3=$(cat $LOGFILE | grep "<analog2>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_3=$(echo 'scale=1;'"$TEMP_3*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_3
for i in 1 2 3
do
#report Temperature
eval IDX='$'IDX_TEMP_$i
eval TEMP='$'TEMP_$i
curl --silent $DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX'&svalue='$TEMP > /dev/null
done
else
echo "IPX800 not responding to ping, is it connected to LAN?"
fi
Need to modify the crontab, need to install bc in order to perform math operations, need to write in log file that is setup on a ram disk that turns to be a USB key in order to avoid SD card wear.
Crontab (refresh value every 3 minutes)
Code: Select all
*/3 * * * * (/home/pi/domoticz/scripts/getTemp.sh)
Debian buster on NUC and three RPi with buster.
-
- Posts: 31
- Joined: Sunday 23 November 2014 16:18
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: France
- Contact:
Re: Add support for IPX800, a standalone relay webserver
hello,
+1
It is true that it would be great to have native support and all devices added automatically. Some other products like Jeedom already do it.
+1
It is true that it would be great to have native support and all devices added automatically. Some other products like Jeedom already do it.
Rapberry PI B+ (RaspBian), RFXtrx433E USB 433.92MHz Transceiver, AEON LABS Controler Z-Wave, Aeon Labs Z-Stick S2, Everspring ST814 Temperature Sensor, Everspring SF812 Smoke Detector, 2x Fibaro Wallplug, Aeon Zwave Miniremote , Xbee Teleinfo USB
-
- Posts: 75
- Joined: Saturday 05 December 2015 15:11
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Beta
- Location: Europe
- Contact:
Re: Add support for IPX800, a standalone relay webserver
What delay do you have on the outputs?Number8 wrote:I don't think this would a priority for the dev team, more a nice to have. I've been using the IPX800 v3 for 2 or 3 years and I had no difficulties to integrate it within Domoticz. Very easy to drive the relays (just an http url in On/Off action), fairly easy to retrieve the analog outputs.
For instance, to drive relays 5 On and 6 OffTo retrieve analog values (3 channels), a bash script is neededCode: Select all
http://user:password@IPAdress/preset.htm?set5=1&set6=0
This one is a bit more engaging.Code: Select all
#!/bin/bash IPX800=192.168.21.232 LOGFILE="/mnt/usbkey/tmp/ipx800.log" DOMOTICZSERVER=192.168.21.240 DOMOTICZPORT=8080 #Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types IDX_TEMP_1=206 IDX_TEMP_2=198 IDX_TEMP_3=197 IDX_TEMP_4= if ping -c 1 $IPX800 > /dev/null ; then # if host is online then #Retrieve temperatures from IPX800 curl --silent http://$IPX800/status.xml > $LOGFILE TEMP_1=$(cat $LOGFILE | grep "<analog0>" | cut -d ">" -f 2 | cut -d "<" -f 1) TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}') #echo $TEMP_1 TEMP_2=$(cat $LOGFILE | grep "<analog1>" | cut -d ">" -f 2 | cut -d "<" -f 1) TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}') #echo $TEMP_2 TEMP_3=$(cat $LOGFILE | grep "<analog2>" | cut -d ">" -f 2 | cut -d "<" -f 1) TEMP_3=$(echo 'scale=1;'"$TEMP_3*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}') #echo $TEMP_3 for i in 1 2 3 do #report Temperature eval IDX='$'IDX_TEMP_$i eval TEMP='$'TEMP_$i curl --silent $DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX'&svalue='$TEMP > /dev/null done else echo "IPX800 not responding to ping, is it connected to LAN?" fi
Need to modify the crontab, need to install bc in order to perform math operations, need to write in log file that is setup on a ram disk that turns to be a USB key in order to avoid SD card wear.
Crontab (refresh value every 3 minutes)Code: Select all
*/3 * * * * (/home/pi/domoticz/scripts/getTemp.sh)
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Hello.
I also have an IPX800 relay.
I have a Domotitz server installed on Synology.
I'm trying to add here, could someone help me?
What hardware should I add?
Which switch should I choose?
Where do I put the basch script for analog inputs?
Well thank you.
I also have an IPX800 relay.
I have a Domotitz server installed on Synology.
I'm trying to add here, could someone help me?
What hardware should I add?
Which switch should I choose?
Where do I put the basch script for analog inputs?
Well thank you.
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Relay I managed to add
hardware:
Dummy (Does not use virtual switches only)
Add next:
Create Virtual Sensor
Choose:
Switch Type: On / Off
On Action:
http://192.168.1.125/preset.htm?led1=1
Off Action:
http://192.168.1.125/preset.htm?led1=0
I now control the relay.
Next I can not move, I need to retrieve data from IPX800 v1, pro, v3
I have 8 analogue sensors, 1 counter and 6 digital sensors
Will someone help me? I am willing to pay for your help.
hardware:
Dummy (Does not use virtual switches only)
Add next:
Create Virtual Sensor
Choose:
Switch Type: On / Off
On Action:
http://192.168.1.125/preset.htm?led1=1
Off Action:
http://192.168.1.125/preset.htm?led1=0
I now control the relay.


I have 8 analogue sensors, 1 counter and 6 digital sensors
Will someone help me? I am willing to pay for your help.
Last edited by laco on Sunday 04 November 2018 10:06, edited 2 times in total.
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
I created a virtual IDX16 and IDX17 thermometer
I have used the LM35Z temperature sensor an1 in IPX800
Temperature calculation an1 * 0.323
Status XML IPX800:
I used the script getTemp.sh
I created Cron to run: bash /volume1/@appstore/domoticz/var/scripts/getTemp.sh
Current status: 2 (Suspended)
Standard Output / Error:
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: syntax error near unexpected token `eval'
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: `eval IDX='$'IDX_TEMP_$i
And I'm probably done here. The previous script was for raspberry pi.
Will anyone help me to create a synology script?
I have used the LM35Z temperature sensor an1 in IPX800
Temperature calculation an1 * 0.323
Status XML IPX800:
Code: Select all
<response>
<led0>1</led0>
<led1>1</led1>
<led2>0</led2>
<led3>0</led3>
<led4>0</led4>
<led5>0</led5>
<led6>0</led6>
<led7>0</led7>
<btn0>up</btn0>
<btn1>up</btn1>
<btn2>up</btn2>
<btn3>up</btn3>
<an1>69</an1>
<an2>54</an2>
<time0>08:35:41</time0>
</response>
Code: Select all
#!/bin/bash
IPX800=192.168.1.125
LOGFILE="/volume1/@appstore/domoticz/var/scripts/ipx800.log"
DOMOTICZSERVER=192.168.1.200
DOMOTICZPORT=8084
#Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types
IDX_TEMP_1=16
IDX_TEMP_2=17
if ping -c 1 $IPX800 > /dev/null ; then # if host is online then
#Retrieve temperatures from IPX800
curl --silent http://$IPX800/status.xml > $LOGFILE
TEMP_1=$(cat $LOGFILE | grep "<an1>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_1
TEMP_2=$(cat $LOGFILE | grep "<an2>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_2
for i in 1 2
do
#report Temperature
eval IDX='$'IDX_TEMP_$i
eval TEMP='$'TEMP_$i
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX'&svalue='$TEMP > /dev/null
done
else
echo "IPX800 not responding to ping, is it connected to LAN?"
fi
Current status: 2 (Suspended)
Standard Output / Error:
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: syntax error near unexpected token `eval'
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: `eval IDX='$'IDX_TEMP_$i
And I'm probably done here. The previous script was for raspberry pi.
Will anyone help me to create a synology script?
Last edited by laco on Tuesday 25 December 2018 19:15, edited 1 time in total.
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Can you try and change the block
Code: Select all
for i in 1 2
do
#report Temperature
eval IDX='$'IDX_TEMP_$i
eval TEMP='$'TEMP_$i
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX'&svalue='$TEMP > /dev/null
done
Code: Select all
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_1'&svalue='$TEMP_1 > /dev/null
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_2'&svalue='$TEMP_2 > /dev/null
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Code: Select all
Task: Snimac teploty IPX800 akva
Start time: Sun, 04 Nov 2018 14:11:25 GMT
Stop time: Sun, 04 Nov 2018 14:11:26 GMT
Current status: 2 (Interrupted)
Standard output/error:
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 21: syntax error near unexpected token `$'do\r''
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 21: `do
'
Sincerely,
Synology DiskStation
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Can you show how your script looks like now ?laco wrote: ↑Sunday 04 November 2018 14:12Code: Select all
Task: Snimac teploty IPX800 akva Start time: Sun, 04 Nov 2018 14:11:25 GMT Stop time: Sun, 04 Nov 2018 14:11:26 GMT Current status: 2 (Interrupted) Standard output/error: /volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 21: syntax error near unexpected token `$'do\r'' /volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 21: `do ' Sincerely, Synology DiskStation
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Code: Select all
#!/bin/bash
IPX800=192.168.1.125
LOGFILE="/volume1/@appstore/domoticz/var/scripts/ipx800.log"
DOMOTICZSERVER=192.168.1.200
DOMOTICZPORT=8084
#Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types
IDX_TEMP_1=16
IDX_TEMP_2=17
IDX_TEMP_3=
IDX_TEMP_4=
if ping -c 1 $IPX800 > /dev/null ; then # if host is online then
#Retrieve temperatures from IPX800
curl --silent http://$IPX800/status.xml > $LOGFILE
TEMP_1=$(cat $LOGFILE | grep "<an1>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_1
TEMP_2=$(cat $LOGFILE | grep "<an2>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_2
for i in 1 2
do
#report Temperature
eval IDX='$'IDX_TEMP_$i
eval TEMP='$'TEMP_$i
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_1'&svalue='$TEMP_1 > /dev/null
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_2'&svalue='$TEMP_2 > /dev/null
done
else
echo "IPX800 not responding to ping, is it connected to LAN?"
fi
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Add support for IPX800, a standalone relay webserver
What I meant with my last post is this:
Code: Select all
#!/bin/bash
IPX800=192.168.1.125
LOGFILE="/volume1/@appstore/domoticz/var/scripts/ipx800.log"
DOMOTICZSERVER=192.168.1.200
DOMOTICZPORT=8084
#Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types
IDX_TEMP_1=16
IDX_TEMP_2=17
IDX_TEMP_3=
IDX_TEMP_4=
if ping -c 1 $IPX800 > /dev/null ; then # if host is online then
#Retrieve temperatures from IPX800
curl --silent http://$IPX800/status.xml > $LOGFILE
TEMP_1=$(cat $LOGFILE | grep "<an1>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_1
TEMP_2=$(cat $LOGFILE | grep "<an2>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_2
#report Temperature
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_1'&svalue='$TEMP_1 > /dev/null
curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_2'&svalue='$TEMP_2 > /dev/null
else
echo "IPX800 not responding to ping, is it connected to LAN?"
fi
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Task: Snimac teploty IPX800 akva
Start time: Sun, 04 Nov 2018 14:50:35 GMT
Stop time: Sun, 04 Nov 2018 14:50:36 GMT
Current status: 0 (Normal)
Standard output/error:
ping: socket: Operation not permitted
ping: socket: Operation not permitted
Sincerely,
Synology DiskStation
Start time: Sun, 04 Nov 2018 14:50:35 GMT
Stop time: Sun, 04 Nov 2018 14:50:36 GMT
Current status: 0 (Normal)
Standard output/error:
ping: socket: Operation not permitted
ping: socket: Operation not permitted
Sincerely,
Synology DiskStation
- waaren
- Posts: 6028
- Joined: Tuesday 03 January 2017 14:18
- Target OS: Linux
- Domoticz version: Beta
- Location: Netherlands
- Contact:
Re: Add support for IPX800, a standalone relay webserver
You should first try these commands (ping and curl) from the CLI as the user that will also execute the script.
Maybe they need to use sudo the be allowed to execute these commands. If so, you also have to adjust the commands in the script.
like
Code: Select all
!/bin/bash
IPX800=192.168.1.125
LOGFILE="/volume1/@appstore/domoticz/var/scripts/ipx800.log"
DOMOTICZSERVER=192.168.1.200
DOMOTICZPORT=8084
#Create virtual sensors in Domoticz and enter their IDX's here. For the sensor types
IDX_TEMP_1=16
IDX_TEMP_2=17
IDX_TEMP_3=
IDX_TEMP_4=
if sudo ping -c 1 $IPX800 > /dev/null ; then # if host is online then
#Retrieve temperatures from IPX800
curl --silent http://$IPX800/status.xml > $LOGFILE
TEMP_1=$(cat $LOGFILE | grep "<an1>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_1=$(echo 'scale=1;'"$TEMP_1*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_1
TEMP_2=$(cat $LOGFILE | grep "<an2>" | cut -d ">" -f 2 | cut -d "<" -f 1)
TEMP_2=$(echo 'scale=1;'"$TEMP_2*0.323-50.1" | bc | awk '{printf("%.1f\n", $1)}')
#echo $TEMP_2
#report Temperature
sudo curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_1'&svalue='$TEMP_1 > /dev/null
sudo curl -s '$DOMOTICZSERVER:$DOMOTICZPORT'/json.htm?type=command¶m=udevice&idx='$IDX_TEMP_2'&svalue='$TEMP_2 > /dev/null
else
echo "IPX800 not responding to ping, is it connected to LAN?"
fi
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
- laco
- Posts: 86
- Joined: Tuesday 30 October 2018 12:57
- Target OS: NAS (Synology & others)
- Domoticz version: 2021.1
- Location: Slovensko
- Contact:
Re: Add support for IPX800, a standalone relay webserver
Current status: 0 (Normal)
Standard output/error:
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 1: !/bin/bash: No such file or directory
cat: /volume1/@appstore/domoticz/var/scripts/ipx800.log
: No such file or directory
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 15: bc: command not found
cat: /volume1/@appstore/domoticz/var/scripts/ipx800.log
: No such file or directory
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 18: bc: command not found
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: $'else\r': command not found
IPX800 not responding to ping, is it connected to LAN?
Standard output/error:
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 1: !/bin/bash: No such file or directory
cat: /volume1/@appstore/domoticz/var/scripts/ipx800.log
: No such file or directory
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 15: bc: command not found
cat: /volume1/@appstore/domoticz/var/scripts/ipx800.log
: No such file or directory
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 18: bc: command not found
/volume1/@appstore/domoticz/var/scripts/getTemp.sh: line 23: $'else\r': command not found
IPX800 not responding to ping, is it connected to LAN?
Who is online
Users browsing this forum: No registered users and 1 guest