HTTP binding - only request/send from channels not actual thing?

Hi,

I use the HTTP binding for my espresso machine. The channels all work smoothly, however the thing itself keeps causing 404 errors since the machine doesn’t answer to the base URL. Is there any way to stop Openhab from querying the base URL and just use the actuals channels?

Thanks!

The thing does not query anything. Please show the thing configuration.

It definitely seems so since I am getting the following message in the log files: “[WARN ] [p.internal.http.HttpResponseListener] - Requesting ‘http://xenia/api/v2/’ (method=‘GET’, content=‘null’) failed: 404 Not Found”. All channels have a state or command extension, the thing is the only thing (haha) with the base URL. See my configuration below.

UID: http:url:9f67879b3d
label: Xenia
thingTypeUID: http:url
configuration:
  authMode: BASIC
  headers:
    - Content-Type=application/x-www-form-urlencoded
  ignoreSSLErrors: false
  baseURL: http://xenia/api/v2/
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: POST
  timeout: 10000
  bufferSize: 2048
channels:
  - id: xenia_status
    channelTypeUID: http:string
    label: Status
    description: ""
    configuration:
      mode: READONLY
      stateExtension: overview/
      stateTransformation: JSONPATH:$.MA_STATUS
  - id: xenia_eco_mode
    channelTypeUID: http:switch
    label: Eco-Modus
    description: ""
    configuration:
      mode: READWRITE
      onValue: "2"
      offValue: "0"
      stateExtension: overview/
      commandExtension: machine/control/?action=%2$s
      stateTransformation: JSONPATH:$.MA_STATUS
  - id: xenia_overview
    channelTypeUID: http:string
    label: Überblick
    description: ""
    configuration:
      mode: READONLY
      stateExtension: overview/
  - id: xenia_overview_single
    channelTypeUID: http:string
    label: Überblick (Single)
    description: ""
    configuration:
      mode: READONLY
      stateExtension: overview_single/
      stateTransformation: JSONPATH:$.PU_SENS_WATER_TANK_LEVEL
  - id: xenia_status_sb
    channelTypeUID: http:string
    label: Status Dampfkessel
    description: ""
    configuration:
      mode: READONLY
      stateExtension: overview/
      stateTransformation: JSONPATH:$.SB_STATUS
  - id: xenia_sb_toggle
    channelTypeUID: http:switch
    label: Dampfkessel schalten
    description: ""
    configuration:
      onValue: "2"
      offValue: "1"
      commandExtension: toggle_sb/
      stateTransformation: JSONPATH:$.SB_STATUS
  - id: xenia_state_switch
    channelTypeUID: http:number
    label: Xenia Power
    description: ""
    configuration:
      mode: READONLY
      stateExtension: overview/
      stateTransformation: JSONPATH:$.MA_STATUS
  - id: xenia_power_ga
    channelTypeUID: http:switch
    label: Xenia Power Switch (GA)
    description: ""
    configuration:
      mode: READWRITE
      onValue: "1"
      offValue: "0"
      stateExtension: overview/
      stateTransformation: JSONPATH:$.MA_STATUS
  - id: last-success
    channelTypeUID: http:request-date-time
    label: Last Success
    configuration: {}
  - id: last-failure
    channelTypeUID: http:request-date-time
    label: Last Failure
    configuration: {}

Maybe we need more about how this is being used. If you have a channel with stateproperties, the binding is going to go out and poll the device for that state periodically (evetry 10 seconds give your Thing’s config). Based on my understanding of how the binding works, it doesn’t “query” for the state Channels on command but on this refresh polling period.

At least one of your Channels based on a quick scan (xenia_sb_toggle) doesn’t have a stateExtension so that Channel is going to poll the base URL. Based on the rest of the Channels I suspect that’s not intended and might be the root cause of the problem.

I must have been blind - I was 100% sure I had set this to write-only already. There are no further 404 errors in the log now, thank you so much! :slight_smile:

2 Likes