Directv in 3.3

I am trying to use an Item that used to work in 2.3 like this:

Switch DirecTV_ABC “ABC” [ “Switchable” ] { http=“>[*:GET:]” }

But when I try to use it in 3.3 I get an error in the got when I try to toggle the switch using a ‘List Item’ to toggle the element, see error below:

2022-11-05 05:35:38.366 [ERROR] [rg.apache.cxf.jaxrs.utils.JAXRSUtils] - No message body reader has been found for class java.lang.String, ContentType: application/octet-stream
2022-11-05 05:35:38.367 [WARN ] [s.impl.WebApplicationExceptionMapper] - HTTP 415 Unsupported Media Type
at org.apache.cxf.jaxrs.utils.JAXRSUtils.readFromMessageBody(
at org.apache.cxf.jaxrs.utils.JAXRSUtils.processRequestBodyParameter(
at org.apache.cxf.jaxrs.utils.JAXRSUtils.processParameters(
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.processRequest(
at org.apache.cxf.jaxrs.interceptor.JAXRSInInterceptor.handleMessage(
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(
at org.apache.cxf.transport.ChainInitiationObserver.onMessage(
at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(
at org.apache.cxf.transport.servlet.ServletController.invokeDestination(
at org.apache.cxf.transport.servlet.ServletController.invoke(
at org.apache.cxf.transport.servlet.ServletController.invoke(
at org.apache.cxf.transport.servlet.CXFNonSpringServlet.invoke(
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at org.apache.cxf.transport.servlet.AbstractHTTPServlet.service(
at org.eclipse.jetty.servlet.ServletHolder.handle(
at org.eclipse.jetty.servlet.ServletHandler.doHandle(
at org.ops4j.pax.web.service.jetty.internal.HttpServiceServletHandler.doHandle(
at org.eclipse.jetty.server.handler.ScopedHandler.handle(
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(
at org.eclipse.jetty.server.session.SessionHandler.doHandle(
at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(
at org.ops4j.pax.web.service.jetty.internal.HttpServiceContext.doHandle(
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(
at org.eclipse.jetty.servlet.ServletHandler.doScope(
at org.eclipse.jetty.server.session.SessionHandler.doScope(
at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(
at org.eclipse.jetty.server.handler.ContextHandler.doScope(
at org.eclipse.jetty.server.handler.ScopedHandler.handle(
at org.ops4j.pax.web.service.jetty.internal.JettyServerHandlerCollection.handle(
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(
at org.eclipse.jetty.server.Server.handle(
at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(
at org.eclipse.jetty.server.HttpChannel.dispatch(
at org.eclipse.jetty.server.HttpChannel.handle(
at org.eclipse.jetty.server.HttpConnection.onFillable(
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(
at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(
at org.eclipse.jetty.util.thread.ReservedThreadExecutor$
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(
at org.eclipse.jetty.util.thread.QueuedThreadPool$
at java.base/

That is a configuration for HTTP binding version 1. The only HTTP binding available in OH3 is the newer Things and channels version, you’ll have to convert your config to that.

I can try again but I created a Thing like the below yesterday and it did the same error when I tried to toggle the Item that referenced the Thing instead:

Thing http:url:ABC “DtvABC” [
refresh=0] {
Type string : Status “Status” [ stateTransformation=“JSONPATH:$.status.code” ]

I could be wrong, but looks like you are creating some sort of favorites list? I have something similar, but a little different approach. Here is my thing. Just queries for a few items for use later:

UID: http:url: YourUID
label: Your Label
thingTypeUID: http:url
  authMode: BASIC
  ignoreSSLErrors: false
  baseURL: http://IPA.DD.RE.SS:8080/tv/getTuned
  delay: 0
  stateMethod: GET
  refresh: 10
  commandMethod: GET
  timeout: 3000
  bufferSize: 2048
  - id: DirecTV_title
    channelTypeUID: http:string
    label: DirecTV Title
    description: ""
      mode: READONLY
      stateTransformation: JSONPATH:$.title
  - id: DirecTV_callsign
    channelTypeUID: http:string
    label: DirecTV Callsign
    description: ""
      mode: READONLY
      stateTransformation: JSONPATH:$.callsign
  - id: DirecTV_Channel
    channelTypeUID: http:number
    label: DirecTV Channel
    description: ""
      stateTransformation: JSONPATH:$.major

Then I use a rule for each favorite channel. Here is one for Item TV_ABC. It might seem clunky to have a rule for each favorite channel (and there may be a better way, like command extensions on a thing), but I have a about 20, so not that much work.

configuration: {}
  - id: "1"
      command: ON
      itemName: TV_ABC
    type: core.ItemCommandTrigger
conditions: []
  - inputs: {}
    id: "2"
      type: application/vnd.openhab.dsl.rule
      script: sendHttpGetRequest("http://IPA.DD.RE.SS:8080/tv/tune?major=10")
    type: script.ScriptAction
1 Like

There is always many ways to skin a cat, thats not a bad way of doing it either and all your favorites are all in one place too. And yes I am building a favorites and a command list to press play and pause so I can integrate into Google Assistant and just tell her to turn on ESPN, ABC, NBC, NFL Network…

Yep, same concept. I use Siri, but same result.