Hello Guys!
After repeatedly trying to get my flow to work, I've decided to ask for help.
What I want to achieve: I've got a string with a lot of data from our heating system and I need to separate it into single numeric values for my ioBroker vis. I've tried python scripts with regular expressions, tried the switch and change nodes and the nr-regexp-filter node, but I havent had any success.
In addition to this I've got another string from our heating system that I want to implement in my ioBroker vis.
First String: pm 54.3 54.5 18.1 -20.0 -20.0 -20.0 7934.3 13.5 26.0 -20.0 -9.0 -9.0 -9.0 55.7 0.0 0.0 0.0 0.0 0.0 0.0 1.0 0.0 0.0 0.0 18.0 0.0 0.0 0.0 0.0 130.0 12.0 0.0 0.0 0.0 1.0 0000 0004 0005 0002 0000 0000 0000 0000 <\r><\n><\n>
Second String: z 21:27:35 Lambdaheizung ein <\n><\r>
The first string contains various values and is sent by the heating system every second. The second string contains messages when, for example, an error occures.
I would like to split the first string into single numeric values and then output them to ioBroker topics.
I already made a regex in python and javascript:
It's big, so don't be scared. (python)
pm (?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P
[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[-?\d.])\s(?P[\w])\s(?P[\w])\s(?P[\w])\s(?P[\w])\s(?P[\w])\s(?P[\w])\s(?P[\w])\s(?P[\w])[^<]
Regex for second string (python):
z (?P[\d:\d:\d:])(?P[\s\S][^<])
I just cant get my hand around how to implement this into a flow.
I hope somebody can help me
Edit: Corrected typos
Edit2: Ok, I don't know why, but I can't post the original regex without being messed up. It always cuts out the names of the capturing groups with comparative signs