1

Text to Dec

Тема: Text to Dec

Hello, the tracker transmits the parameter io_109 as the text "20,NE, 39820". I created a Del1 sensor "driver binding" with the parameter substr(io_109,12,5) as a result I got the text in the form of "39820". Is it possible to translate this test into a number to use as sensors so that it is possible to perform mathematical operations with them. I tried to create another arbitrary sensor with parameter [Del1]:10 and enabled text parameter but the sensor does not work in this form.

2

Text to Dec

Re: Text to Dec

Partially figured out the situation.
1. If the parameter receives text in the form of only numbers, then the formula io_109:10 works. As soon as a symbol, space or letter gets into the parameter among the numbers, the formula stops working.
2. When we process the parameter io_109 in which there are the characters "20,NE, 39820" with the function substr(io_109,12,5), we select the desired range.
3. We call the sensor that selects the range asdf1 with the parameter substr(io_109,12,5). We create a new sensor with the parameter [asdf1]:10 - the formula does not work.
4. The sensor with the parameter dec([asdf1]) and hex([asdf1]) works, but only in the form of text with which it is impossible to perform mathematical calculations in reports.
5. The question still remains open how to get a number and not text after the function substr(io_109,12,5). (substr(io_109,12,5)):10 also does not work. It is not possible to output only numbers to the parameter, a couple of characters are always output that interfere.