{"id":224,"date":"2019-04-13T12:11:42","date_gmt":"2019-04-13T12:11:42","guid":{"rendered":"http:\/\/jeedom.sigalou-domotique.fr\/activer-port-bluetooth-au-demarrage-de-jeedom"},"modified":"2024-04-21T13:18:13","modified_gmt":"2024-04-21T11:18:13","slug":"activer-port-bluetooth-au-demarrage-de-jeedom","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/activer-port-bluetooth-au-demarrage-de-jeedom","title":{"rendered":"Aktivieren Sie den Bluetooth-Anschluss beim Start von Jeedom"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-220\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/souciblea.png\" alt=\"Ringelblume\" width=\"586\" height=\"190\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/souciblea.png 586w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/souciblea-300x97.png 300w\" sizes=\"auto, (max-width: 586px) 100vw, 586px\" \/><\/p>\n<p>Wenn Sie wie ich Schwierigkeiten haben, das BLEA-Plugin beim Neustart Ihres Raspberry zu starten, kann es sein, dass <strong>ein Problem bei der Initialisierung des HCI0-Ports.<\/strong><!--more--><\/p>\n<p>Sie werden mir sagen, dass dies in Raspbian konfiguriert werden k\u00f6nnte, aber ich ziehe es vor, es beim Start von Jeedom zu integrieren, so dass es gesichert ist und eine Neuformatierung von Raspbian Lite + eine Wiederherstellung des Jeedom-Backups ausreichen wird, damit alles ohne Manipulation der Dateien des Betriebssystems des Raspberry neu funktioniert.<\/p>\n<p>Dazu erstelle ich ein PHP-Skript, das die folgenden Befehle ausf\u00fchrt:<\/p>\n<ul>\n<li>sudo systemctl enable hciuart<\/li>\n<li>sudo systemctl start hciuart<\/li>\n<li>sudo hciconfig hcio down<\/li>\n<li>sudo hciconfig hcio up<\/li>\n<\/ul>\n<p>Dieses Skript werde ich beim Start mit einem Skript starten.<\/p>\n<h2>Erstellen der Skriptdatei<\/h2>\n<p>Verwenden Sie das Plugon <strong>Skript<\/strong>, erstellen Sie einen Aktionsbefehl <strong>Skript<\/strong> mit Namen <em><strong>Init Bluetooth<\/strong><\/em> und im Feld <strong>Abfrage<\/strong>, legen Sie Folgendes an:<\/p>\n<p><strong>\/var\/www\/html\/plugins\/script\/core\/ressources\/init-bluetooth.php<\/strong><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-221\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scriptblea.png\" alt=\"scriptblea\" width=\"752\" height=\"184\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scriptblea.png 752w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scriptblea-600x147.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scriptblea-300x73.png 300w\" sizes=\"auto, (max-width: 752px) 100vw, 752px\" \/><\/p>\n<p>Geben Sie in dieser Datei init-bluetooth.php Ihr Skript ein:<\/p>\n<p><code>#!\/usr\/bin\/php<\/code><br \/>\n<code>&lt;!--?php$Hostname=\"localhost\";<\/code><br \/>\n<code>$Username=\"pi\";<\/code><br \/>\n<code>$Password=\"raspberry\"; <\/code><\/p>\n<p><code>$ssh = ssh2_connect($Hostname, 22);<\/code><br \/>\n<code>ssh2_auth_password($ssh, $Username, $Password);<\/code><br \/>\n<code>$stream = ssh2_exec($ssh, \"sudo systemctl enable hciuart\");<\/code><br \/>\n<code>$stream = ssh2_exec($ssh, \"sudo systemctl start hciuart\");<\/code><br \/>\n<code>$stream = ssh2_exec($ssh, \"sudo hciconfig hcio down\");<\/code><br \/>\n<code>$stream = ssh2_exec($ssh, \"sudo hciconfig hcio up\");<\/code><br \/>\n<code>?&gt;<\/code><\/p>\n<p>Korrigieren Sie offensichtlich das Login und das Passwort Ihrer Verbindung zum ssh.<\/p>\n<h2>Erstellen des Szenarios, das beim Start gestartet werden soll<\/h2>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-222\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage.png\" alt=\"Start-Szenario\" width=\"969\" height=\"169\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage.png 969w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage-600x105.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage-300x52.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage-768x134.png 768w\" sizes=\"auto, (max-width: 969px) 100vw, 969px\" \/><\/p>\n<p>Alles ist auf dem Bild, beachten Sie, dass das Szenario beim Start ausgef\u00fchrt werden muss <strong>Verursacht<\/strong> und als Ausl\u00f6ser: <strong>#Start#<\/strong><\/p>\n<p>Dieses Szenario enth\u00e4lt nur einen Befehl, den Start des zuvor erstellten Skripts:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-223\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage2.png\" alt=\"Start-Szenario2\" width=\"731\" height=\"120\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage2.png 731w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage2-600x98.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/04\/scenariodemarrage2-300x49.png 300w\" sizes=\"auto, (max-width: 731px) 100vw, 731px\" \/><\/p>\n<h3><\/h3>\n<h3><\/h3>\n<h3>Und nun ist es vorbei. Eine gute Sache geregelt !!<\/h3>","protected":false},"excerpt":{"rendered":"<p>Wenn Sie wie ich Schwierigkeiten haben, das BLEA-Plugin beim Neustart Ihres Raspberry zu starten, kann dies ein Problem bei der Initialisierung des HCI0-Ports sein.<\/p>","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[14,23],"tags":[],"class_list":["post-224","post","type-post","status-publish","format-standard","hentry","category-domotique","category-jeedom-2"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/224","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/comments?post=224"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/224\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=224"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=224"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=224"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}