Page 1 of 1

Toon gets data from MQtt (InfluxDB)

Posted: Sun Nov 21, 2021 12:56 pm
by BillytheKid
Hello,

I've just rooted my Toon 2 and playing a bit now. I've got an existing solution for water, power and solar usage so don't want to add the Toon hardware for that.
I'm getting my usage stats via ESPHome into an MQtt database (InfluxDB in my case). Any way to get my usage stats out of InfluxDB into Toon?

Cheers, Bill

Re: Toon gets data from MQtt (InfluxDB)

Posted: Wed Sep 28, 2022 11:25 am
by HansS
This is an old topic I see. But I'm doing something similar. A long time ago I tried to use MQTT via node.js (See here: viewtopic.php?t=11982). But that wasn't a viable option. Too resource intensive, and difficult to integrate with apps.

Nowadays, I send statistics using websockets (Introduced here: viewtopic.php?t=12332). I use this mechanism to send energy usage and weather data from my MQTT environment to Toon pretty much as soon as it is available. So no historic data from InfluxDB at the moment.

My energy data comes from a custom P1 reader running on an Arduino board. It sends the information via WiFi to my central MQTT broker. A node.js process is subscribed to the P1 topic. It is connected to two Toon apps that use websockets, and display the information. I like having my local outside temperature and other weather information, and current energy consumption and solar panel production numbers on my Toon 2.

MQTT and node.js run in a containers in a Docker swarm environment running on Raspberry Pi's. I have Telegraf containers that take the MQTT statistics and put them into an InfluxDB as well. I use Grafana to display the historic information.

Re: Toon gets data from MQtt (InfluxDB)

Posted: Sat Oct 29, 2022 9:35 am
by oepi-loepi
Indeed, we introduced the webSockets to toon from version 5.33.9. The first use was the onkyo controller app which was allmost same: a Wemos board as broker between the toon websockets and the TCP eICP of Onkyo. All together packet with some udp discovery and some html to create a http page.

Websockets working very quick and only sending packets only when something has changed.

So you created an arduino app as broker between your mqtt broker and websockets as i understand and also some websocket apps on the toon?

Can you share the info?