Closed eddgrant closed 1 year ago
Hi Edd
Try adding the following to your config file and see if this helps:
MQTT_PUB_KV_WITH_JSON = True
This should give you a json result with all the endpoints for the given topic combined (in addition to the individual endpoints).
Thanks for the super quick response, will give that a whirl.
Hey @smar000, I have just tried adding that configuration setting, but I didn't see any new topics appear. I then looked through the code and couldn't find any reference to MQTT_PUB_KV_WITH_JSON
. Is that definitely the config property name?
Hi @eddgrant
I am currently abroad and so will have to check once I return later in the week, but I suspect that I have not pushed the current version I am running. That key is definitely there in my version.
Hi @eddgrant
I've just merged my current working branch. Please try this and see if the data comes through as above.
Sorry for the delay in replying @smar000 . Appreciate you pushing these changes. I've been unable to test this yet but will do soon and will report back. Cheers!
Hey @smar000,
I've given this a test and can see the key / value pairs being grouped together in the messages now, which is great!
However I noticed that the _ts
(timestamp) values are not included in the message. I've had a bit of a play around and think there's a simple way of achieving this, simply by re-ordering where the timestamp is created and including it in the message payload. I've implemented the change to test it on my fork here.
Would love to know if this is something you'd consider including? I'd be happy to raise a PR from my fork if so.
Many thanks,
Edd
Hi @eddgrant
Great to hear that it is working for you, and thanks amendments, which I have just merged! :)
EDIT: Just realised it is not showing your name as the source of the changes. Apologies for that, I must have hit the merge before doing the pull request.
Hi @smar000 , great stuff, really appreciate you including the change 🙏
Most welcome!
Hi there,
I'm just starting to get familiar with evoGateway (thanks for creating it!). I would like to use it to store TRV battery level information to InfluxDB. Looking at the data that gets published over MQTT I can see the following topic structure:
Ideally I would like to store a single data point each time I get battery level information, preferably this would have the following:
I can probably do something complicated and try and join messages from multiple topics, but I wondered if there was a way of configuring evoGateway to do this e.g. if it were to publish messages to a topic such as:
And send a message in the form:
Most grateful if you have any thoughts on how I might go about achieving this!
Edd