demarrage domoticz à la mise sous tension

Photographie ultra-rapide, pilotage d'imprimante 3D ou de CNC, fabrication de bière.... Enfin tout ce que le Raspberry peut gérer trouvera sa place dans cette rubrique

Modérateur : Francois

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

demarrage domoticz à la mise sous tension

Message par dou_dou_69 » sam. 23 juil. 2022 11:54

bonjour

une fois mis sous tension domoticz fonction mais ce coupe au bout d'environ 5 secondes

voici le résultat de la commande
sudo service domoticz.sh status

Nov 03 17:16:46 linaro-alip domoticz[892]: Domoticz is starting up....
Nov 03 17:16:46 linaro-alip domoticz.sh[734]: 2016-11-03 17:16:46.772 Status: D
Nov 03 17:16:46 linaro-alip domoticz.sh[734]: 2016-11-03 17:16:46.772 Status: B
Nov 03 17:16:46 linaro-alip domoticz.sh[734]: 2016-11-03 17:16:46.772 Status: S
Nov 03 17:16:46 linaro-alip domoticz.sh[734]: domoticz: Domoticz is starting up.
Nov 03 17:16:46 linaro-alip domoticz[939]: Domoticz running...
Jul 23 09:48:21 linaro-alip domoticz[939]: Domoticz stopped...

il à l'air de s'arrêter une fois mis à l'heure

une fois mis sous tension la commande sudo service domoticz.sh restart réglait le soucis
mais obligeant de taper une commande en cas de coupure de courant.

j'ai vu que ce problème pouvais être réglé en temporisant son lancement via les crontabs

j'ai essayé via
crontab -e ou crontab -e utilisateur -u
inséré
@reboot sleep 15 && domoticz.sh restart
@reboot sleep 15 && /home/pi/domoticz/domoticz.sh

mais problème toujours présant

quelqu'un aurait une idée?

domi
Administrateur
Messages : 3230
Enregistré le : mer. 17 sept. 2014 18:12
Localisation : Seine et Marne

Re: demarrage domoticz à la mise sous tension

Message par domi » sam. 23 juil. 2022 13:36

Bonjour,

Le service doit être relancé via la Crontab de root, en renseignant le chemin complet.
Pour cela :

Code : Tout sélectionner

sudo crontab -e
Passionné de Raspberry, Arduino, ESP8266, ESP32, et objets connectés :
Spécial débutant, concevez vous-même votre domotique DIY : https://www.youtube.com/c/DomoticDIY
Conception d'une station météo DIY, et envoi des infos à votre Domotique.

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » sam. 23 juil. 2022 16:33

merci du tuyau
après avoir tapé sudo crontab -e
j'y ai inséré
@reboot sleep 15 && /etc/pi/domoticz/domoticz.sh

Problème toujours présent.

domi
Administrateur
Messages : 3230
Enregistré le : mer. 17 sept. 2014 18:12
Localisation : Seine et Marne

Re: demarrage domoticz à la mise sous tension

Message par domi » sam. 23 juil. 2022 20:52

"/etc/pi/domoticz/domoticz.sh" ?
t'es sûr que c'est pas "/etc/init.d/domoticz.sh"
et il faut ajouter "restart" à la fin de la commande : /etc/init.d/domoticz.sh restart
Passionné de Raspberry, Arduino, ESP8266, ESP32, et objets connectés :
Spécial débutant, concevez vous-même votre domotique DIY : https://www.youtube.com/c/DomoticDIY
Conception d'une station météo DIY, et envoi des infos à votre Domotique.

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » dim. 24 juil. 2022 12:06

il est aussi présent dans ce dossier
j'essaye avec celui de init.d et te dit ça

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » dim. 24 juil. 2022 12:24

et non la commande
@reboot sleep 10 && /etc/init.d/domoticz.sh restart pas mieux avec ce fichier sh pourtant il est aussi bien présent à ce chemin également

domi
Administrateur
Messages : 3230
Enregistré le : mer. 17 sept. 2014 18:12
Localisation : Seine et Marne

Re: demarrage domoticz à la mise sous tension

Message par domi » dim. 24 juil. 2022 21:31

dans une console, que donne la commande

Code : Tout sélectionner

sudo /etc/init.d/domoticz.sh restart
Passionné de Raspberry, Arduino, ESP8266, ESP32, et objets connectés :
Spécial débutant, concevez vous-même votre domotique DIY : https://www.youtube.com/c/DomoticDIY
Conception d'une station météo DIY, et envoi des infos à votre Domotique.

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » lun. 25 juil. 2022 10:33

cette commande me renvoi
[ ok ] Restarting domoticz.sh (via systemctl): domoticz.service.

mais l'interface de domoticz est tout gris et l'écriture des devices est sans leur graphisme

puis je tapre sudo service domoticz.sh restart

et la interface aux poils

