Hi All,
I would like to introduce “MqGateway” - an open source MQTT gateway for wired sensors and controllers.
The project is both - hardware and software.
This is an improved version of RoomHub 3 you may have read about on this forum here.
Therefore, you may see a lot of similarities if you’ve read that thread.
Since RoomHub, I have received a lot of feedback (also on this forum) and many improvements in MqGateway are the result of them. Thank you!
MqGateway has been created to support multi-device, fully wired solution. It supports MQTT auto-discovery through HomeAssistant MQTT Components Binding.
Here is how it looks with I/O Expander board and in 19’’ rack 1U case.
It just looks like a huge Ethernet switch, because it uses UTP cables with RJ45 to connect sensors and controllers . These are NOT actually Ethernet ports.
Typical use case for MqGateway is a house with sensors and controllers distributed all around with wired connections. It is possible to plug in simple and inexpensive devices, like relay modules, PIR motion sensors or just plain wall switches into MqGateway to make capable home automation system. These are the same sensors/modules which you would use with Arduino projects, but you don’t need to do any programming yourself - just connect them with UTP cable and do simple configuration in YAML.
MqGateway communicates with OpenHab through MQTT and supports auto-discovery through HomeAssistant MQTT Components Binding.
In theory, single MqGateway board allows you to connect:
- up to 64 digital input/output devices (like relays or switch buttons) and
- up to 16 complex devices using RS485 or UART communication.
For now supported devices are:
- relay module (on/off)
- switch button (pressed, released, long-pressed, long-released)
- emulated switch (useful for opening gates)
- motion detector
- reed switch (open/close)
- timer switch
- window shutter (open/close, position)
- BME280 (temperature, humidity, pressure)
- DHT22 (temperature, humidity)
Hardware-wise MqGateway consists of rather simple electronic components. The aim was to make it easy to assemble for amateur electronic hobbyist. The controller on the board is Nano Pi Neo, but the board is also prepared to fit Raspberry Pi if preferred.
All the work done for MqGateway is available freely under Open Source Licenses.
Why I’ve created MqGateway
When I was doing major renovation at my house, I’ve decided to go with as much wired smart devices as possible. MqGateway is my fourth approach to create inexpensive, wired MQTT gateway for Arduino-capable modules.
I’ve created the device for my own needs, because I haven’t found anything which would suit my requirements. However, I believe now it is flexible and quite easy to use, so maybe others can benefit from it as well.
What’s next?
You can find out more in the documentation: https://mqgateway.com
I’ve got five MqGateway devices around the house working for about 5 months now. It has proved to be stable now, although I still consider it to be in development. I am working to add support for more type of devices and new features.
I have also work in progress on preparing “I/O Extender board” which:
- expands number of ports to support twice as much devices (prototype is working for some time already)
- adds 12V powered RS485 bus
I would like to know if there is any interest in device like MqGateway. There is a considerable amount of work related to creating documentation and maintaining project in an open source manner. I want to know if this is of any value for anyone else than me .
Is there any need for wired solution at all? Do you use something else for the similar use case?
Any feedback is welcome!