I am helping someone and I am asking here for help. Not because I want the glory of being the one who did it but more to not confuse the person with a lot of people giving their thoughts.
(No offence)
I am not exactly getting it, and may have actually done what they need doing now anyway.
But for the sake of keeping options open, I'm asking.
This is a cut down message.
{"topic":"ATESTEO/Wolfsburg/W16","payload":{"MQTTWert1":"25.1","MQTTWert1name":"T_BoxenLuft","MQTTWert2":"-101","MQTTWert2name":"N_EMA_VL","MQTTWert3":"932","MQTTWert3name":"n_Antrieb","MQTTWert4":"269","MQTTWert4name":"M_Antrieb","Status":"Läuft"},"qos":1,"retain":false,"_topic":"ATESTEO/Wolfsburg/W16","_msgid":"3f4512b0.dc5bee","kColor":"black","vColor":"black","template":"<html>\n<head>\n<style>\ntable.FixedTable\n{\n table-layout: fixed;\n border: 0;\n}\n</style> \n</head>\n<body>\n<table class=\"FixedTable\">\n <tbody>\n <tr ng-repeat=\"(k,v) in msg.payload\" ng-if=\"k != 'Item'\">\n <td style=\"width: 250; color:{{msg.kColor}}\">{{k}}</td>\n <td style=\"text-align:justify; color:{{msg.vColor}}\">{{v}}</td>\n </tr>\n </tbody>\n</table>\n</body>\n</html>","color":"lime"}
The payload
is ..... the part of interest to split.
There are other things which are claimed are needed. Shrug. Dunno. I can't see how/why as the data is ultimately going to a chart
node.
The payload
has two lines. A name and a value.
It would be nice to split this up so there are (in this case) 4 messages sent out.
Each with a topic
of what the name is and a payload
of what the value is, and the other stuff which is in the bigger message as themselves.
Yes, this may be futile and the problem is already solved by what I did. But I'm not that arrogant to think I have found the answer this quickly / easily.
Someone - please.