j'ai essayer
sudo chmod +x /etc/init.d/domoticz
sudo update-rc.d domoticz.sh defaults
insserv: warning: script 'mountboot.sh' missing LSB tags and overrides
insserv: warning: script 'rkisp_3A.sh' missing LSB tags and overrides

ca te parle?

et depuis ca bug

sudo service domoticz.sh restart
Job for domoticz.service failed because the control process exited with error co de.
See "systemctl status domoticz.service" and "journalctl -xe" for details.

sudo systemctl status domoticz.service
● domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2016-11-03 17:17:22 UTC; 22s ago
Docs: man:systemd-sysv-generator(8)
Process: 1569 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=203

Nov 03 17:17:22 linaro-alip systemd[1]: Failed to start LSB: Home Automation Sys
Nov 03 17:17:22 linaro-alip systemd[1]: domoticz.service: Failed with result 'ex
lines 1-8/8 (END)...skipping...
● domoticz.service - LSB: Home Automation System
Loaded: loaded (/etc/init.d/domoticz.sh; generated; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2016-11-03 17:17:22 UTC; 22s ago
Docs: man:systemd-sysv-generator(8)
Process: 1569 ExecStart=/etc/init.d/domoticz.sh start (code=exited, status=203/EXEC)

Nov 03 17:17:22 linaro-alip systemd[1]: Failed to start LSB: Home Automation System.
Nov 03 17:17:22 linaro-alip systemd[1]: domoticz.service: Failed with result 'exit-code'.

tentative de lançage manuel
./domoticz
2022-07-25 10:36:25.550 Status: Domoticz V2022.1 (c)2012-2022 GizMoCuz
2022-07-25 10:36:25.550 Status: Build Hash: c9526851b, Date: 2022-01-31 08:34:32
2022-07-25 10:36:25.550 Status: Startup Path: /home/linaro/domoticz/
2022-07-25 10:36:25.637 Sunrise: 10:03:00 SunSet: 00:30:00
2022-07-25 10:36:25.637 Day length: 14:27:00 Sun at south: 05:17:00
2022-07-25 10:36:25.637 Civil twilight start: 09:32:00 Civil twilight end: 01:01:00
2022-07-25 10:36:25.638 Nautical twilight start: 08:54:00 Nautical twilight end: 01:39:00
2022-07-25 10:36:25.638 Astronomical twilight start: 08:12:00 Astronomical twilight end: 02:21:00
2022-07-25 10:36:25.791 Status: PluginSystem: Started, Python version '3.5.3', 2 plugin definitions loaded.
2022-07-25 10:36:25.812 Active notification Subsystems: (0/13)
2022-07-25 10:36:25.831 Status: WebServer(HTTP) started on address: :: with port 8080
2022-07-25 10:36:25.875 Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied, trying ::
2022-07-25 10:36:25.880 Status: WebServer(SSL) startup failed on address :: with port: 443: bind: Permission denied, trying 0.0.0.0
2022-07-25 10:36:25.884 Error: WebServer(SSL) startup failed on address 0.0.0.0 with port: 443: bind: Permission denied
2022-07-25 10:36:25.884 Error: WebServer(SSL) check privileges for opening ports below 1024
2022-07-25 10:36:25.887 Starting shared server on: :::6144
2022-07-25 10:36:25.888 Status: RxQueue: queue worker started...
2022-07-25 10:36:25.889 Status: TCPServer: shared server started...
2022-07-25 10:36:27.891 thermostat: Worker thread started.
2022-07-25 10:36:27.891 Status: thermostat: Started.
2022-07-25 10:36:27.892 Status: NotificationSystem: thread started...
2022-07-25 10:36:27.892 Status: thermostat: Entering work loop.
2022-07-25 10:36:27.893 Status: EventSystem: reset all events...
2022-07-25 10:36:27.900 Status: EventSystem: reset all device statuses...
2022-07-25 10:36:28.146 Status: PluginSystem: 1 plugins started.
2022-07-25 10:36:28.150 Status: Python EventSystem: Initializing event module.
2022-07-25 10:36:28.152 Status: EventSystem: Started
2022-07-25 10:36:28.152 Status: EventSystem: Queue thread started...
2022-07-25 10:36:28.653 Status: thermostat: Initialized version 0.4.11, author 'logread'
2022-07-25 10:36:28.663 thermostat: Debug logging mask set to: NONE
2022-07-25 10:36:28.664 Status: thermostat: This version of domoticz allows status logging by the plugin (in verbose mode)
2022-07-25 10:36:28.696 Status: Incoming connection from: ::1
2022-07-25 10:36:28.894 Status: serveur MQTT: Connecting to 192.168.1.22:1883
2022-07-25 10:36:29.099 Status: serveur MQTT: connected to: 192.168.1.22:1883

la domoticz fonctionne

donc j'ai du faire merder le service à force

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » lun. 25 juil. 2022 12:56

journalctl -xe

-- Subject: Process /etc/init.d/domoticz.sh could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /etc/init.d/domoticz.sh could not be executed and failed.
--
-- The error number returned by this process is 8.
Jul 25 10:31:04 linaro-alip systemd[1]: Failed to start LSB: Home Automation System.
-- Subject: Unit domoticz.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit domoticz.service has failed.
--
-- The result is failed.
Jul 25 10:31:04 linaro-alip systemd[1]: domoticz.service: Failed with result 'exit-code'.
Jul 25 10:31:05 linaro-alip sudo[2057]: pam_unix(sudo:session): session closed for user root
Jul 25 10:35:03 linaro-alip sshd[2162]: pam_unix(sshd:auth): authentication failure; logname= uid=0 euid=0 tty=ssh ruser= rhost=192.168.1.105 user=linaro
Jul 25 10:35:06 linaro-alip sshd[2162]: Failed password for linaro from 192.168.1.105 port 59005 ssh2
Jul 25 10:35:12 linaro-alip sshd[2162]: Accepted password for linaro from 192.168.1.105 port 59005 ssh2
Jul 25 10:35:12 linaro-alip sshd[2162]: pam_unix(sshd:session): session opened for user linaro by (uid=0)
Jul 25 10:35:12 linaro-alip systemd-logind[546]: New session c10 of user linaro.
-- Subject: A new session c10 has been created for user linaro
-- Defined-By: systemd
-- Support: https://www.debian.org/support
-- Documentation: http://www.freedesktop.org/wiki/Softwar ... /multiseat
--
-- A new session with the ID c10 has been created for the user linaro.
--
-- The leading process of the session is 2162.
Jul 25 10:38:09 linaro-alip ntpd[1079]: 37.59.63.125 local addr 192.168.1.22 -> <null>
Jul 25 10:38:13 linaro-alip ntpd[1079]: 2001:bc8:2146:101:1234:1234:1f7c:1 local addr 2a01:cb18:c73:5d00:a806:288:3fc8:a5eb -> <null>
Jul 25 10:38:49 linaro-alip ntpd[1079]: 91.224.149.41 local addr 192.168.1.22 -> <null>
Jul 25 10:40:21 linaro-alip ntpd[1079]: 95.81.173.74 local addr 192.168.1.22 -> <null>
Jul 25 10:41:02 linaro-alip sudo[2314]: linaro : TTY=pts/0 ; PWD=/home/linaro/domoticz ; USER=root ; COMMAND=/usr/sbin/service domoticz.sh restart
Jul 25 10:41:02 linaro-alip sudo[2314]: pam_unix(sudo:session): session opened for user root by linaro(uid=0)
Jul 25 10:41:02 linaro-alip systemd[2323]: domoticz.service: Failed at step EXEC spawning /etc/init.d/domoticz.sh: Exec format error
-- Subject: Process /etc/init.d/domoticz.sh could not be executed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- The process /etc/init.d/domoticz.sh could not be executed and failed.
--
-- The error number returned by this process is 8.
Jul 25 10:41:02 linaro-alip systemd[1]: Failed to start LSB: Home Automation System.
-- Subject: Unit domoticz.service has failed
-- Defined-By: systemd
-- Support: https://www.debian.org/support
--
-- Unit domoticz.service has failed.
--
-- The result is failed.
Jul 25 10:41:02 linaro-alip systemd[1]: domoticz.service: Failed with result 'exit-code'.
Jul 25 10:41:02 linaro-alip sudo[2314]: pam_unix(sudo:session): session closed for user root
Jul 25 10:43:20 linaro-alip ntpd[1079]: 195.154.200.68 local addr 192.168.1.22 -> <null>
Jul 25 10:46:45 linaro-alip sudo[2426]: linaro : TTY=pts/0 ; PWD=/home/linaro/domoticz ; USER=root ; COMMAND=/bin/nano domoticz.sh
Jul 25 10:46:45 linaro-alip sudo[2426]: pam_unix(sudo:session): session opened for user root by linaro(uid=0)
Jul 25 10:47:03 linaro-alip sudo[2426]: pam_unix(sudo:session): session closed for user root
Jul 25 10:50:04 linaro-alip ntpd[1079]: 82.64.172.48 local addr 192.168.1.22 -> <null>

dou_dou_69
Messages : 53
Enregistré le : sam. 23 juil. 2022 11:36

Re: demarrage domoticz à la mise sous tension

Message par dou_dou_69 » lun. 25 juil. 2022 19:59

ok bon j'ai refait une install de domoticz via le lien de leur site
sudo bash -c "$(curl -sSfL https://install.domoticz.com)"

il m'a dit qu'il détectait une version j'ai fait update de ca refonctionne

mais toujours obligé de faire sudo serice domoticz.sh restart pour que domoticz se lance.

je ne comprend pas pourquoi le crontab ne résout le problème

Répondre

Retourner vers « Les applications spécialisées du Raspberry Pi »