Closed andrei-trybukhouski closed 5 years ago
I'm not quite sure what you mean. Could you add some examples ?
I use the majordomo controller. his own mqtt client parses json. and if i started aqarahub with
--recursive-publish
option, both aqarahub and majordomo parses json and they outputs doubles.
AqaraHub[6747]: <INFO> [PublishValue] Publishing to 'AqaraHub/00158D00029B1A2A/1/in/Basic/Report Attributes/0xFF01/value/1': {"type":"uint16","value":3300}
AqaraHub[6747]: <INFO> [PublishValue] Publishing to 'AqaraHub/00158D00029B1A2A/1/in/Basic/Report Attributes/0xFF01/value/1/type': "uint16"
AqaraHub[6747]: <INFO> [PublishValue] Publishing to 'AqaraHub/00158D00029B1A2A/1/in/Basic/Report Attributes/0xFF01/value/1/value': 3300
i want without first line
AqaraHub[6747]: <INFO> [PublishValue] Publishing to 'AqaraHub/00158D00029B1A2A/1/in/Basic/Report Attributes/0xFF01/value/1/type': "uint16"
AqaraHub[6747]: <INFO> [PublishValue] Publishing to 'AqaraHub/00158D00029B1A2A/1/in/Basic/Report Attributes/0xFF01/value/1/value': 3300
because the first line (in the code above) is parsed by the majordomo module and they are doubled.
Currently it's not possible to prevent the first part to be sent by AqaraHub, but if you turn off --recursive-publish it will only send the first message, and your majordomo controller can unpack it and publish the other two messages ?
Yes, but the fact is that majordomo sometimes parses such long lines incorrectly. and thanks for the replies
with
--recursive-publish
option hub also sends full json string. but my mqtt client module independently parses the json payloads, and there is duplication. since client does it badly, I want the hub to do it, but did not send full json. is it possible?