pabsan-0 / libnvds_mqtt_proto Goto Github PK
View Code? Open in Web Editor NEWProtocol library for integrating MQTT into NVIDIA Deepstream 6.1
Protocol library for integrating MQTT into NVIDIA Deepstream 6.1
Thank you for this extremely useful library!
I am able to get everything working as expected for my use case (I am doing inference using a custom model on a camera stream), BUT this only works when connecting to a MQTT Broker that requires no username/password. How do I set the username/password details if I want to connect to a broker that does require these?
In my DeepStream config, I have the following under the sink1
section:
[sink1]
enable=1
type=6
msg-broker-proto-lib=/opt/nvidia/deepstream/deepstream/lib/libnvds_mqtt_proto.so
msg-broker-conn-str=localhost;1883
msg-conv-config=config_messages.txt
topic=detections
msg-conv-payload-type=0
disable-msgconv=0
#msg-broker-config=config_broker.txt
The msg-broker-conn-str
seems to be able to specify host;port;name
only - no username and/or password. And yet I cannot remove this line.
I have commented out msg-broker-config
for now because it seems to be ignored anyway. I tried including the following in config_broker.txt
:
[message-broker]
conn-str=192.168.27.100;1883
hostname=192.168.27.100
username=someusername
password=somepassword
port=1883
topic=detections
Nothing in this file seems to be used anyway. Even intentional mistakes don't produce any errors. Yet I see no other way to configure authentication details. What am I missing?
ubuntu@ai:~/test/build-deps/paho.mqtt.cpp$ cmake -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_STATIC=TRUE -DPAHO_BUILD_SHARED=FALSE -DPAHO_MQTT_C_PATH=../paho.mqtt.c/ -DPAHO_MQTT_C_LIB=../paho.mqtt.c/src/libpaho.mqtt3as-static.a ${CROSS_COMPILE_ARG}
CMake Warning:
No source or binary directory provided. Both will be assumed to be the
same as the current working directory, but note that this warning will
become a fatal error in future CMake releases.
-- Configuring done
CMake Error at src/CMakeLists.txt:80 (add_library):
Target "paho-mqttpp3-static" links to target
"eclipse-paho-mqtt-c::paho-mqtt3as-static" but the target was not found.
Perhaps a find_package() call is missing for an IMPORTED target, or an
ALIAS target is missing?
-- Generating done
CMake Generate step failed. Build files cannot be regenerated correctly.
Would you know, why?
I have a working setup where messages are being published and delivered via MQTT with no issues. I receive messages such as:
{
"messageid" : "bd5c9e68-e6a2-4fc2-ba7a-c8aa957d8a15",
"mdsversion" : "1.0",
"@timestamp" : "2024-01-02T14:18:14.853Z",
"place" : null,
"sensor" : null,
"analyticsModule" : null,
"object" : {
"id" : "18446744073709551615",
"speed" : 0.0,
"direction" : 0.0,
"orientation" : 0.0,
"inhale" : {
},
"bbox" : {
"topleftx" : 68,
"toplefty" : 244,
"bottomrightx" : 143,
"bottomrighty" : 321
},
"location" : {
"lat" : 0.0,
"lon" : 0.0,
"alt" : 0.0
},
"coordinate" : {
"x" : 0.0,
"y" : 0.0,
"z" : 0.0
}
},
"event" : {
"id" : "ea23f687-4984-406f-a8df-40ba1e02e95c",
"type" : "entry"
},
"videoPath" : ""
}
The presence of the key "inhale"
is all that I'm really interested in.
This is fine, but the deepstream-test5-app
is throwing errors every frame where detection occurs, such as:
No entry for place0 in configuration file
No entry for sensor0 in configuration file
No entry for analytics0 in configuration file
My message config file is exactly as per the sample at https://github.com/pabsan-0/libnvds_mqtt_proto/blob/main/msgconv_config.txt but in any case even if I change (or completely remove) the contents of this file, I get exactly the same error messages.
Where are these "entries" meant to be defined? And how do I turn them off or just ignore them?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.