Problem OH3 http Binding

Einrichtung der openHAB Umgebung und allgemeine Konfigurationsthemen.

Moderatoren: seppy, udo1toni

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Mit dem JSON hast Du wohl in der Tat recht, seltsam, ist nur seit Jahren nicht aufgefallen, OH2 und die getesteten Parser haben das in der Vergangenheit ohne zu meckern geschluckt.
Werde ich mal anpassen.
Korrektur!!!!
Das JSON ist korrekt, ich hatte das aus dem Web Interface von openHAB kopiert, da wird es offensichtlich schon so umgewandelt. Ankommen tut es in Anführungszeichen und mit Doppelpunkt statt Gleichheitszeichen.


Doofe Frage:
Wie mache ich das mit den DEBUG für das http Binding? 🤔
EDIT
Gefunden, werde mich da mal reinfuchsen.
Danke!

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Hallo,

hier mal ein Screenshot vom Level Trace:
Vom Senden taucht da irgendwie gar nichts auf.
log.jpg
Auch, wenn ich ein über des Web Interface angelegtes Item ändere, taucht im Log nur die Wert Änderung auf, nichts bezüglich senden.
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

ES GEHT!!!

Habe über die Console ein Update gemacht, nun scheint es zu funktionieren. War ein neues 3.2er Setup drauf, aber irgendwas hat er wohl upgedatet...

Vielen vielen Dank für die Unterstützung!!!

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Kommando zurück 😢

Die Dimmer gehen jetzt, da taucht im Log auch nun auf, dass gesendet wird und die Antwort mit Inhalt des ok.htm wird angezeigt.

Rollos gehen nicht. Wenn ich den Channel auf Type String lasse, wird der Wert korrekt angezeigt, auch wenn ich extrem fahre, alles tutti. Es lässt sich aber nicht aus openHAB steuern. Keine Reaktion, keine Ausgabe im Log, nur, dass für das Item UP bzw. DOWN empfangen wurde. Setze ich den Type wieder auf rollershutter, springt die Anzeige auf UNDEF und steuern kann ich auch nicht.
Für die Relais das gleiche.

Ich glaube, ich gebe auf und warte auf das nächste Release und teste dann noch mal. Allein die Tatsache, das es nach dem Update für die Dimmer plötzlich geht, zeigt mir doch, dass da noch etwas im Argen liegt.

Hier mal noch der Code, vielleicht hat ja noch jemand eine Idee

Code: Alles auswählen

UID: http:url:canbus
label: Canbus Module
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://192.168.0.133
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: GET
  timeout: 3000
  bufferSize: 6000
