udo1toni hat geschrieben: ↑18. Aug 2023 17:21
Hi Udo,
sorry vergessen zu sagen das auf dem Wemos D1 (nenne ihn mal 2) Tasmota läuft.
In meinem Druckerschrank ist auch ein Wemos D1 ( nenne ihn mal 1) mit Tasmota an dem ist ein DHT22 Sensor angeschloßen, die Werte habe ich in openHab.
Der Wemos 2 soll mit ins Wohnzimmer um die Übersicht zu behalten beim Drucken.
In Wemos 2 habe ich zwei Tasmota Regeln um mir die daten von Wemos 1 auf Wemos 2 zu holen.
Code: Alles auswählen
Rule1 ON mqtt#connected DO Subscribe DruckerTemp, tele/3D_Drucker_Temp_Luft/SENSOR, AM2301.Temperature ENDON ON Event#DruckerTemp DO DisplayText[l1c1]Temp %value%~dfC ENDON
Rule2 ON mqtt#connected DO Subscribe DruckerHumi, tele/3D_Drucker_Temp_Luft/SENSOR, AM2301.Humidity ENDON ON Event#DruckerHumi DO DisplayText[l2c1]Feuchte %value% % ENDON
Das funktioniert auch super, allerdings schaffe ich es nicht über Subscribe mir die Daten von octoPrint zu holen, da dort keine tele/ gesendet wird.
MQTT FX liefert mir unter octoPrint/progress/printing folgendes:
Code: Alles auswählen
{"location": "local", "path": "BB1_Adapter LR44 zu LR41 passt.gcode", "progress": 58, "printer_data": {"state": {"text": "Printing", "flags": {"operational": true, "printing": true, "cancelling": false, "pausing": false, "resuming": false, "finishing": false, "closedOrError": false, "error": false, "paused": false, "ready": false, "sdReady": false}, "error": ""}, "job": {"file": {"name": "BB1_Adapter LR44 zu LR41 passt.gcode", "path": "BB1_Adapter LR44 zu LR41 passt.gcode", "display": "BB1_Adapter LR44 zu LR41 passt.gcode", "origin": "local", "size": 255558, "date": 1676819986}, "estimatedPrintTime": 309.90948992092274, "averagePrintTime": 549.6826381054452, "lastPrintTime": 582.7677503828891, "filament": {"tool0": {"length": 162.58849999999947, "volume": 0.0}}, "user": "Biqu"}, "currentZ": 1.8, "progress": {"completion": 58.09248781098616, "filepos": 148460, "printTime": 348, "printTimeLeft": 379, "printTimeLeftOrigin": "linear"}, "offsets": {}, "resends": {"count": 0, "transmitted": 4892, "ratio": 0}}, "_timestamp": 1692376009}
Die Topics in MQTT FX von octoPrint sind:
Code: Alles auswählen
octoPrint/event/Alert
octoPrint/event/CaptureDone
octoPrint/event/CaptureStart
octoPrint/event/ChartMarked
octoPrint/event/ClientAuthed
octoPrint/event/ClientClosed
octoPrint/event/ClientOpened
octoPrint/event/CommandSuppressed
octoPrint/event/Connected
octoPrint/event/Connecting
octoPrint/event/ConnectionsAutorefreshed
octoPrint/event/Disconnected
octoPrint/event/Disconnecting
octoPrint/event/Dwelling
octoPrint/event/EStop
octoPrint/event/Error
octoPrint/event/FilamentChange
octoPrint/event/FileAdded
octoPrint/event/FileDeselected
octoPrint/event/FileRemoved
octoPrint/event/FileSelected
octoPrint/event/FirmwareData
octoPrint/event/GcodeScriptAfterPrintCancelledFinished
octoPrint/event/GcodeScriptAfterPrintCancelledRunning
octoPrint/event/GcodeScriptAfterPrintDoneFinished
octoPrint/event/GcodeScriptAfterPrintDoneRunning
octoPrint/event/GcodeScriptAfterPrintPausedFinished
octoPrint/event/GcodeScriptAfterPrintPausedRunning
octoPrint/event/GcodeScriptBeforePrintResumedFinished
octoPrint/event/GcodeScriptBeforePrintResumedRunning
octoPrint/event/GcodeScriptBeforePrintStartedFinished
octoPrint/event/GcodeScriptBeforePrintStartedRunning
octoPrint/event/Home
octoPrint/event/MetadataAnalysisFinished
octoPrint/event/MetadataAnalysisStarted
octoPrint/event/MetadataStatisticsUpdated
octoPrint/event/MovieDone
octoPrint/event/MovieRendering
octoPrint/event/PositionUpdate
octoPrint/event/PrintCancelled
octoPrint/event/PrintCancelling
octoPrint/event/PrintDone
octoPrint/event/PrintFailed
octoPrint/event/PrintPaused
octoPrint/event/PrintResumed
octoPrint/event/PrintStarted
octoPrint/event/PrinterProfileModified
octoPrint/event/PrinterStateChanged
octoPrint/event/SettingsUpdated
octoPrint/event/Shutdown
octoPrint/event/ToolChange
octoPrint/event/UpdatedFiles
octoPrint/event/Upload
octoPrint/event/UserLoggedIn
octoPrint/event/ZChange
octoPrint/event/plugin_backup_backup_created
octoPrint/event/plugin_firmware_check_warning
octoPrint/event/plugin_pi_support_throttle_state
octoPrint/event/plugin_pluginmanager_install_plugin
octoPrint/event/plugin_softwareupdate_update_succeeded
octoPrint/mqtt
octoPrint/plugins/mqttsubscribe/debug
octoPrint/progress/printing
octoPrint/progress/slicing
octoPrint/temperature/W
octoPrint/temperature/bed
octoPrint/temperature/tool0
octoPrint/temperature/tool1
octoprint/plugin/mqttpublish/pub
octoprint/plugin/tasmota
In opeHab ist der Fortschritt so angelegt und funktioniert auch:
Code: Alles auswählen
UID: mqtt:topic:Broker_163:Drucker_Fortschritt
label: 3D Drucker Fortschritt
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:Broker_163
channels:
- id: Drucker_Fortschritt
channelTypeUID: mqtt:number
label: Drucker Fortschritt
description: ""
configuration:
stateTopic: octoPrint/progress/printing
transformationPattern: JSONPATH:$.progress
Ich dachte es müßte doch auch gehen mir die vorhandenen Dat von openHab an den Wemos 2 zu senden in den Zeilen 3 und 4
Ich hoffe es hilft Dir weiter.