Basic Device - Serial Connection - Received Data structured in a better format
Hi,
I have a meter connected serial to bOS. I am looking to find a way to structure the received data so I can interpret it in bOS and display it. For example highlighted in yellow below the data 30 30 30 30 30 30 30 31 30 30 31 35 would be the meter number 10015. The 30 represents a 0, 31 represents a 1, 32 represents a 2, etc
Here is a part from the meter datasheet:
Here is the way the meter connection is configured in bOS as Basic Device:
Here is the command for the request string:
Same command with different data type:
Both the above commands return the same data:
As seen the command is sent and data is received. The challenge I have is that the value left in the string variable created doesn't contain the full string
This would be the data displayed using their software:
Any tips on how this can be handled in bOS so when receiving the data it can be structured in such a way so when extracting the 30 30 30 30 30 30 30 31 30 30 31 35 it can be used as being the value for meter number 10015.
Thank you,
Calin
Customer support service by UserEcho
Problem solved. The close string ends in 03 value before CRC
The question for @supportComfortClick: when using Regex, how can you call in bOS the groups created? such as Total_kWH? (?<=10015)(?<Total_kWh>[0-9]{8})(?<T1_kWh>[0-9]{8})
Currently it returns only the Match value of the Regex expression.
Thank you,
Calin
Hello Calin,
great to see you managed to resolve the issue! Currently bOS only returns the matched regex expression, we cannot call groups just yet. If there are many requests for this in the feature, it just might be added if possible.
Best regards.