channels:
  - id: MOD09_ROL00
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[0]
      commandExtension: /ok.htm?Modul9.Rollo0=%2$s
  - id: MOD09_ROL01
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[1]
      commandExtension: /ok.htm?Modul9.Rollo1=%2$s
  - id: MOD09_ROL02
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[2]
      commandExtension: /ok.htm?Modul9.Rollo2=%2$s
  - id: MOD09_DIM00
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      mode: READWRITE
      step: "1"
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[0]
      commandExtension: /ok.htm?Modul9.Dimmer0=%2$s
  - id: MOD09_DIM01
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      mode: READWRITE
      step: "1"
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[1]
      commandExtension: /ok.htm?Modul9.Dimmer1=%2$s
  - id: MOD09_DIM02
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      mode: READWRITE
      step: "1"
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[2]
      commandExtension: /ok.htm?Modul9.Dimmer2=%2$s
  - id: MOD09_REL00
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[0]
      commandExtension: /ok.htm?Modul9.Relais0=%2$s
  - id: MOD09_REL01
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[1]
      commandExtension: /ok.htm?Modul9.Relais1=%2$s
  - id: MOD09_REL02
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[2]
      commandExtension: /ok.htm?Modul9.Relais2=%2$s
  - id: MOD09_REL03
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[3]
      commandExtension: /ok.htm?Modul9.Relais3=%2$s
  - id: MOD09_REL04
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[4]
      commandExtension: /ok.htm?Modul9.Relais4=%2$s
  - id: MOD09_REL05
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[5]
      commandExtension: /ok.htm?Modul9.Relais5=%2$s
  - id: MOD09_REL06
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[6]
      commandExtension: /ok.htm?Modul9.Relais6=%2$s
  - id: MOD09_REL07
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[7]
      commandExtension: /ok.htm?Modul9.Relais7=%2$s
  - id: MOD09_REL08
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[8]
      commandExtension: /ok.htm?Modul9.Relais8=%2$s
  - id: MOD09_REL09
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[9]
      commandExtension: /ok.htm?Modul9.Relais9=%2$s
  - id: MOD09_REL10
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[10]
      commandExtension: /ok.htm?Modul9.Relais10=%2$s
  - id: MOD09_REL11
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[11]
      commandExtension: /ok.htm?Modul9.Relais11=%2$s
  - id: MOD09_REL12
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Relais[12]
      commandExtension: /ok.htm?Modul9.Relais12=%2$s
  - id: MOD09_KEY00
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[0]
      commandExtension: /ok.htm?Modul9.Taste0=%2$s
  - id: MOD09_KEY01
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[1]
      commandExtension: /ok.htm?Modul9.Taste1=%2$s
  - id: MOD09_KEY02
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[2]
      commandExtension: /ok.htm?Modul9.Taste2=%2$s
  - id: MOD09_KEY03
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[3]
      commandExtension: /ok.htm?Modul9.Taste3=%2$s
  - id: MOD09_KEY04
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[4]
      commandExtension: /ok.htm?Modul9.Taste4=%2$s
  - id: MOD09_KEY05
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[5]
      commandExtension: /ok.htm?Modul9.Taste5=%2$s
  - id: MOD09_KEY06
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[6]
      commandExtension: /ok.htm?Modul9.Taste6=%2$s
  - id: MOD09_KEY07
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[7]
      commandExtension: /ok.htm?Modul9.Taste7=%2$s
  - id: MOD09_KEY08
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[8]
      commandExtension: /ok.htm?Modul9.Taste8=%2$s
  - id: MOD09_TEM00
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Temperature
  - id: MOD09_CON00
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[0]
  - id: MOD09_CON01
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[1]
  - id: MOD09_CON02
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[2]
  - id: MOD09_CON03
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[3]
  - id: MOD09_CON04
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[4]
  - id: MOD09_CON05
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[5]
  - id: MOD09_CON06
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[6]
  - id: MOD09_CON07
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[7]
  - id: MOD09_CON08
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[8]
  - id: MOD09_CON09
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[9]
  - id: MOD09_CON10
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[10]
  - id: MOD09_CON11
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[11]
  - id: MOD09_CON12
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[12]
  - id: MOD09_CON13
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[13]
  - id: MOD09_CON14
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[14]
  - id: MOD09_CON15
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[15]


dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Wenn ich über die Web Oberfläche ein Rollo als Dimmer definiere, kann ich es steuern.
Entweder liegt das also doch am Problem mit UNDEF bei rollershutter oder switch oder das Binding hat ein Problem.

Code: Alles auswählen

UID: http:url:ac2bc801fc
label: HTTP Binding Test
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://192.168.0.133
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: GET
  contentType: text/xml
  timeout: 300
  bufferSize: 6000
