MQTT not reading json path

Hello,
I configured a Shelly pro 2PM relay, in the local mqtt (openhab on raspberry and I had enabled mosquitto). Commands seems working, but I cannot get any status (current status, voltage, etc.), but I can see in the MQTT Explorer:

and my thing is configured so:

UID: mqtt:topic:MQTTBroker:5ca0cb1a1d
label: Relay piscina
thingTypeUID: mqtt:topic
configuration: {}
bridgeUID: mqtt:broker:MQTTBroker
channels:
  - id: Relay0
    channelTypeUID: mqtt:switch
    label: Relay0
    description: null
    configuration:
      commandTopic: shellypro2pm-ec62608da5f4/rpc
      formatBeforePublish: '{"src":"MQTT","method":"Switch.Set", "params":{"id":0,"on":%s}}'
      stateTopic: shellypro2pm-ec62608da5f4/status/switch:0
      transformationPattern: JSONPATH:$.output
      off: "false"
      on: "true"
  - id: Relay0_Volt
    channelTypeUID: mqtt:number
    label: Relay0_Volt
    description: null
    configuration:
      unit: V
      formatBeforePublish: "%.4f"
      stateTopic: shellypro2pm-ec62608da5f4/status/switch:0
      transformationPattern: JSONPATH:$.voltage
  - id: Relay0_Watt
    channelTypeUID: mqtt:number
    label: Relay0_Watt
    description: null
    configuration:
      unit: W
      formatBeforePublish: "%.4f"
      stateTopic: shellypro2pm-ec62608da5f4/status/switch:0
      transformationPattern: JSONPATH:$.apower
  - id: Relay0_Ampere
    channelTypeUID: mqtt:number
    label: Relay0_Ampere
    description: null
    configuration:
      unit: A
      formatBeforePublish: "%.4f"
      stateTopic: shellypro2pm-ec62608da5f4/status/switch:0
      transformationPattern: JSONPATH:$.current

The channel is working switching on and off, but I cannot get any status on the Json, but yes in the mqtt explorer, did you know why?

Perhaps because of the colon in switch:0, which might be confusing the YAML parser? Though I note other examples where it works.

Do you have the JSONPATH Transformation Service installed in openHAB?

What errors do your openHAB logs give?

1 Like

ok…I think I missed that, thanks a lot