Das mit der Ruhe ist so eine Sache...
Hab jetzt die Ansicht geändert, Ordner sind da.
Ich Danke Dir.
NEWS
Steinmetz_4
@Steinmetz_4
Blutiger Anfänger, der sich alles "rausgoogelt"
Best posts made by Steinmetz_4
-
RE: Gelöst: Raspi stirbt nach Backup ab
-
[Gelöst:] Adjust settings in the .env File
Servus,
ich wollte heute den Ds18b20 die Sensoren auf einem anderen System anzeigen lassen.
Soweit bin ich bisher, aber ich kann mir keinen Reim auf "Please adjust the settings in the .env file." machen.Kann mir jemand weiterhelfen?
pi@pi4-Master:~ $ mkdir ~/ds18b20-remote pi@pi4-Master:~ $ cd ~/ds18b20-remote pi@pi4-Master:~/ds18b20-remote $ wget -O remote-client-setup.js http://192.168.178.68:8081/adapter/ds18b20/remote-client-setup.js --2022-11-23 09:48:58-- http://192.168.178.68:8081/adapter/ds18b20/remote-client-setup.js Connecting to 192.168.178.68:8081... connected. HTTP request sent, awaiting response... 200 OK Length: 39797 (39K) [application/javascript] Saving to: ‘remote-client-setup.js’ remote-client-setup 100%[===================>] 38.86K --.-KB/s in 0.003s 2022-11-23 09:48:58 (14.5 MB/s) - ‘remote-client-setup.js’ saved [39797/39797] pi@pi4-Master:~/ds18b20-remote $ node remote-client-setup.js - ioBroker.ds18b20 remote client - Basic setup done. Please adjust the settings in the .env file. To manually start the client just run: node ds18b20-remote-client.js To setup the SystemD service, please run: sudo cp iobroker-ds18b20-remote.service /etc/systemd/system/iobroker-ds18b20-remote.service sudo systemctl daemon-reload sudo systemctl enable iobroker-ds18b20-remote.service sudo systemctl start iobroker-ds18b20-remote.service
pi@pi4-Master:~/ds18b20-remote $ sudo nano remote-client-setup.js
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const fs = require("fs"); const os = require("os"); const path = require("path"); const SYSTEMD_SERVICE_NAME = 'iobroker-ds18b20-remote.service'; const files = { 'common.js': 'InVzZSBzdHJpY3QiOwpPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwpleHBvcnRzLmRlY3J5cHQgPSBleHBvcnRzLmVuY3J5cHQgPSBleHBvcnRzLlJFTU9URV9QUk9UT0NPTF9WRVJTSU9OID0gdm9pZCAwOwpjb25zdCBjcnlwdG8gPSByZXF1aXJlKCJjcnlwdG8iKTsKZ> 'ds18b20-remote-client.js': 'InVzZSBzdHJpY3QiOwp2YXIgX19hd2FpdGVyID0gKHRoaXMgJiYgdGhpcy5fX2F3YWl0ZXIpIHx8IGZ1bmN0aW9uICh0aGlzQXJnLCBfYXJndW1lbnRzLCBQLCBnZW5lcmF0b3IpIHsKICAgIGZ1bmN0aW9uIGFkb3B0KHZhbHVlKSB7IHJldHVybiB2YWx1ZSBpbnN0YW5jZW9mIFAgPyB2YWx1ZSA6IG5ldyBQKGZ1bmN0aW> 'logger.js': 'InVzZSBzdHJpY3QiOwpPYmplY3QuZGVmaW5lUHJvcGVydHkoZXhwb3J0cywgIl9fZXNNb2R1bGUiLCB7IHZhbHVlOiB0cnVlIH0pOwpleHBvcnRzLkxvZ2dlciA9IHZvaWQgMDsKY2xhc3MgTG9nZ2VyIHsKICAgIGxvZyguLi5hcmdzKSB7CiAgICAgICAgY29uc29sZS5sb2coLi4uYXJncyk7CiAgICB9CiAgICBkZWJ1ZyguLi5hcmdzKSB7C> }; for (const f in files) { const content = Buffer.from(files[f], 'base64').toString('utf-8'); fs.writeFileSync(f, content, { encoding: 'utf-8' }); } const systemDContent = `[Unit] Description=ioBroker.ds18b20 remote client Documentation=https://github.com/crycode-de/ioBroker.ds18b20 After=network.target [Service] Type=simple User=${os.userInfo().username} WorkingDirectory=${__dirname} ExecStart=${process.execPath} ${path.join(__dirname, 'ds18b20-remote-client.js')} Restart=on-failure [Install] WantedBy=multi-user.target `; const systemDFile = path.join(__dirname, SYSTEMD_SERVICE_NAME); fs.writeFileSync(systemDFile, systemDContent, { encoding: 'utf-8' }); const dotEnvContent = `# Settings for the ioBroker.ds18b20 remote client # Unique ID for this remote system SYSTEM_ID=my-remote # IP or hostname of the ioBroker host running the adapter ADAPTER_HOST=192.168.178.68 # Port from the adapter config ADAPTER_PORT=1820 # Encryption key from the adapter config ADAPTER_KEY=35305d096dc8eef7db46d575417926bafxxxxxxxxxxxxxxxxxxxxxx # Enable debug log output #DEBUG=1 # System path of the 1-wire devices #W1_DEVICES_PATH=/sys/bus/w1/devices `; const dotEnvFile = path.join(__dirname, '.env'); if (!fs.existsSync(dotEnvFile)) { fs.writeFileSync(dotEnvFile, dotEnvContent, { encoding: 'utf-8' }); } console.log(`- ioBroker.ds18b20 remote client - Basic setup done. Please adjust the settings in the .env file. To manually start the client just run: node ds18b20-remote-client.js To setup the SystemD service, please run: sudo cp ${SYSTEMD_SERVICE_NAME} /etc/systemd/system/${SYSTEMD_SERVICE_NAME} sudo systemctl daemon-reload sudo systemctl enable ${SYSTEMD_SERVICE_NAME} sudo systemctl start ${SYSTEMD_SERVICE_NAME} `); //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2V0dXAuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvcmVtb3RlL3NldHVwLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBTUEseUJBQXlCO0FBQ3pCLHlCQUF5QjtBQUN6Qiw2QkFBNkI7QUFFN0IsTUFBTSxvQkFBb>
pi@pi4-Master:~/ds18b20-remote $ node ds18b20-remote-client.js - ioBroker.ds18b20 remote client - [Error] No ADAPTER_HOST given!
pi@pi4-Master:~/ds18b20-remote $ sudo systemctl status iobroker-ds18b20-remote.service ● iobroker-ds18b20-remote.service - ioBroker.ds18b20 remote client Loaded: loaded (/etc/systemd/system/iobroker-ds18b20-remote.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2022-11-23 10:56:00 CET; 23s ago Docs: https://github.com/crycode-de/ioBroker.ds18b20 Process: 10290 ExecStart=/usr/bin/node /home/pi/ds18b20-remote/ds18b20-remote-client.js (code=exited, status=1/FAILURE) Main PID: 10290 (code=exited, status=1/FAILURE) CPU: 183ms Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Scheduled restart job, restart counter is at 5. Nov 23 10:56:00 pi4-Master systemd[1]: Stopped ioBroker.ds18b20 remote client. Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Start request repeated too quickly. Nov 23 10:56:00 pi4-Master systemd[1]: iobroker-ds18b20-remote.service: Failed with result 'exit-code'. Nov 23 10:56:00 pi4-Master systemd[1]: Failed to start ioBroker.ds18b20 remote client. pi@pi4-Master:~/ds18b20-remote $
Für alle die auch nicht so gut auf Linux sind, die Lösung ist:
pi@pi4-Master:~/ds18b20-remote $ sudo nano .env
sieht dann so aus:
# Settings for the ioBroker.ds18b20 remote client # Unique ID for this remote system SYSTEM_ID=Pi-4-Master # IP or hostname of the ioBroker host running the adapter ADAPTER_HOST=192.168.178.68 # Port from the adapter config ADAPTER_PORT=1820 # Encryption key from the adapter config ADAPTER_KEY=dea3458098c294f22546bbd5367a224a4b9082808xxxxxxxxx # Enable debug log output #DEBUG=1 # System path of the 1-wire devices #W1_DEVICES_PATH=/sys/bus/w1/devices
Mfg
Tom
Latest posts made by Steinmetz_4
-
Alexa ssml spricht doppelt
Hallo,
ich habe seit einiger Zeit das Problem, dass meine ssml Ausgaben über Alexa immer zweimal hintereinander kommen.
Das Problem trat plötzlich und ohne eine bewusste Änderung meinerseits auf.Wenn ich meinen Echo nach dem "Aussenklima" frage, kommt das "pling" und die Sprachausgabe startet wie sie soll. Danach kommt die gleiche Ausgabe ein zweites mal. Das selbe ist beim "Innenklima".
Auch ein anderes Script auf einem anderen Echo kommt Doppelt.
Hier die debug Ausgabe
alexa2.0 2024-10-22 14:20:34.444 debug Alexa-Remote: Sending Request with {"host":"eu-api-alexa.amazon.de","path":"/api/behaviors/preview","method":"POST","timeout":10000,"headers":{"Accept-Language":"de-DE"}} and data={"behaviorId":"PREVIEW","sequenceJson":"{\"@type\":\"com.amazon.alexa.behaviors.model.Sequence\",\"startNode\":{\"@type\":\"com.amazon.alexa.behaviors.model.SerialNode\",\"name\":null,\"nodesToExecute\":[{\"@type\":\"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\",\"operationPayload\":{\"customerId\":\"xxxxxxxxxxxx\",\"expireAfter\":\"PT5S\",\"content\":[{\"locale\":\"de-DE\",\"display\":{\"title\":\"ioBroker\",\"body\":\"Hier die Übersicht des Aussenklimas. Die Aussentemperatur ist derzeit 20 grad. Der Dämmerungswert ist 934,4 Lux.Die Sonne geht um 07:49 auf und um 18:14 unter Es fällt kein Regen. Die Windgeschwindigkeit liegt bei 0,28 Meter pro Sekunde. Der Luftdruckist mit 1027 Millibar, oder Hektopascal, hoch..\"},\"speak\":{\"type\":\"ssml\",\"value\":\"<speak><voice name=\\\"Vicki\\\">Hier die Übersicht des Aussenklimas. <break time=\\\"1s\\\"/>Die Aussentemperatur ist derzeit 20 grad. <break time=\\\"1s\\\"/>Der Dämmerungswert ist 934,4 Lux.<break time=\\\"1s\\\"/>Die Sonne geht um 07:49 auf und um 18:14 unter<break time=\\\"1s\\\"/> Es fällt <say-as interpret-as=\\\"interjection\\\">kein Regen</say-as>. <break time=\\\"1s\\\"/> Die Windgeschwindigkeit liegt bei 0,28 Meter pro Sekunde. <break time=\\\"1s\\\"/>Der Luftdruckist mit 1027 Millibar, oder Hektopascal, hoch.</voice>.</speak>\"}}],\"target\":{\"customerId\":\"xxxxxxxxxxxxxx\",\"devices\":[{\"deviceSerialNumber\":\"xxxxxxxxxxxx\",\"deviceTypeId\":\"A1RABVCI4QCIKC\"}]}},\"type\":\"AlexaAnnouncement\",\"skillId\":\"amzn1.ask.1p.routines.messaging\"}]}}","status":"ENABLED"} alexa2.0 2024-10-22 14:20:34.443 debug Alexa-Remote: Authentication check successfull alexa2.0 2024-10-22 14:20:34.443 debug Alexa-Remote: Response: {"authentication":{"authenticated":true,"canAccessPrimeMusicContent":true,"customerEmail":"xxxxxxxxx","customerId":"xxxxxxxxxxx","customerName":"Txxxxxxxxxxxx"}} alexa2.0 2024-10-22 14:20:34.298 debug Alexa-Remote: Sending Request with {"host":"eu-api-alexa.amazon.de","path":"/api/bootstrap?version=0","method":"GET","timeout":10000,"headers":{"Accept-Language":"de-DE"}} alexa2.0 2024-10-22 14:20:34.294 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxxx.Commands.ssml: {"val":"<speak><voice name=\"Vicki\">Hier die Übersicht des Aussenklimas. <break time=\"1s\"/>Die Aussentemperatur ist derzeit 20 grad. <break time=\"1s\"/>Der Dämmerungswert ist 934,4 Lux.<break time=\"1s\"/>Die Sonne geht um 07:49 auf und um 18:14 unter<break time=\"1s\"/> Es fällt <say-as interpret-as=\"interjection\">kein Regen</say-as>. <break time=\"1s\"/> Die Windgeschwindigkeit liegt bei 0,28 Meter pro Sekunde. <break time=\"1s\"/>Der Luftdruckist mit 1027 Millibar, oder Hektopascal, hoch.</voice>.</speak>","ack":false,"ts":1729599634282,"q":0,"c":"script.js.common.Klimabersicht.Status_Klima_Aussen_über_Alexa","from":"system.adapter.javascript.0","user":"system.user.admin","lc":1729599634282} alexa2.0 2024-10-22 14:20:31.479 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxxxxxxxxxxxx.Player.muted: {"val":false,"ack":true,"ts":1729599631476,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1714633335137} alexa2.0 2024-10-22 14:20:31.437 debug State changed alexa2.0.Echo-Devices.15DB4C9C13xxxxxxxxxxxxxxx.Player.volume: {"val":19,"ack":true,"ts":1729599631433,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1729510537728} alexa2.0 2024-10-22 14:20:31.426 debug Alexa-Push-Connection Device Volume change for 15DB4xxxxxxxxxxxxxxx -> 19/false alexa2.0 2024-10-22 14:20:31.425 debug Alexa-Remote HTTP2-PUSH: Command PUSH_VOLUME_CHANGE: { "dopplerId": { "deviceSerialNumber": "15DB4C9xxxxxxxxxxxxxxxxxxx", "deviceType": "A1RTAM01W29CUP" }, "volumeSetting": 19, "isMuted": false, "destinationUserId": "xxxxxxxxxxx" } alexa2.0 2024-10-22 14:20:30.503 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxxxxxx.Player.muted: {"val":false,"ack":true,"ts":1729599630495,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1716318842836} alexa2.0 2024-10-22 14:20:30.426 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxxxx.Player.volume: {"val":50,"ack":true,"ts":1729599630411,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1729599428507} alexa2.0 2024-10-22 14:20:30.422 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxxxxx.Preferences.equalizerTreble: {"val":0,"ack":true,"ts":1729599630411,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1700199967219} alexa2.0 2024-10-22 14:20:30.418 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxxx.Preferences.equalizerMidRange: {"val":0,"ack":true,"ts":1729599630410,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1700199967195} alexa2.0 2024-10-22 14:20:30.415 debug State changed alexa2.0.Echo-Devices.xxxxxxxxxx.Preferences.equalizerBass: {"val":0,"ack":true,"ts":1729599630410,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1700199967166} alexa2.0 2024-10-22 14:20:30.402 debug Alexa-Push-Connection Device Volume change for xxxxxxxxxx -> 50/false alexa2.0 2024-10-22 14:20:30.401 debug Alexa-Remote HTTP2-PUSH: Command PUSH_VOLUME_CHANGE: { "dopplerId": { "deviceSerialNumber": "xxxxxxxx", "deviceType": "A3S5BH2HU6VAYF" }, "volumeSetting": 50, "isMuted": false, "destinationUserId": "xxxxxxxxxxxxxxx" } alexa2.0 2024-10-22 14:20:30.399 debug Alexa-Push-Connection Equalizer change for xxxxxxxxxx -> 0/0/0 alexa2.0 2024-10-22 14:20:30.398 debug Alexa-Remote HTTP2-PUSH: Command PUSH_EQUALIZER_STATE_CHANGE: { "dopplerId": { "deviceSerialNumber": "Gxxxxxxxxxxxx", "deviceType": "A3S5BH2HU6VAYF" }, "bass": 0, "midrange": 0, "treble": 0, "destinationUserId": "xxxxxxxxxxx" } alexa2.0 2024-10-22 14:18:49.492 debug Alexa-Remote HTTP2-PUSH: Send Ping alexa2.0 2024-10-22 14:17:08.595 debug State changed alexa2.0.Echo-Devices.xxxxxxx.Player.muted: {"val":false,"ack":true,"ts":1729599428591,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1716318842836} alexa2.0 2024-10-22 14:17:08.511 debug State changed alexa2.0.Echo-Devices.xxxxxxxxx.Player.volume: {"val":50,"ack":true,"ts":1729599428507,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1729599428507} alexa2.0 2024-10-22 14:17:08.500 debug Alexa-Push-Connection Device Volume change for -> 50/false alexa2.0 2024-10-22 14:17:08.499 debug Alexa-Remote HTTP2-PUSH: Command PUSH_VOLUME_CHANGE: { "dopplerId": { "deviceSerialNumber": "xxxxxxx", "deviceType": "A3S5BH2HU6VAYF" }, "volumeSetting": 50, "isMuted": false, "destinationUserId": "xxxxxxxxx" } alexa2.0 2024-10-22 14:17:08.386 debug State changed alexa2.0.Echo-Devices.Gxxxxxxxxxxxx.Player.muted: {"val":false,"ack":true,"ts":1729599428383,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1716318842836} alexa2.0 2024-10-22 14:17:08.300 debug State changed alexa2.0.Echo-Devices.Gxxxxxxxxxxx.Player.volume: {"val":47,"ack":true,"ts":1729599428295,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1729599428295} alexa2.0 2024-10-22 14:17:08.289 debug Alexa-Push-Connection Device Volume change for Gxxxxxxxxxxxxx -> 47/false alexa2.0 2024-10-22 14:17:08.288 debug Alexa-Remote HTTP2-PUSH: Command PUSH_VOLUME_CHANGE: { "dopplerId": { "deviceSerialNumber": "Gxxxxxxxxx", "deviceType": "A3S5BH2HU6VAYF" }, "volumeSetting": 47, "isMuted": false, "destinationUserId": "xxxxxxxxxxxx" } alexa2.0 2024-10-22 14:17:08.071 debug State changed alexa2.0.Echo-Devices.Gxxxxxxxx.Player.muted: {"val":false,"ack":true,"ts":1729599428068,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1716318842836} alexa2.0 2024-10-22 14:17:08.027 debug State changed alexa2.0.Echo-Devices.Gxxxxxxxxxxx.Player.volume: {"val":43,"ack":true,"ts":1729599428024,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1729599428024} alexa2.0 2024-10-22 14:17:08.017 debug Alexa-Push-Connection Device Volume change for Gxxxxxxxxxx -> 43/false alexa2.0 2024-10-22 14:17:08.016 debug Alexa-Remote HTTP2-PUSH: Command PUSH_VOLUME_CHANGE: { "dopplerId": { "deviceSerialNumber": "Gxxxxxxxxxx", "deviceType": "A3S5BH2HU6VAYF" }, "volumeSetting": 43, "isMuted": false, "destinationUserId": "xxxxxxxxxx" }
Hier noch ein script
<xml xmlns="https://developers.google.com/blockly/xml"> <block type="on" id="v/3LX.x5G5SR^o-=sZRG" x="-1487" y="-1662"> <field name="OID">javascript.0.scriptEnabled.common.Klimabersicht.Status_Klima_Aussen_über_Alexa</field> <field name="CONDITION">true</field> <field name="ACK_CONDITION"></field> <statement name="STATEMENT"> <block type="control" id="@A(]8a~1^^%zD3wbT*yf"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">alexa2.0.Echo-Devices..Commands.ssml</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="text_join" id="jG;)]4v#8:|=bGkqn!_9"> <mutation items="23"></mutation> <value name="ADD0"> <block type="text" id="p{DY7`mkxb*:3iSIeIMu"> <field name="TEXT"><speak><voice name="Vicki">Hier die Übersicht des Aussenklimas. <break time="1s"/></field> </block> </value> <value name="ADD1"> <block type="text" id="zFRK]JrNJ3=n9T59?fo="> <field name="TEXT">Die Aussentemperatur ist derzeit </field> </block> </value> <value name="ADD2"> <block type="get_value" id="Hr|.0Z}4v@NnW8@+]DNH"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Aussen.Aussentemperatur_Wetterstation</field> </block> </value> <value name="ADD3"> <block type="text" id="o3IaPxUKlVO^i_RPa7_~"> <field name="TEXT"> grad. <break time="1s"/></field> </block> </value> <value name="ADD4"> <block type="text" id="fYRB;i(ZRQj:$Mtuxds8"> <field name="TEXT">Der Dämmerungswert ist </field> </block> </value> <value name="ADD5"> <block type="get_value" id="HM((8oe-90Z~KhX{%51!"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Werte_umgerechnet.Dämmerung_dezimal</field> </block> </value> <value name="ADD6"> <block type="text" id="cH,8|:s%00#nCT|qxaW5"> <field name="TEXT"> Lux.<break time="1s"/></field> </block> </value> <value name="ADD7"> <block type="text" id="PX{nDi|a:_yqCI,kh8`t"> <field name="TEXT">Die Sonne geht um </field> </block> </value> <value name="ADD8"> <block type="get_value" id="J4dhc`hvevBi}/kG/kJ("> <field name="ATTR">val</field> <field name="OID">javascript.0.Astro.sunrise</field> </block> </value> <value name="ADD9"> <block type="text" id="[lq$oX8fS)i.%cP83Ry5"> <field name="TEXT"> auf und um </field> </block> </value> <value name="ADD10"> <block type="get_value" id="CR{[kcI8/f]es/FR3[6s"> <field name="ATTR">val</field> <field name="OID">javascript.0.Astro.sunset</field> </block> </value> <value name="ADD11"> <block type="text" id="2zLmgI[@6-;MNUesu=5U"> <field name="TEXT"> unter</field> </block> </value> <value name="ADD12"> <block type="text" id="Idyrne0s%.9ep$tR_Zwc"> <field name="TEXT"><break time="1s"/> Es fällt <say-as interpret-as="interjection"></field> </block> </value> <value name="ADD13"> <block type="get_value" id=",/M~?c)h]j((^,823c*n"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Aussen.Regen/kein_Regen</field> </block> </value> <value name="ADD14"> <block type="text" id="u^vV:zQd||ejD!n}n~CS"> <field name="TEXT"></say-as>. <break time="1s"/> Die Windgeschwindigkeit liegt bei </field> </block> </value> <value name="ADD15"> <block type="get_value" id="C*,V^wbU;eG#]tp`589u"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Werte_umgerechnet.Wind_dezimal</field> </block> </value> <value name="ADD16"> <block type="text" id="*t#ZQz0h{eDz)}$iC^NP"> <field name="TEXT"> Meter pro Sekunde. <break time="1s"/></field> </block> </value> <value name="ADD17"> <block type="text" id="`zUa0eH9^2ho?$2}[G7Z"> <field name="TEXT">Der Luftdruckist mit </field> </block> </value> <value name="ADD18"> <block type="get_value" id="7nVe=YX3*v^AR)fhT,30"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Innen.Luftdruck_in_Hektopascal</field> </block> </value> <value name="ADD19"> <block type="text" id="N}xrsK![%`U:l~Sk!bDp"> <field name="TEXT"> Millibar, oder Hektopascal, </field> </block> </value> <value name="ADD20"> <block type="get_value" id="IJuoBSxl[x!j5)YPWH*x"> <field name="ATTR">val</field> <field name="OID">0_userdata.0.Innen.Luftdruck_Barometrisch</field> </block> </value> <value name="ADD21"> <block type="text" id="yFJbPko=U$tCHEDu,o^Q"> <field name="TEXT">.</voice>.</speak></field> </block> </value> </block> </value> <next> <block type="control" id="N3s18q@Lc,B)JP}ZeKdu"> <mutation xmlns="http://www.w3.org/1999/xhtml" delay_input="false"></mutation> <field name="OID">javascript.0.scriptEnabled.common.Klimabersicht.Status_Klima_Aussen_über_Alexa</field> <field name="WITH_DELAY">FALSE</field> <value name="VALUE"> <block type="logic_boolean" id="8j[nQUAsE-~IJPCV|6$)"> <field name="BOOL">FALSE</field> </block> </value> </block> </next> </block> </statement> </block> </xml>
Hat noch jemand dieses Problem?
P.S. Iobroker, alle Adapter und Raspi sind aktuell
-
RE: [Gelöst] MQTT-Verbindung via Python script
Tada, es funktioniert!
Ich danke Dir!
War ein holpriger Weg aber es läuft...Habe beide Punkte auskommentiert.
P.S. Ich bin die Ruhe in Person...
Mfg
Tom -
RE: [Gelöst] MQTT-Verbindung via Python script
@homoran sagte in MQTT-Verbindung:
@steinmetz_4 sagte in MQTT-Verbindung:
Ich denke schon.
jepp! dann ist die Frage auch eindeutig geklärt
Verzeiht
Ich weiß, dass ich nichts weiß (https://de.wikipedia.org/wiki/Ich_weiß,_dass_ich_nichts_weiß)
-
RE: [Gelöst] MQTT-Verbindung via Python script
Sorry, nein !
ich tüftel an allen Ecken und Enden!#
aktuel:
#!/usr/bin/python3 import sys import paho.mqtt.client as mqtt import ssl # set the variables # Path to the Sensor systempath # 28-01142f7ba71a has to be changed to you sensor path! sensor = '/sys/bus/w1/devices/28-3c01f096929e/w1_slave' broker='192.168.178.185' port=1879 publish_topic="house/pi-ds18b20" clientid='python-mqtt-ds18b20' username='Tom' password='Atomameise' insecure=True qos=1 retain_message=True # do the stuff def readTempSensor(sensorName) : f = open(sensorName, 'r') lines = f.readlines() f.close() return lines def readTempLines(sensorName) : lines = readTempSensor(sensorName) while lines[0].strip()[-3:] != 'YES': time.sleep(0.2) lines = readTempSensor(sensorName) temperaturStr = lines[1].find('t=') if temperaturStr != -1 : tempData = lines[1][temperaturStr+2:] tempCelsius = float(tempData) / 1000.0 tempKelvin = 273 + float(tempData) / 1000 tempFahrenheit = float(tempData) / 1000 * 9.0 / 5.0 + 32.0 return [tempCelsius, tempKelvin, tempFahrenheit] #MQTT Connection client=mqtt.Client(clientid) client.username_pw_set(username, password) client.tls_set(cert_reqs=ssl.CERT_NONE) #no client certificate needed client.tls_insecure_set(insecure) client.connect(broker, port) client.loop_start() client.publish("{}/temperature".format(publish_topic),"{:.2f}".format(readTempLines(sensor)[0]),qos,retain_message) client.disconnect() client.loop_stop()
Mfg
-
RE: [Gelöst] MQTT-Verbindung via Python script
Ich kann Dir nicht mehr sagen.
Wenn ich wüsste was falsch ist, würde ich hier nicht fragen. -
RE: [Gelöst] MQTT-Verbindung via Python script
Wen meinst Du?
MQTT Adapter? läuft in IoBroker unter 192.168.178.185 -
RE: [Gelöst] MQTT-Verbindung via Python script
Da bin ich wieder...
Das Python script soll senden (temperatur) an IoBroker MQTT
Ich bin auch schon ein Stück weiter...
das script versucht zu senden, kommt aber nicht durch...!
#!/usr/bin/python3 import sys import paho.mqtt.client as mqtt import ssl # set the variables # Path to the Sensor systempath # 28-01142f7ba71a has to be changed to you sensor path! sensor = '/sys/bus/w1/devices/28-3c01f096929e/w1_slave' broker='FQDN / 192.168.178.185' port=1879 publish_topic="house/pi-ds18b20" clientid='python-mqtt-ds18b20' username='Tom' password='xxxxxxxxxx' insecure=True qos=1 retain_message=True # do the stuff def readTempSensor(sensorName) : f = open(sensorName, 'r') lines = f.readlines() f.close() return lines def readTempLines(sensorName) : lines = readTempSensor(sensorName) while lines[0].strip()[-3:] != 'YES': time.sleep(0.2) lines = readTempSensor(sensorName) temperaturStr = lines[1].find('t=') if temperaturStr != -1 : tempData = lines[1][temperaturStr+2:] tempCelsius = float(tempData) / 1000.0 tempKelvin = 273 + float(tempData) / 1000 tempFahrenheit = float(tempData) / 1000 * 9.0 / 5.0 + 32.0 return [tempCelsius, tempKelvin, tempFahrenheit] #MQTT Connection client=mqtt.Client(clientid) client.username_pw_set(username, password) client.tls_set(cert_reqs=ssl.CERT_NONE) #no client certificate needed client.tls_insecure_set(insecure) client.connect(broker, port) client.loop_start() client.publish("{}/temperature".format(publish_topic),"{:.2f}".format(readTempLines(sensor)[0]),qos,retain_message) client.disconnect() client.loop_stop()
Mfg
-
RE: [Gelöst] MQTT-Verbindung via Python script
@homoran sagte in MQTT-Verbindung:
welche MQTT Topologie nutzst du?
Da denke ich mal, dass es PUSH/SUBSCRIBE-Topologie ist.
Watermeter läuft bereits.