channels:
  - id: Rollo
    channelTypeUID: http:dimmer
    label: Rollo
    description: ""
    configuration:
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[0
      commandExtension: /ok.htm?Modul9.Rollo0=%2$s
  - id: Dimmer
    channelTypeUID: http:dimmer
    label: Dimmer
    description: ""
    configuration:
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[0]
      commandExtension: /ok.htm?Modul9.Dimmer0=%2$s

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Auch wenn ich hier den Alleinunterhalter mache, vielleicht hilft es anderen.
Man muss die als optional angegebenen Parameter upValue, dowmValue und stopValue für das Rollo angeben, sonst wird kein Kommando abgesetzt. Type ist wieder rollershutter, sonst geht es auch nicht. Ich kann dir Rollos jetzt steuern, aber die Anzeige ist UNDEF.
Das ist mein aktuell letztes Problem.

Für die Relais habe ich onVaule und offValue ergänzt, die funktionieren nun komplett.

Kann es daran liegen, das die JSON Type numerisch ist und das Binding einen String erwartet?
":%s" anhängen bringt nichts.

Ich weiß nicht, was man damit sagen will:
"All values that are not upValue, downValue, stopValue, moveValue are interpreted as position 0-100% and need to be numeric only."
Ich liefere immer 0-100 numerisch in JSON zurück.

Hier nochmal der Code zur Hilfe für andere.

Code: Alles auswählen

Canbus Module
UID: http:url:canbus
label: Canbus Module
thingTypeUID: http:url
configuration:
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://192.168.0.133
  delay: 0
  stateMethod: GET
  refresh: 30
  commandMethod: GET
  timeout: 3000
  bufferSize: 6000
channels:
  - id: MOD09_ROL00
    channelTypeUID: http:rollershutter
    label: Rollershutter Channel
    description: null
    configuration:
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[0]
      commandExtension: /ok.htm?Modul9.Rollo0=%2$s
      downValue: DOWN
      stopValue: STOP
      upValue: UP
  - id: MOD09_ROL01
    channelTypeUID: http:rollershutter
    label: Rollershutter Channel
    description: null
    configuration:
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[1]
      commandExtension: /ok.htm?Modul9.Rollo1=%2$s
      downValue: DOWN
      stopValue: STOP
      upValue: UP
  - id: MOD09_ROL02
    channelTypeUID: http:rollershutter
    label: Rollershutter Channel
    description: null
    configuration:
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Rollo[2]
      commandExtension: /ok.htm?Modul9.Rollo2=%2$s
      downValue: DOWN
      stopValue: STOP
      upValue: UP
  - id: MOD09_DIM00
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[0]
      commandExtension: /ok.htm?Modul9.Dimmer0=%2$s
  - id: MOD09_DIM01
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[1]
      commandExtension: /ok.htm?Modul9.Dimmer1=%2$s
  - id: MOD09_DIM02
    channelTypeUID: http:dimmer
    label: Dimmer Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Dimmer[2]
      commandExtension: /ok.htm?Modul9.Dimmer2=%2$s
  - id: MOD09_REL00
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[0]
      commandExtension: /ok.htm?Modul9.Relais0=%2$s
  - id: MOD09_REL01
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[1]
      commandExtension: /ok.htm?Modul9.Relais1=%2$s
  - id: MOD09_REL02
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[2]
      commandExtension: /ok.htm?Modul9.Relais2=%2$s
  - id: MOD09_REL03
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[3]
      commandExtension: /ok.htm?Modul9.Relais3=%2$s
  - id: MOD09_REL04
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[4]
      commandExtension: /ok.htm?Modul9.Relais4=%2$s
  - id: MOD09_REL05
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[5]
      commandExtension: /ok.htm?Modul9.Relais5=%2$s
  - id: MOD09_REL06
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[6]
      commandExtension: /ok.htm?Modul9.Relais6=%2$s
  - id: MOD09_REL07
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[7]
      commandExtension: /ok.htm?Modul9.Relais7=%2$s
  - id: MOD09_REL08
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[8]
      commandExtension: /ok.htm?Modul9.Relais8=%2$s
  - id: MOD09_REL09
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[9]
      commandExtension: /ok.htm?Modul9.Relais9=%2$s
  - id: MOD09_REL10
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[10]
      commandExtension: /ok.htm?Modul9.Relais10=%2$s
  - id: MOD09_REL11
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[11]
      commandExtension: /ok.htm?Modul9.Relais11=%2$s
  - id: MOD09_REL12
    channelTypeUID: http:switch
    label: Switch Channel
    description: null
    configuration:
      onValue: ON
      stateExtension: /json.cgx
      offValue: OFF
      stateTransformation: JSONPATH:$.Modul[9].Relais[12]
      commandExtension: /ok.htm?Modul9.Relais12=%2$s
  - id: MOD09_KEY00
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[0]
      commandExtension: /ok.htm?Modul9.Taste0=%2$s
  - id: MOD09_KEY01
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[1]
      commandExtension: /ok.htm?Modul9.Taste1=%2$s
  - id: MOD09_KEY02
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[2]
      commandExtension: /ok.htm?Modul9.Taste2=%2$s
  - id: MOD09_KEY03
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[3]
      commandExtension: /ok.htm?Modul9.Taste3=%2$s
  - id: MOD09_KEY04
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[4]
      commandExtension: /ok.htm?Modul9.Taste4=%2$s
  - id: MOD09_KEY05
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[5]
      commandExtension: /ok.htm?Modul9.Taste5=%2$s
  - id: MOD09_KEY06
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[6]
      commandExtension: /ok.htm?Modul9.Taste6=%2$s
  - id: MOD09_KEY07
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[7]
      commandExtension: /ok.htm?Modul9.Taste7=%2$s
  - id: MOD09_KEY08
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READWRITE
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Taste[8]
      commandExtension: /ok.htm?Modul9.Taste8=%2$s
  - id: MOD09_TEM00
    channelTypeUID: http:number
    label: Number Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Temperature
  - id: MOD09_CON00
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[0]
  - id: MOD09_CON01
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[1]
  - id: MOD09_CON02
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[2]
  - id: MOD09_CON03
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[3]
  - id: MOD09_CON04
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[4]
  - id: MOD09_CON05
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[5]
  - id: MOD09_CON06
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[6]
  - id: MOD09_CON07
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[7]
  - id: MOD09_CON08
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[8]
  - id: MOD09_CON09
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[9]
  - id: MOD09_CON10
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[10]
  - id: MOD09_CON11
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[11]
  - id: MOD09_CON12
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[12]
  - id: MOD09_CON13
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[13]
  - id: MOD09_CON14
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[14]
  - id: MOD09_CON15
    channelTypeUID: http:string
    label: String Channel
    description: null
    configuration:
      mode: READONLY
      stateExtension: /json.cgx
      stateTransformation: JSONPATH:$.Modul[9].Contact[15]
​

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

Re: Problem OH3 http Binding

Beitrag von udo1toni »

Eventuell wird ein Leerzeichen mit ausgeliefert (das könnte man nicht so ohne Weiteres im Log erkennen)

Kannst Du mal ein extra Item erstellen, welches nur die stateTransformation eines Rollershutters konfiguriert hat und vom Typ String ist? mich würde interessieren, wie das Log für dieses Item aussieht, wenn der Laden stoppt (ich nehme an, dass dann ein changed getriggert wird, welches dann auch geloggt werden müsste) - gerne auch mitsamt Vergleich für das rollershutter Item...

Aber schon mal ein guter Schritt in die richtige Richtung, dass Du auf die Idee gekommen bist, up- down- und stopValue explizit zu setzen. Ich gehe davon aus, dass es sich hierbei um einen Fehler im Binding handelt, denn eigentlich sollten diese Felder allesamt optional sein und openHAB sollte die Default Werte verwenden, falls nichts anderes eingestellt ist.
openHAB4.1.2 stable in einem Debian-Container (bookworm) (Proxmox 8.1.5, LXC), mit openHABian eingerichtet

J-N-K
Beiträge: 126
Registriert: 20. Jun 2020 12:21
Answers: 4
Wohnort: Gelsenkirchen, NRW

Re: Problem OH3 http Binding

Beitrag von J-N-K »

Das mit dem "optional" sehe ich anders, ist aber hier sicherlich nicht (mehr) das Problem. Ich würde einen "String" channel anlegen und als stateTransformation

Code: Alles auswählen

JSONPATH:$.Modul[9].Rollo[0]
einsetzen und mal gucken, was da wirklich als Status kommt. Wenn ich in den Code gucke, sollte da ein UNDEF nur dann kommen, wenn der String nicht in ein BigDecimal konvertiert werden kann. Könnte es sein dass da sowas wie steht? Das würde schiefgehen, weil es heissen müsste.
openHAB 4.0.0-SNAPSHOT - - local build -
APU2, 4GB RAM, 32GB SSD, Debian Buster
openHAB Core/Distro/Addons & SmartHome/J Maintainer

dirkabel
Beiträge: 40
Registriert: 2. Mai 2022 12:35
Answers: 0

Re: Problem OH3 http Binding

Beitrag von dirkabel »

Ich danke euch für eure Hilfe.
Wenn ich den channel als string definiere wird der Wert ja korrekt angezeigt.
Die Behanghöhe wird immer nur als ganze Zahl ausgegeben.
Sobald ich den channel auf rollershutter ändere wechselt der Status auf UNDEF.
Daher glaube ich, da ist irgendwas faul.
string.jpg
Ein Number Channel funktioniert dementsprechend auch.
Gerade noch einmal getestet.
Dimmer auch...

Hier mal noch ein Video von
- String
- Number
- Dimmer
- Rollo

https://youtu.be/Ddh3kLFyml8
Du hast keine ausreichende Berechtigung, um die Dateianhänge dieses Beitrags anzusehen.

J-N-K
Beiträge: 126
Registriert: 20. Jun 2020 12:21
Answers: 4
Wohnort: Gelsenkirchen, NRW

Re: Problem OH3 http Binding

Beitrag von J-N-K »

Hätte ich mal sofort in den openHAB Code statt in meinen geguckt, hätte ich auch gesehen, dass da ein Bug vorliegt. Das kann so nicht funktionieren. Ich empfehle die HTTP-Binding Version aus SmartHome/J zu benutzen, die müsste funktionieren.
openHAB 4.0.0-SNAPSHOT - - local build -
APU2, 4GB RAM, 32GB SSD, Debian Buster
openHAB Core/Distro/Addons & SmartHome/J Maintainer

Antworten