thingsboard / thingsboard

Open-source IoT Platform - Device management, data collection, processing and visualization.
https://thingsboard.io
Apache License 2.0
17.41k stars 5.15k forks source link

parseDouble behavior change in 3.8 #11900

Open jrleeman opened 2 days ago

jrleeman commented 2 days ago

Describe the bug After the update to 3.8 the rule chain that has been working great for us for awhile has stopped working correctly. A small decimal number is apparently now what is failing in a script node:

org.thingsboard.script.api.TbScriptException: [Error: parseDouble(metadata.ss_ADR0_slope): Value: "7.826440349198226E-6" is not numeric or hexDecimal format!]

Your Server Environment

Your Client Environment Desktop (please complete the following information):

Your Device

To Reproduce Steps to reproduce the behavior:

  1. Enable rule chain and pass in data that has worked fine for a long time.

Expected behavior Should parse server attribute and multiply by data from the device

image

Incase it is helpful, here are the device attributes server side: image


Disclaimer

We appreciate your contribution whether it is a bug report, feature request, or pull request with improvement (hopefully). Please comply with the Community ethics policy, and do not expect us to answer your requests immediately. Also, do not treat GitHub issues as a support channel.

jrleeman commented 2 days ago

As a work around I set my attributes to be their value multiplied by 1e6 so they are not passed to the RE as an exponential and then in my math script divided by 1e6, but this is just a patch to get things back to working again.