Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MQTT Testing - 8s #6

Open
the-butterfry opened this issue May 26, 2021 · 4 comments
Open

MQTT Testing - 8s #6

the-butterfry opened this issue May 26, 2021 · 4 comments

Comments

@the-butterfry
Copy link

the-butterfry commented May 26, 2021

Starting this as a clarification thread for setup and deploy of the MQTT transport option. I observed that I was using much more data than I'd hoped. Current setup is BMS(local) > Telegraf (local) > Influx (local) > Grafana (remote). This meant anytime Grafana tried to render for a client it pulls data from Influx over the VPN. I burned my 3g data up in no time. Current thinking is now, send the MQTT data once remotely and have the queried DB local to Grafana.

MQTT Setup:
BMS(local) > MQTT Broker(vpn remote) > Telegraf(vpn remote) > Influx(vpn remote) > Grafana(vpn remote) > Home Assistant/client grafana view

Observations:
For my setup and the unreliability of tunneled 3g cellular internet, MQTT QOS is important. In the .py file one request would be to have a single location to set QOS instead of at each message.
topic ="data/bms"
gauge ="data/bms/gauge"
broker="192.168.xx.1"
port=1883
qos=1

@tgalarneau
Copy link
Owner

tgalarneau commented May 26, 2021 via email

@tgalarneau
Copy link
Owner

tgalarneau commented May 26, 2021 via email

@the-butterfry
Copy link
Author

Yeah, good ideas. I'm just trying to get it going. There is something funky that I couldn't sort out so i fell back to sockets for now.

I was getting data, but it would only do a few iterations and then hang. I think it's my mqtt input config (only thing i've not looked at)..
anyhow, seems to be fine with the following

BMS(local) > Telegraf(local) > Influx(vpn remote) > Grafana(vpn remote) > Home Assistant/client grafana view.

I haven't looked at the data size for the Telegraf to Influx communication, but it's vastly less impactful than multiple clients hitting the DB on the local side everytime the view refreshes.

Onsite i've got a RPi with a touchscreen that is running a version of the dashboard in kiosk mode all the time. It was fetching over VPN to grafana remote > Grafana was querying the DB back over the vpn > sending data back over to hand off to grafana and then finally back onsite to the RPi display... total waste. Now it's only going over VPN once to refresh. I can probably sort that out by running local copies... tomorrow.

@tgalarneau
Copy link
Owner

tgalarneau commented May 27, 2021 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants