Thanks for that info @bgunnarb !
robertjuric
@robertjuric
Best posts made by robertjuric
Latest posts made by robertjuric
-
RE: Using RaspPi as Gateway + Controller AND MQTT
-
RE: Using RaspPi as Gateway + Controller AND MQTT
Ahh thanks for this additional info. I see that your script is taking the data and writing it directly to the Influx DB. I've been weighing doing it that way, versus using the Telegraf agent with a MQTT plugin. I'll have other Telegraf based metrics coming into Influx for bandwidth, system utilization, etc, but the custom script gives you more flexibility.
I really like your project, I'm going to spend some time looking through everything, since the Influx+Grafana is my ultimate goal from a sensor/data standpoint. Ideally I'd like to be able to see the data behind efficiency improvements through automation or home infrastructure upgrades (new HVAC, water heater, etc). So some of my first goals are to monitor environmentals and power consumption.
I actually have some x86 hardware I use for virtual machines so my concern has been more of what do I outsource to the RaspPi instead of putting on the power powerful hardware. Right now Influx and Grafana will be virtual machines. I'm planning on using the RaspPi for MQTT gateway and Zwave or Zigbee controller. I'm not sure if the HomeAssistant/OpenHAB should go on the Pi as well.
-
RE: Using RaspPi as Gateway + Controller AND MQTT
Ahh man, that site is a great resource for putting all the pieces together.
I was debating putting the gateway on the RPi. I see the flexibility in keeping it separate and Arduino based, but consolidating into the RPi would keep things a little cleaner in my control room (closet).
It also seemed like the Ethernet shield for Arduino was discontinued and I want to keep as much ethernet cabled as possible.
-
RE: Using RaspPi as Gateway + Controller AND MQTT
Ahh, I've done some more research and have a better grasp of that MQTT broker now.
So the sensors publish their readings through the MQTT gateway to the MQTT broker. At the broker multiple devices/services can subscribe to the sensor data which is then published via the broker?
So I would have:
Various sensors
MQTT gateway (ESP or Arduino based)
Raspberry Pi running:- MQTT broker (Mosquitto)
- Telegraf MQTT Consumer (sends to InfluxDB on another box)
- Controller as MQTT Client (OpenHAB, HomeAssistant, NodeRed)
Does that sound right, or am I missing anything?
-
RE: Using RaspPi as Gateway + Controller AND MQTT
@electrik Thanks for the response. Where is the broker normally installed, on the gateway or a separate device?
As the middle man, does the broker act as a server answer requests from multiple clients? Or does the broker broadcast the data to configured controllers?
Basically I want to ensure that the broker can support an OpenHAB controller and getting the data to Telegraf/InfluxDB.
-
Using RaspPi as Gateway + Controller AND MQTT
Hey all, home automation new guy here. I have a basic question about the high level components.
I'm planning out a small sensor build, and my thought was to use a RaspPi as the gateway for the sensor network. I understand I could also install the Controller such as OpenHAB. My ultimate goal is to have an Automation Controller reading the sensors, but also to get the data into another system (InfluxDB + Grafana) for historical logging.
I'm a little confused on the use of MQTT in the gateway. Does an MQTT gateway act as a server? So that both the controller and my InfluxDB system could read the MQTT data? I also don't understand the role of the MQTT broker.
Would there be any benefit to building a Arduino based MQTT gateway and dedicating the RaspPi for the controller?