problème enclenchement relais avec page web
Publié : 16 janv. 2018, 10:14
bonjours les domoticiens, help please
je suis nouveau dans le monde de domoticz et du raspberry,
je souhaite activé des relais de la carte sainsmart mais cela est compliqué,
quand je fait les commandes gpio export 17 out, le relaie colle dons branchement ok
puis a la fin quand je fait ./domoticz parfois pas de problème web serveur http parfois oui
la connection à domoticz par la page web se fait toujours bien.
Qaund je suis sur la page web je n'arrive pas à faire collé ce relais
pi@raspberrypi:~ $ sudo netstat -tlnp | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 575/domoticz
pi@raspberrypi:~/domoticz $ gpio export 17 out
pi@raspberrypi:~/domoticz $ gpio exports
GPIO Pins exported:
17: out 0 none
pi@raspberrypi:~/domoticz $ ./domoticz
2018-01-16 09:44:09.514 Domoticz V3.8809 (c)2012-2018 GizMoCuz
2018-01-16 09:44:09.514 Build Hash: 4ec5e160, Date: 2018-01-15 13:01:28
2018-01-16 09:44:09.515 Startup Path: /home/pi/domoticz/
2018-01-16 09:44:09.553 Sunrise: 08:20:00 SunSet: 17:40:00
2018-01-16 09:44:09.553 Day length: 09:20:00 Sun at south: 12:59:00
2018-01-16 09:44:09.553 Civil twilight start: 07:48:00 Civil twilight end: 18:12:00
2018-01-16 09:44:09.553 Nautical twilight start: 07:13:00 Nautical twilight end: 18:47:00
2018-01-16 09:44:09.553 Astronomical twilight start: 06:38:00 Astronomical twilight end: 19:21:00
2018-01-16 09:44:09.553 EventSystem: reset all events...
2018-01-16 09:44:09.636 PluginSystem: Started, Python version '3.5.3'.
2018-01-16 09:44:09.644 Active notification Subsystems: email (1/14)
2018-01-16 09:44:09.661 Error: WebServer(HTTP) startup failed on address 0.0.0.0 with port: 8080: bind: Address already in use
2018-01-16 09:44:09.661 Error: WebServer(HTTP) check if no other application is using port: 8080
2018-01-16 09:44:09.669 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2018-01-16 09:44:09.669 Error: WebServer(SSL) check privileges for opening ports below 1024
2018-01-16 09:44:09.670 Proxymanager started.
pi@raspberrypi:~ $ sudo service domoticz.sh stop
pi@raspberrypi:~ $ cd domoticz
pi@raspberrypi:~/domoticz $ gpio export 17 out
pi@raspberrypi:~/domoticz $ gpio exports
GPIO Pins exported:
17: out 0 none
pi@raspberrypi:~/domoticz $ ./domoticz
2018-01-16 09:48:55.033 Domoticz V3.8809 (c)2012-2018 GizMoCuz
2018-01-16 09:48:55.033 Build Hash: 4ec5e160, Date: 2018-01-15 13:01:28
2018-01-16 09:48:55.033 Startup Path: /home/pi/domoticz/
2018-01-16 09:48:55.085 Sunrise: 08:20:00 SunSet: 17:40:00
2018-01-16 09:48:55.085 Day length: 09:20:00 Sun at south: 12:59:00
2018-01-16 09:48:55.085 Civil twilight start: 07:48:00 Civil twilight end: 18:12:00
2018-01-16 09:48:55.085 Nautical twilight start: 07:13:00 Nautical twilight end: 18:47:00
2018-01-16 09:48:55.085 Astronomical twilight start: 06:38:00 Astronomical twilight end: 19:21:00
2018-01-16 09:48:55.085 EventSystem: reset all events...
2018-01-16 09:48:55.168 PluginSystem: Started, Python version '3.5.3'.
2018-01-16 09:48:55.176 Active notification Subsystems: email (1/14)
2018-01-16 09:48:55.177 WebServer(HTTP) started on address: :: with port 8080
2018-01-16 09:48:55.186 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2018-01-16 09:48:55.186 Error: WebServer(SSL) check privileges for opening ports below 1024
2018-01-16 09:48:55.187 Proxymanager started.
2018-01-16 09:48:55.188 Starting shared server on: :::6144
2018-01-16 09:48:55.188 TCPServer: shared server started...
2018-01-16 09:48:55.189 RxQueue: queue worker started...
2018-01-16 09:48:57.190 EventSystem: reset all events...
2018-01-16 09:48:57.190 EventSystem: reset all device statuses...
2018-01-16 09:48:57.332 Python EventSystem: Initalizing event module.
2018-01-16 09:48:57.332 EventSystem: Started
2018-01-16 09:48:57.333 EventSystem: Queue thread started...
2018-01-16 09:48:57.586 PluginSystem: Entering work loop.
2018-01-16 09:49:06.099 Incoming connection from: 192.168.1.27
2018-01-16 09:49:33.058 GPIO: This hardware is deprecated. Please transfer to the new SysFS hardware type!
2018-01-16 09:50:10.285 EventSystem: reset all device statuses...
2018-01-16 09:50:12.671 User: Admin initiated a switch command (1/Lumière/On)
2018-01-16 09:50:12.678 (gpio export) Lighting 1 (Lumière)
2018-01-16 09:50:17.358 User: Admin initiated a switch command (1/Lumière/Off)
2018-01-16 09:50:17.365 (gpio export) Lighting 1 (Lumière)
puis dans /etc/init.d/domoticz.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: domoticz
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Home Automation System
# Description: This daemon will start the Domoticz Home Automation System
### END INIT INFO
# Do NOT "set -e"
/usr/bin/gpio export 17 out
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DAEMON=/home/pi/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
#DAEMON_ARGS="$DAEMON_ARGS -www 8080 -sslwww 443 -log/tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
Si cela peut vous éclairé moi je suis perdu
je suis nouveau dans le monde de domoticz et du raspberry,
je souhaite activé des relais de la carte sainsmart mais cela est compliqué,
quand je fait les commandes gpio export 17 out, le relaie colle dons branchement ok
puis a la fin quand je fait ./domoticz parfois pas de problème web serveur http parfois oui
la connection à domoticz par la page web se fait toujours bien.
Qaund je suis sur la page web je n'arrive pas à faire collé ce relais
pi@raspberrypi:~ $ sudo netstat -tlnp | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 575/domoticz
pi@raspberrypi:~/domoticz $ gpio export 17 out
pi@raspberrypi:~/domoticz $ gpio exports
GPIO Pins exported:
17: out 0 none
pi@raspberrypi:~/domoticz $ ./domoticz
2018-01-16 09:44:09.514 Domoticz V3.8809 (c)2012-2018 GizMoCuz
2018-01-16 09:44:09.514 Build Hash: 4ec5e160, Date: 2018-01-15 13:01:28
2018-01-16 09:44:09.515 Startup Path: /home/pi/domoticz/
2018-01-16 09:44:09.553 Sunrise: 08:20:00 SunSet: 17:40:00
2018-01-16 09:44:09.553 Day length: 09:20:00 Sun at south: 12:59:00
2018-01-16 09:44:09.553 Civil twilight start: 07:48:00 Civil twilight end: 18:12:00
2018-01-16 09:44:09.553 Nautical twilight start: 07:13:00 Nautical twilight end: 18:47:00
2018-01-16 09:44:09.553 Astronomical twilight start: 06:38:00 Astronomical twilight end: 19:21:00
2018-01-16 09:44:09.553 EventSystem: reset all events...
2018-01-16 09:44:09.636 PluginSystem: Started, Python version '3.5.3'.
2018-01-16 09:44:09.644 Active notification Subsystems: email (1/14)
2018-01-16 09:44:09.661 Error: WebServer(HTTP) startup failed on address 0.0.0.0 with port: 8080: bind: Address already in use
2018-01-16 09:44:09.661 Error: WebServer(HTTP) check if no other application is using port: 8080
2018-01-16 09:44:09.669 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2018-01-16 09:44:09.669 Error: WebServer(SSL) check privileges for opening ports below 1024
2018-01-16 09:44:09.670 Proxymanager started.
pi@raspberrypi:~ $ sudo service domoticz.sh stop
pi@raspberrypi:~ $ cd domoticz
pi@raspberrypi:~/domoticz $ gpio export 17 out
pi@raspberrypi:~/domoticz $ gpio exports
GPIO Pins exported:
17: out 0 none
pi@raspberrypi:~/domoticz $ ./domoticz
2018-01-16 09:48:55.033 Domoticz V3.8809 (c)2012-2018 GizMoCuz
2018-01-16 09:48:55.033 Build Hash: 4ec5e160, Date: 2018-01-15 13:01:28
2018-01-16 09:48:55.033 Startup Path: /home/pi/domoticz/
2018-01-16 09:48:55.085 Sunrise: 08:20:00 SunSet: 17:40:00
2018-01-16 09:48:55.085 Day length: 09:20:00 Sun at south: 12:59:00
2018-01-16 09:48:55.085 Civil twilight start: 07:48:00 Civil twilight end: 18:12:00
2018-01-16 09:48:55.085 Nautical twilight start: 07:13:00 Nautical twilight end: 18:47:00
2018-01-16 09:48:55.085 Astronomical twilight start: 06:38:00 Astronomical twilight end: 19:21:00
2018-01-16 09:48:55.085 EventSystem: reset all events...
2018-01-16 09:48:55.168 PluginSystem: Started, Python version '3.5.3'.
2018-01-16 09:48:55.176 Active notification Subsystems: email (1/14)
2018-01-16 09:48:55.177 WebServer(HTTP) started on address: :: with port 8080
2018-01-16 09:48:55.186 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2018-01-16 09:48:55.186 Error: WebServer(SSL) check privileges for opening ports below 1024
2018-01-16 09:48:55.187 Proxymanager started.
2018-01-16 09:48:55.188 Starting shared server on: :::6144
2018-01-16 09:48:55.188 TCPServer: shared server started...
2018-01-16 09:48:55.189 RxQueue: queue worker started...
2018-01-16 09:48:57.190 EventSystem: reset all events...
2018-01-16 09:48:57.190 EventSystem: reset all device statuses...
2018-01-16 09:48:57.332 Python EventSystem: Initalizing event module.
2018-01-16 09:48:57.332 EventSystem: Started
2018-01-16 09:48:57.333 EventSystem: Queue thread started...
2018-01-16 09:48:57.586 PluginSystem: Entering work loop.
2018-01-16 09:49:06.099 Incoming connection from: 192.168.1.27
2018-01-16 09:49:33.058 GPIO: This hardware is deprecated. Please transfer to the new SysFS hardware type!
2018-01-16 09:50:10.285 EventSystem: reset all device statuses...
2018-01-16 09:50:12.671 User: Admin initiated a switch command (1/Lumière/On)
2018-01-16 09:50:12.678 (gpio export) Lighting 1 (Lumière)
2018-01-16 09:50:17.358 User: Admin initiated a switch command (1/Lumière/Off)
2018-01-16 09:50:17.365 (gpio export) Lighting 1 (Lumière)
puis dans /etc/init.d/domoticz.sh
#! /bin/sh
### BEGIN INIT INFO
# Provides: domoticz
# Required-Start: $network $remote_fs $syslog
# Required-Stop: $network $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Home Automation System
# Description: This daemon will start the Domoticz Home Automation System
### END INIT INFO
# Do NOT "set -e"
/usr/bin/gpio export 17 out
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin
DESC="Domoticz Home Automation System"
NAME=domoticz
USERNAME=pi
PIDFILE=/var/run/$NAME.pid
SCRIPTNAME=/etc/init.d/$NAME
DAEMON=/home/pi/domoticz/$NAME
DAEMON_ARGS="-daemon"
#DAEMON_ARGS="$DAEMON_ARGS -daemonname $NAME -pidfile $PIDFILE"
#DAEMON_ARGS="$DAEMON_ARGS -www 8080 -sslwww 443 -log/tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -log /tmp/domoticz.txt"
#DAEMON_ARGS="$DAEMON_ARGS -syslog"
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
# Load the VERBOSE setting and other rcS variables
. /lib/init/vars.sh
Si cela peut vous éclairé moi je suis perdu