Tasmota Cam MQTT

Einrichtung der openHAB Umgebung und allgemeine Konfigurationsthemen.

Moderatoren: seppy, udo1toni

Antworten
Benutzeravatar
lenschith
Beiträge: 244
Registriert: 11. Dez 2020 22:36
Answers: 0

Tasmota Cam MQTT

Beitrag von lenschith »

Hallo zusammen,
ich habe eine ESP32 Tasmota Webcam eingebunden und steuere dieser über MQTT. Eigentlich funktioniert alles wie gewollt. allerdings habe ich Meldungen im Log die ich mir nicht erklären kann bzw. wie ich diese Fehler beheben sollte.
Ich hoffe es hat jemand einen Tipp.

Fehlermeldungen:

Code: Alles auswählen

2024-03-02 18:58:29.540 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '{"POWER":"OFF"}' from channel 'mqtt:topic:MQTT_mosquitto:TasmotaCam01:TasmotaCam01_Flip' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.{"POWER":"OFF"}
2024-03-02 18:58:29.541 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '{"POWER":"OFF"}' from channel 'mqtt:topic:MQTT_mosquitto:TasmotaCam01:TasmotaCam01_Resolution' not supported by type 'NumberValue': Character { is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
2024-03-02 18:58:29.542 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '{"POWER":"OFF"}' from channel 'mqtt:topic:MQTT_mosquitto:TasmotaCam01:TasmotaCam01_Mirror' not supported by type 'OnOffValue': No enum constant org.openhab.core.library.types.OnOffType.{"POWER":"OFF"}
2024-03-02 18:58:29.542 [WARN ] [ab.binding.mqtt.generic.ChannelState] - Command '{"POWER":"OFF"}' from channel 'mqtt:topic:MQTT_mosquitto:TasmotaCam01:TasmotaCam01_Feature' not supported by type 'NumberValue': Character { is neither a decimal digit number, decimal point, nor "e" notation exponential mark.
MQTT Config:

Code: Alles auswählen

UID: mqtt:topic:MQTT_mosquitto:TasmotaCam01
label: TasmotaCam01
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:MQTT_mosquitto
channels:
  - id: TasmotaCam01_LED_Dimmer
    channelTypeUID: mqtt:dimmer
    label: LED Dimmer
    description: null
    configuration:
      commandTopic: cmnd/tasmotacam01/DIMMER
      min: 0
      stateTopic: "stat/tasmotacam01/RESULT "
      max: 100
  - id: TasmotaCam01_LED_POWER
    channelTypeUID: mqtt:switch
    label: LED Power
    description: null
    configuration:
      commandTopic: cmnd/tasmotacam01/POWER
      stateTopic: "stat/tasmotacam01/RESULT "
      off: "0"
      on: "1"
  - id: TasmotaCam01_Resolution
    channelTypeUID: mqtt:number
    label: Resolution
    description: null
    configuration:
      commandTopic: cmnd/tasmotacam01/WCRESOLUTION
      stateTopic: stat/tasmotacam01/RESULT
  - id: TasmotaCam01_Feature
    channelTypeUID: mqtt:number
    label: Feature
    description: null
    configuration:
      commandTopic: cmnd/tasmotacam01/WCFEATURE
      stateTopic: stat/tasmotacam01/RESULT
  - id: TasmotaCam01_Flip
    channelTypeUID: mqtt:switch
    label: Flip
    description: ""
    configuration:
      commandTopic: cmnd/tasmotacam01/WCFLIP
      stateTopic: stat/tasmotacam01/RESULT
      off: "0"
      on: "1"
  - id: TasmotaCam01_Mirror
    channelTypeUID: mqtt:switch
    label: Mirror
    description: ""
    configuration:
      commandTopic: cmnd/tasmotacam01/WCMIRROR
      stateTopic: stat/tasmotacam01/RESULT
      off: "0"
      on: "1"
Die Number Items sind Dimensionsless konfiguriert.
in den Items ändere ich über die Metadaten die Anzeige. z.B. Resolution
Metadata: stateDescription

Code: Alles auswählen

0 = 96x96
1 = 128x160
2 = 176x144
3 = 240x176
....
beim auswählen des Eintrags wird die Auflösung auch geändert.
So wie es bei Tasmota in der Doku steht:
https://tasmota.github.io/docs/Commands/#camera

Code: Alles auswählen

WcResolution	Set camera resolution.
0 = 96x96 (96x96)
1 = QQVGA2 (128x160)
2 = QCIF (176x144)
....
Ich habe keine Idee wie ich diese Fehler beheben kann.
Auch Items die als Switch konfiguriert sind und den Status 0/1 haben erzeugen diesen Logeintrag, funktionieren aber ohne Probleme.

Hat jemand einen Tipp was ich hier unternehmen kann.
Danke

Gruß Lenschi
openHAB4.1.2 in einem Docker Container auf RPI4b-4GB, AVM: Fritz!Box 7590 - DECT301 - Comet, DECT210, DECT200, DECT440, Alexa, Shelly, Tasmota, ESP Easy, WLED

Benutzeravatar
lenschith
Beiträge: 244
Registriert: 11. Dez 2020 22:36
Answers: 0

Re: Tasmota Cam MQTT

Beitrag von lenschith »

Habs gefunden

Code: Alles auswählen

      commandTopic: cmnd/tasmotacam01/WCRESOLUTION
      stateTopic: stat/tasmotacam01/RESULT
      transformationPattern: JSONPATH:$.WCResolution
:roll:
openHAB4.1.2 in einem Docker Container auf RPI4b-4GB, AVM: Fritz!Box 7590 - DECT301 - Comet, DECT210, DECT200, DECT440, Alexa, Shelly, Tasmota, ESP Easy, WLED

Benutzeravatar
udo1toni
Beiträge: 13986
Registriert: 11. Apr 2018 18:05
Answers: 222
Wohnort: Darmstadt

Re: Tasmota Cam MQTT

Beitrag von udo1toni »

Ja, aber.
Warum?
Oder andersrum: Warum nicht einfach die normalen Topics nutzen?
Also statt immer das gleiche RESULT Topic,

Code: Alles auswählen

stateTopic: stat/tasmotacam01/RESULT
sollte es außerdem noch die "Original" cmnd-Topics als stat-Topic geben.

Code: Alles auswählen

stateTopic: stat/tasmotacam01/DIMMER
stateTopic: stat/tasmotacam01/POWER
stateTopic: stat/tasmotacam01/WCRESOLUTION
stateTopic: stat/tasmotacam01/WCFEATURE
stateTopic: stat/tasmotacam01/WCFLIP
stateTopic: stat/tasmotacam01/WCMIRROR
openHAB4.1.2 stable in einem Debian-Container (bookworm) (Proxmox 8.1.5, LXC), mit openHABian eingerichtet

Benutzeravatar
lenschith
Beiträge: 244
Registriert: 11. Dez 2020 22:36
Answers: 0

Re: Tasmota Cam MQTT

Beitrag von lenschith »

Hallo Udo,

danke für den Hinweis.
Weil ich das von einem anderen Tasmota kopiert habe war das so drin.
bei meiner Vorlage extrahiere ich was aus dem Sensor da brauch ich das.
Vorlage:

Code: Alles auswählen

    configuration:
      stateTopic: tele/tasmota06/SENSOR
      transformationPattern: JSONPATH:$.ENERGY.Yesterday
Aber du hast natürlich recht, macht so ja gar keinen Sinn. Hab es angepasst.
Angepasst:

Code: Alles auswählen

    configuration:
      commandTopic: cmnd/tasmotacam01/WCRESOLUTION
      stateTopic: stat/tasmotacam01/WCRESOLUION
;)
Gruß Lenschi
openHAB4.1.2 in einem Docker Container auf RPI4b-4GB, AVM: Fritz!Box 7590 - DECT301 - Comet, DECT210, DECT200, DECT440, Alexa, Shelly, Tasmota, ESP Easy, WLED

Antworten