MQTT Events in Grafana

The text element of events sent to Kotori over MQTT JSON objects appears twice.

By pushing the event with:

MQTT_MSG=json.dumps({"text": "Event Text"})
client.publish('hiveeyes/thias/thias-hive2/up/event.json', MQTT_MSG)

the Grafana annotation box gives:
Bildschirmfoto%20vom%202018-06-05%2021-34-10

any idea where this comes from?

EDIT: Got it working with an extra title element as taken from the Kotori documentation

Thanks for reporting this. We will have a look when working on the code base the next time. We will also try to add another endpoint variant suitable for creating a text-only event with a timestamp of now(), like

hiveeyes/thias/thias-hive2/up/event.txt    Event Text

or

hiveeyes/thias/thias-hive2/up/event        text:Event Text

Would this better fit your needs?

Could.

I was again fiddling with the JSON endpoint and noticed, that the order of the JSON attributes matter.

{"title": "Event Title", text": "Event Text"}

shows the behavior described above. The title is taken from the first attribute ordered alphabetically -> text before title. The event text is then also taken from text.

When I rename the title attribute to:

{"eventtitle": "Event Title", text": "Event Text"}

eventtitle is matched before text and it is working as expected.

Crazy shit. Thanks for reporting this, we will try to have a look under the hood soon.