I use Tasmota on an ESP8266 to send a Serial String to MQTT and currently I use a rule to pick out a value from a space delimited string. Can this be done using the MQTT2 bindings transformation tab?
I use *JSONPATH:$.SerialReceived to simplify the string to
155.93 38.60 12.1 0.00 0.0000 0 0 0 0 0.0 0.00 0.99 0.00 0.00 1
and I currently get the values as separate numeric items using
var stringItem = mqttString.state.toString.split("\t") var item1 = (Float::parseFloat(stringItem .get(0)) as Number) var item2 = (Float::parseFloat(stringItem .get(1)) as Number)