{"id":261,"date":"2019-09-15T09:36:14","date_gmt":"2019-09-15T09:36:14","guid":{"rendered":"http:\/\/jeedom.sigalou-domotique.fr\/fixer-les-ports-usb-d-un-raspberry"},"modified":"2024-04-21T13:18:38","modified_gmt":"2024-04-21T11:18:38","slug":"fixer-les-ports-usb-d-un-raspberry","status":"publish","type":"post","link":"https:\/\/www.sigalou-domotique.fr\/de\/fixer-les-ports-usb-d-un-raspberry","title":{"rendered":"Anbringen der USB-Anschl\u00fcsse an einem Raspberry"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-260\" src=\"http:\/\/jeedom.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/usbinterro.png\" alt=\"usbinterro\" width=\"120\" height=\"166\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/usbinterro.png 490w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/usbinterro-217x300.png 217w\" sizes=\"auto, (max-width: 120px) 100vw, 120px\" \/><\/p>\n<h3>Teil 1, geeignet f\u00fcr eine Standard-Raspbian-Os-Distribution<\/h3>\n<p>Auf demselben Jeedom habe ich zwei Ger\u00e4te, die USB-Anschl\u00fcsse verwenden:<\/p>\n<ul>\n<li>Ein CM11, der meine X10-Ausr\u00fcstung steuert (ja, ich habe noch welche)<\/li>\n<li>Ein Schl\u00fcssel zWave stick Aeon Labs<\/li>\n<\/ul>\n<p><!--more--><\/p>\n<p>Einer ist auf \/dev\/ttyUSB0 und der andere ist auf \/dev\/ttyUSB1<\/p>\n<p>Aus einem unbekannten Grund kehrt der Raspberry manchmal die Ports um und es gibt Probleme. Ich habe nach M\u00f6glichkeiten gesucht, diese H\u00e4fen einzufrieren.<\/p>\n<p>Um die im Namen der USB-Ger\u00e4te nicht empfohlenen 0 zu vermeiden, habe ich mich daf\u00fcr entschieden, <strong>USB11 (f\u00fcr CM11)<\/strong> und <strong>USB12<\/strong>.<\/p>\n<p>Es wird eins gemacht:<\/p>\n<p><code><\/code>sudo lsusb -v | more<\/p>\n<p>Zeilen kopieren:<\/p>\n<ul>\n<li>idVendor<\/li>\n<li>idProduct<\/li>\n<\/ul>\n<p>Ich habe daher:<\/p>\n<ul>\n<li>idVendor 0x10c4 Cygnal Integrated Products, Inc.<\/li>\n<li>idProduct 0xea60 CP210x UART Bridge \/ myAVR mySmartUSB light<\/li>\n<\/ul>\n<p>(oder f\u00fcr die Gen5 )<\/p>\n<ul>\n<li>idVendor 0x0658 Sigma Designs, Inc.<\/li>\n<li>idProduct 0x0200 Aeotec Z-Stick Gen5 (ZW090) \u2013 UZB<\/li>\n<\/ul>\n<p>und<\/p>\n<ul>\n<li>idVendor 0x067b Prolific Technology, Inc.<\/li>\n<li>idProduct 0x2303 PL2303 Serial Port<\/li>\n<\/ul>\n<p>Wir werden den Raspberry bitten, eine Namensregel \u00fcber die Datei anzuwenden. <strong>\/etc\/udev\/rules.d\/99-usb-serial.rules<\/strong><\/p>\n<p><code>sudo nano \/etc\/udev\/rules.d\/99-usb-serial.rules<\/code><\/p>\n<p>Hinzu kommt:<\/p>\n<p>SUBSYSTEM== \u00bbtty\u00ab, ATTRS{idVendor}== \u00bb067b\u00ab, ATTRS{idProduct}== \u00bb2303\u2033, SYMLINK+= \u00bbttyUSB11\u2033<\/p>\n<p>SUBSYSTEM== \u00bbtty\u00ab, ATTRS{idVendor}== \u00bb10c4\u2033, ATTRS{idProduct}== \u00bbea60\u2033, SYMLINK+= \u00bbttyUSB12\u2033<\/p>\n<p>oder f\u00fcr die Gen5<\/p>\n<p>SUBSYSTEM== \"tty\", ATTRS{idVendor}==\"0658\u2033, ATTRS{idProduct}==\"0200\u2033, SYMLINK+=\"ttyUSB12\u2033<\/p>\n<p>Ein Strg+W und ein Strg+X und ein <strong>reboot<\/strong><\/p>\n<p><strong>Wir finden uns mit den doppelten Ger\u00e4ten wieder, das ist nicht schlimm, also w\u00e4hlen wir \/dev\/ttyUSB12 in der ZWAVE-Plugin-Konfig und \/dev\/ttyUSB11 in der Heyu-Konfig (<code>vi \/root\/.heyu\/x10config<\/code>)<\/strong><\/p>\n<p><strong>Ressourcen:<\/strong><\/p>\n<ul>\n<li><strong><a href=\"https:\/\/www.domoticz.com\/wiki\/PersistentUSBDevices\">https:\/\/www.domoticz.com\/wiki\/PersistentUSBDevices<\/a><\/strong><\/li>\n<li><strong><a href=\"https:\/\/easydomoticz.com\/mon-premier-peripherique-z-wave-2\/\">https:\/\/easydomoticz.com\/mon-premier-peripherique-z-wave-2\/<\/a><\/strong><\/li>\n<\/ul>\n\n\n<h3>\u00a0<\/h3>\n<h3>Teil 2, angepasste Version f\u00fcr HAOS und damit f\u00fcr Home Assistant<\/h3>\n<p><em>Aktualisiert am 30.9.2023<\/em><\/p>\n<p>Die Erkl\u00e4rung des ersten Teils funktioniert n\u00e4mlich bei HAOS nicht.<\/p>\n<p>Es sollte daher nicht versucht werden, die Ports \/dev\/ttyUSB0 und \/dev\/ttyUSB1 einzufrieren, sondern sich in den Integrationen an den richtigen Port (oder Shortcut) zu wenden.<\/p>\n<p>Ich habe zwei Ger\u00e4te, die H\u00e4fen haben, die sich umkehren:<\/p>\n<ul>\n<li>Ein Din-Modul, das mich zur\u00fcckbringt Linky Teleinfo<\/li>\n<li>Ein USB\/RS485-Stick, mit dem ich RS485-Portinformationen in Modbus lesen kann<\/li>\n<\/ul>\n<p>Dank der Bestellung<strong> ls \/dev\/serial\/by-id\/<\/strong><br \/>Ich erhalte eine Liste meiner Ports (es ist egal, auf welchem ttyUSBx sie sind)<\/p>\n<p>In meinem Fall ergibt dies:<\/p>\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5124\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e.png\" alt=\"\" width=\"987\" height=\"57\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e.png 987w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e-600x35.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e-300x17.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/698fcff9527412b1fa8e14d346f35ab15990391e-768x44.png 768w\" sizes=\"auto, (max-width: 987px) 100vw, 987px\" \/><\/a><br \/>Wenn ich aus Neugierde wissen m\u00f6chte, welche Ports betroffen sind, kann ich den Befehl <strong>ls \/dev\/serial\/by-id\/ -l<\/strong><br \/><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5125\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d.png\" alt=\"\" width=\"1073\" height=\"71\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d.png 1073w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d-600x40.png 600w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d-300x20.png 300w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d-1024x68.png 1024w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/b7b14ba75628093cb044d04b31c57196d5303e5d-768x51.png 768w\" sizes=\"auto, (max-width: 1073px) 100vw, 1073px\" \/><\/a><br \/>Sowohl ttyUSB0 als auch ttyUSB1 \u00e4ndern sich je nach Gezeiten oder Wind.<\/p>\n<p>Auf dem Linky-Plugin (IKT-Link) verwende ich daher diesen Portnamen:<br \/>\/dev\/serial\/by-id\/usb-Cartelectronic_Schnittstelle_USB_1_TIC_DA1A8UN0-if00-port0<\/p>\n<p><a href=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/f0d4be301916acc52e3832f538c85cee085a2c76.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-5126\" src=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/f0d4be301916acc52e3832f538c85cee085a2c76.png\" alt=\"\" width=\"563\" height=\"165\" srcset=\"https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/f0d4be301916acc52e3832f538c85cee085a2c76.png 563w, https:\/\/www.sigalou-domotique.fr\/wp-content\/uploads\/2019\/09\/f0d4be301916acc52e3832f538c85cee085a2c76-300x88.png 300w\" sizes=\"auto, (max-width: 563px) 100vw, 563px\" \/><\/a><\/p>\n<p>Auf dem Modbus-Link (konfiguriert in Yaml) verwende ich daher:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"yaml\">name: modbus_hub Typ: serial #Hafen: \/dev\/ttyUSB1 port: \/dev\/serial\/by-id\/usb-1a86_USB2.0-Ser_-if00-port0<\/pre>\n<ul>\n<li>Erl\u00e4uterte Elemente auf <a href=\"https:\/\/forum.hacf.fr\/t\/figer-dev-ttyusb0-et-dev-ttyusb1\/28655\/2\" target=\"_blank\" rel=\"noopener\">Das Forum von HA<\/a><\/li>\n<\/ul>","protected":false},"excerpt":{"rendered":"<p>Teil 1, geeignet f\u00fcr eine Standard-Raspbian-Os-Verteilung Auf demselben Jeedom habe ich zwei Ger\u00e4te, die USB-Anschl\u00fcsse verwenden: Ein CM11, der meine X10-Ger\u00e4te steuert (ja, ich habe noch welche) Ein zWave-Stick von Aeon Labs<\/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],"tags":[94],"class_list":["post-261","post","type-post","status-publish","format-standard","hentry","category-domotique","tag-raspberry"],"acf":[],"_links":{"self":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/261","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=261"}],"version-history":[{"count":0,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/posts\/261\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/media?parent=261"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/categories?post=261"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.sigalou-domotique.fr\/de\/wp-json\/wp\/v2\/tags?post=261"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}