Tasmota on PSF-A85 MQTT needing command to see GPIO pins state

Hi all,
Just have flashed a relay board with PSF-A85 chip to Tasmota and configured a template to assign GPIO pins to switches. I’m struggling with the correct syntax to add to my Thing’s channel so I can track the state of the GPIO pins.
I’ve read the Tasmota doc’s but it’s not clear to me…Running MQTT Explorer as below I can see the status is reporting each 5minutes but how do I setup my channel to track this status?

Appreciate any assistance.!!!

Cheers

How far do we need to go? Have you any MQTT openHAB Items working already?

Basically, you’d set up a generic Thing for the topic tele/Garage_Door/SENSOR and use JSONPATH to extract multiple channels to Switch or Contact.

1 Like

Hi Rossko,
Yes I have a MQTT based Items working and use cmnd/Garage_Door/POWER to successfully activate a relay, so sound slike I’m just missing understanding the way to extract multiple channels using JSONPATH?

Thanks!

Example

Thanks tht helps a bit… I’m trying to keep in Paper UI, but with these examples I’ve managed to get the full array presenting in Paper UI. Now just trying to present the state of individual elements ie: Switch 3, but REGEX doesn’t seem to work for me, documentation on is has no examples within Paper UI?

Here’s my log showing items I’m trying to breakout and present:

Thanks!

It says … Transformation service REGEX not found.

REGEX is installable, like JSONPATH service.

Hmmm is there something else I need to do as I have already installed the transformation add-on:

Here’s a bit more info / screenshots:


Since last post I had moved the REGEX statement to Transformation line as was part of status command line before, now logs as above don’t seem to even attempt REGEX component?

That all seems to be doing what you told it to do.
Have you given up using JSONPATH now?
You might want to click the “more” under Incoming Value transformation

You probably need to show us what you’ve done now, then. I don’t know what a status command line is in this context.

I’d be happy using anything that works to extract the state of if switch on a GPIO Pin, unfortunately I’m not a programmer and JSON and REGEX are completely new to me.
I did have the MQTT State Topic as cmnd/Garage_Door/SENSOR:REGEX:((.),.,.,.,.,.,.*) when it was complaining about REGEX no being present yet it’s installed.
Would it be possible to have an example of the correct syntax for MQTT Stat Topic and Incoming value transformation that I could try to extract the status of Switch3? This would help me get my head (hopefully) around JSON a bit more, currently I read info on JSON but it’s not making sense to a simpleton like me! Thanks for taking the time to help with this!

I’ve only just seen this, because it wasn’t replied-to. As no-one else chipped in …

That’s made-up syntax.

It’s just a topic. That’s it. An MQTT topic.
There is an example in your earlier screenshot
cmnd/Garage_Door/SENSOR

As per your screenshot, it goes in the “Incoming value transformation” box.
I’ve no idea what your given REGEX should be expected to do, though.

Me, I’d use JSONPATH instead and put
JSONPATH:$.Switch3
in the box.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.