-
Notifications
You must be signed in to change notification settings - Fork 101
Provide an IO service for publishing events to MQTT #89
Comments
If it is OK for you guys (it's a great work you're doing here!), I will try to start an implementation on this. |
@flaviostutz amazing ideas, yeah would be great! do you need any more info? |
@flaviostutz let me know if you need help. |
If someone can help contributing on this? I would love to pair program this feature. |
I've supplied a template for the MQTT Io device on the develop branch. Please find files here: https://github.com/kerberos-io/machinery/blob/develop/include/kerberos/machinery/io/IoMQTT.h |
As a small suggestion, you may be able to achieve this using your existing Script IO plugin. Using the mosquitto-clients package (which should exist on Raspberry Pi, it's in Debian already), you could easily make a script that would publish to a MQTT broker. I'm not quite sure how your configuration gets to the Script plugin, but you'd need the MQTT broker host IP along with any security/QOS/etc options. You'd at least be able to try it out without having to add code or an additional dependency (on say libmosquitto I do have some experience with libmosquitto. It's a very nice, small library which is pretty easy to use. If no one has gotten too far already, I might have some bandwidth to contribute some code to help out. |
@zingelst would be great, let me know if you have some questions. |
Unfortunately I had no time to code this yet. Sorry. |
Sorry publish the image on the topic? |
MQTT can handle messages up to 256MB, images shouldnt be problem
…On Sep 19, 2017 8:05 AM, "Cédric Verstraeten" ***@***.***> wrote:
Sorry publish the image on the topic?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#89 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/APO0ojWMQ4VIEo3w7kOgYPmhXv-gAXdEks5sj638gaJpZM4OaIVm>
.
|
aha ok, well I think videos shouldn't be a problem too but from my opinion you can just send a url instead of encoding the images in the message. |
Hey guys, @gianricod started working on a MQTT implementation, and we would like to have feedback.
|
UPDATE - FYI @gianricod, I've added a throttling function yesterday. Which helps with not flooding the MQTT service. https://github.com/kerberos-io/machinery/blob/develop/src/kerberos/machinery/io/IoMQTT.cpp#L17 You can set the throttling rate in the configuration file (https://github.com/kerberos-io/machinery/blob/develop/config/io.xml#L43). So we can extend your current MQTT configuration with this also. |
Update - @gianricod added a MQTT implementation. #106. I will be testing it in a node-red flow, would be nice to receive some feedback about possible usecases (real life scenarios). |
Integrated with @gianricod PR: MQTT intitial implementation #106 |
Use-case: Send to Telegram bot I just implemented a node-red flow to send the alert and image URL to my Telegram bot and a messeage to my text-to-speech endpoint of home speakers. Thanks for the contribute! |
In the same way we have Webhook/TCP, there could be the possiblity of Kerberos.io to publish events to a MQTT broker.
That way it could be much simpler for various engines to listen to "motion" events and perform various tasks in parallel by listening to MQTT topics. One could look for people crossing, other to people identification, other to car counting, other to store snapshots on the cloud, just like plugins, but with no need to change the Marchinery code, in parallel and over the network (each one of these features could be a separate running container, on site or at the cloud).
We could start with simple event publishing (just like Webhook/TCP implementation), but them there could be some sort of time aggregation (just like "video" does when recording 5s of footage etc).
The text was updated successfully, but these errors were encountered: