-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
High Load Issues & Accessing Camera Data Without Node-Red #25
Comments
Wow, your understanding of Recamera is impressive! First, all the code is publicly available in this repository https://github.com/Seeed-Studio/sscma-example-sg200x, so feel free to explore it further. At the moment, WebSocket is not supported, but it is something we can consider for a future release. Additionally, the protocol documentation will be made available as soon as the Chinese New Year holidays are over. Thanks for your support! |
|
Thanks, that sounds like a great start. But how can I configure a model - is there a config file for that somewhere? Can I configure the model via the MQTT broker - maybe with this? How does the control protocol function? |
you maybe also find information at outer sources: I think reCamera RTSP streaming (seems only to be enabled with the streaming node red module) seems to be based on a software called live555. If you search the milkv sources (v1) you will find https://github.com/milkv-duo/duo-buildroot-sdk/blob/8e970aa49decfddc6f7f5bd66d0e798ffcf712c4/buildroot-2021.05/package/live555/0001-Add-a-pkg-config-file-for-the-shared-libraries.patch and in the milkv sources (v2) looks more promising https://github.com/search?q=repo%3Amilkv-duo%2Fduo-buildroot-sdk-v2%20rtsp&type=code seems to include native RTSP streaming listener(!) support in cvi lib cvi_rtsp/src/api.cpp In my opinion live555 might be very outdated, same as buildroot 2021 and I would like to see some major version updates for recamera OS soon. Specially since RISC CPU support in linux components has improved a lot in the last years. |
Thanks for the sources I'll check those out. I'm familiar with openRTSP which will allow me to access the camera feed but it involves the overhead of running the RTSP server and also introduces a buffering delay which makes alert snapshots a challenge. [Assumption 1] From what I've been able to figure out so far, there's a [Assumption 2] So if Node Red is disabled, I need to manually communicate with the sscma server to configure the camera/model. [Assumption 3] I found python-sscma, a Python library to communicate with the sscma server via MQTT. If I can find the correct device ID I should be able to communicate with the camera without the need for Node Red.
I monitor the reCamera internal MQTT broker and I can see the AT commands arriving from python-sscma but I think they're landing in the wrong topic. I have tried many device IDs (which affect the topic) e.g. ( I feel like I'm really close to achieving communication with the camera from the local network - without the resource hungry Node Red - the camera runs far too hot to touch and frequently lags with Node Red running, and it's fine without it. |
I have put the protocol documentation https://github.com/Seeed-Studio/sscma-example-sg200x/blob/main/docs/sscma-node-protocol.md. sscma-node's write a sscma-micro is not the same as the protocol he designed to communicate with node-red. Currently there is no interaction other than node-red. So python-sscma doesn't work. |
Thank you for updating the docs, that will be useful to many I'm sure. However I have a camera that frequently resets if the ambient temperature is over 30C and cannot keep pace with the camera frames - after 10 minutes, the MQTT lag is around 10 seconds. Minimal setup Is there any way to run inference on the default model without Node Red?
I only need the bounding boxes and label (person), no video or images. If I can get this working reliably I'll recommend installing these as an alternative to a large estate of Vivotek/OnCam/Hanwha and Ganz AI box devices. Many thanks fort your help. |
Hi, I’m not sure about your familiarity with C/C++ development. If you're comfortable with it, you can use the following example to develop the program you need. However, if you're not familiar with C/C++, we may need to discuss further to better understand how to adapt it to your specific application. I’ll add this issue to the TODO list for now. https://github.com/Seeed-Studio/sscma-example-sg200x/tree/main/solutions/sscma-model https://github.com/Seeed-Studio/sscma-example-sg200x/tree/main/solutions/sscma-at (not ready yet) |
I am currently working on a Python script to simulate Node-RED via MQTT to retrieve inference results. This might be suitable for your scenario. |
Issue Summary
Node-Red is struggling to run on my reCamera due to high CPU and memory usage. My system consistently has a high load average:
I'm hoping I can deploy a lot of these in the Philippines but hammering the CPU never ends well in this climate.
Since Node-Red is consuming significant system resources, I want to access the camera data directly without running Node-Red.
What I've learned so far
Setting Up MQTT Access
I have configured Mosquitto to allow remote connections:
/etc/mosquitto/mosquitto.conf
Exploring Available HTTP Endpoints
I found the following HTTP endpoints, but I'm unsure if they are needed for direct camera access:
http://{ip}/api/deviceMgr/getModelInfo
http://{ip}/api/deviceMgr/getModelList
http://{ip}/api/deviceMgr/getDeviceList
http://{ip}/api/deviceMgr/queryDeviceInfo
http://{ip}/api/userMgr/queryUserInfo
http://{ip}/api/version
Modifying System Startup Scripts
I discovered that /userdata/auto.sh is executed via /etc/init.d/S99user.
This might allow me to customize the startup behavior without bricking the device.
Questions
How does Node-Red communicate with the underlying sscma service?
Can I start the camera without Node-Red?
/etc/sscma.conf
or maybe/etc/avahi/avahi-daemon.conf
to achieve this?Steps to Achieve My Goal
/userdata/auto.sh
shell scriptAny guidance would be greatly appreciated!
The text was updated successfully, but these errors were encountered: