Longshot question: Tasmota MCP23008 / MCP23017 GPIO Expander - Control via MQTT?

  • Platform information:
    • Hardware: Raspberry Pi 4
    • OS: OpenHABian
    • Java Runtime Environment: Oracle 8
    • openHAB version: 2.5.latest
  • Issue of the topic: Longshot question - anyone have an example of how to toggle MCP23008 / MCP23017 GPIO Expander pins over MQTT on a a device flashed with Tasmota? Ideally by creating a MQTT thing representing all pins?

I can’t seem to get any commands to work via MQTT (tasmota issue) but once I do I’m not sure how to best represent them as OpenHAB items.

This works from the web:

http://192.168.2.201/cm?cmnd=SENSOR29,10,T

and in MQTT:

cmnd/tasmota/tasmota-relays/sensor29 [data] 10,T or 10,1

So working on how to build the things and items…

Ok - and here is an example fo the thing I got to work:

Type switch : s10 "s10" [ stateTopic="tele/tasmota/tasmota-camper-external/SENSOR", transformationPattern="JSONPATH:$.MCP230_OUT.OUT_D10", commandTopic="cmnd/tasmota/tasmota-camper-external/sensor29", on="10,1", off="10,0"]