You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If we want to parse a key that is containing a special character like a colon we have to wrap the key in double quotes in mqtt.json config file like that "value": "${params.\"switch:0\".aenergy.total}"
what will end in a sting like ${params."switch:0".aenergy.total}
But the above stiring does not match the regex that is passed to the findall method anymore due to the double quotes around the switch:0
The result is that the specified value regex will be set as the value itself. In my case '${params."switch:0".aenergy.total}' instead of the floating point value.
If we would add double quotes to the regex that would fix the issue like expression_arr = findall(r'\$\{[${A-Za-z0-9. ^\]\[*_:"]*\}', expression)
Connector name (If bug in the some connector):
MQTT Connector (JSON Uplink Converter)
Describe the bug
jsonpath_rw is able to parse keys that contain a colon (:) but the following line in the tb-gateway is preventing us from that.
thingsboard-gateway/thingsboard_gateway/tb_utility/tb_utility.py
Line 130 in ac453e9
If we want to parse a key that is containing a special character like a colon we have to wrap the key in double quotes in mqtt.json config file like that
"value": "${params.\"switch:0\".aenergy.total}"
what will end in a sting like
${params."switch:0".aenergy.total}
But the above stiring does not match the regex that is passed to the
findall
method anymore due to the double quotes around theswitch:0
The result is that the specified value regex will be set as the value itself. In my case
'${params."switch:0".aenergy.total}'
instead of the floating point value.If we would add double quotes to the regex that would fix the issue like
expression_arr = findall(r'\$\{[${A-Za-z0-9. ^\]\[*_:"]*\}', expression)
Connector name (If bug in the some connector):
MQTT Connector (JSON Uplink Converter)
Error traceback (If available):
Versions (please complete the following information):
The text was updated successfully, but these errors were encountered: