PubSub & The Events Problem
After I started to play more and more with IoT devices (see my last few blog posts), I realized that my communication lines were growing in complexity very rapidly. I had a few Devices talking directly to each other. IFTTT interfaced with my Google Home (Google Assistant), and that would call various functions and webhooks depending on what I said. I had various other scripts that could be triggered that were closer to Smart Automation (eg. if someone opens the door after sunset, then turn on the lights).
This led me to thinking about what a tangled web system I had made. On top of that, I really didn't have any way to see events as they were sent directly to the target, making it very hard to debug what happened.
Developing UbSub
After a while of this, I decided to search for a PubSub provider.. a packet router. I wanted somewhere to send my events, and be able to see them, and watch them as they routed. I googled around a bit, and couldn't find anything, so I decided to make something.
I created UbSub to help me solve this problem.
Simply put, you can send it an event and it will relay the event to any number of subscribers. It can be triggered via email, http, or socketio. And anything can subscribe to it via udp, socketio, http(s)-webhook, or emails. I'm slowly adding more ways to trigger and subscribe to topics.
It's very simple right now. Really just a glorified packet router with a decent interface that allows you to see where packets are going. I'm quite happy with it, as it's allowed me to gain insight into my IoT devices, and to more easily debug what's going on.