Hello,
I am new with grafana and i am sorry for the my common question.
Currently i am creating IoT platform with Mqtt, Telegraf, InfluxDb and Grafana. So i can push data from sensors --> mqtt broker --> telegraf --> influxdb --> grafana and the data is displayed in the appropriate dashboards. Bu i want to create an opposite flow. for example: When the given putton is pushed to send that command to influxdb --> telegraf–>mqtt broker then the my device will be subscribe for a topic and will get the message. So, what is an approach for that?
Is it possible to push a message to influxdb from grafana?
is it possible telegraf to undestand that there is a new message on influxdb ?
Also i have to send this a new message from telegraf to mqtt broker with appropriate topic.
I would be grateful if anyone could help me with ideas or advice.
I think that is no possible that flow.
Maybe you could send data from grafana to the mqtt broker, influx save it and your sensor receive it.
But sadly I think that doesn’t exist a panel for grafana that can make this.
I guess that you are right but i want to make a record in to InfluxDB(the goal is to store a history of commands). It is possible JS
So i am going to create a my custom panel for grafana. But the next a question is: how i can get the new rows from InfluxDB to telegraf --> mqtt broker?
Sure, also I think that the history of commands is important. But as I understand there aren’t form that Telegraf know if a command/order is available from influx, but you can send your command through mqtt and save it with telegraf-influx
Using this I am able to send http reqest to nodered where it is transformed to mqtt message and published to IoT temperature controller (http request from grafana -> mqtt broker -> IoT temperature controller).
I’m using nodered => influx => grafana and would also like to send commands to my devices.
I have never dabbled in grafana plugins. But if you get something simple setup that sends commands to a nodered http post api, I might be able to take it from there…
My setup is using NodeRed inbetween.
Node Red has perfect capabilities to connect with MQTT brokers, manage the data and store it into InfluxDB and/or send other MQTT messages. The capabilities are endless.
As Node Red can interface with InfluxDB, it can both write and read in the database, it is is perfectly able to generate alarms or, as your original question, send MQTT messages.
I am generating quite some IOT graphs, but beyond that I have created a special project: Control Roller shutters. Normally they go up and down automatically through a central clock. But I added an ESP with a relay to change the behaviour as I wish. There are push buttons on the ESP, but I can also control through an App on my mobile (an native MQTT app you can download and customize for your purpose). All interchanges go through MQTT while Node Red is the central intelligence that controls the state of each of the Roller Shutters.
thanks for bringing this up. We are also looking into the same direction and did some research about it.
The most promising thing we found is the Field Display/Editor component conceived by @ryantxu for NatelEnergy the other day. However, it looks like it is part of a custom Grafana Application implementation and not available as a piece of open source software. If this doesn’t change in the future, it might at least serve as a source for inspiration.