Skip to content
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

Integration is writing logs every second #28

Open
Bikestuff opened this issue Nov 5, 2024 · 11 comments
Open

Integration is writing logs every second #28

Bikestuff opened this issue Nov 5, 2024 · 11 comments

Comments

@Bikestuff
Copy link

Bikestuff commented Nov 5, 2024

Latest version of this integration is writing logs every second, even no printing is running
home-assistant_bambu_lab_p1_spaghetti_detection_2024-11-05T11-29-21.136Z.log

HA:
Core 2024.10.4
Supervisor 2024.10.3
Operating System 13.2
Frontend 20241002.4

@nberktumer
Copy link
Owner

Can you check if the Obico ML API Host configured correctly and you can access to it?

@Bikestuff
Copy link
Author

How can I test that?
I've stopped, rebuild and started the addon. Perhaps the logs tell someone somewhat:

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
[2024-11-10 18:26:32 +0100] [99] [INFO] Worker exiting (pid: 99)
[2024-11-10 18:26:32 +0100] [98] [INFO] Handling signal: term
Darknet is now running on CPU.
Error during importing OnnxNet! - No module named 'onnxruntime'
----- Trying to load weights: /app/lib/../model/model-weights.darknet - use_gpu = True -----
Failed! - I respectfully decline to load the net as I am asked to use GPU but the loaded darknet module does NOT have GPU support
----- Trying to load weights: /app/lib/../model/model-weights.onnx - use_gpu = True -----
Failed! - Not loading ONNX net due to previous import failure. Check earlier log for errors.
----- Trying to load weights: /app/lib/../model/model-weights.onnx - use_gpu = False -----
Failed! - Not loading ONNX net due to previous import failure. Check earlier log for errors.
----- Trying to load weights: /app/lib/../model/model-weights.darknet - use_gpu = False -----
Succeeded!
seen 64, trained: 1427 K-images (22 Kilo-batches_64)
Loaded - names_list: /app/model/names, classes = 1
[2024-11-10 18:26:32 +0100] [98] [INFO] Shutting down: Master
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun ha-bambulab-spaghetti-detection (no readiness notification)
s6-rc: info: service legacy-services successfully started
[2024-11-10 18:26:47 +0100] [98] [INFO] Starting gunicorn 19.9.0
[2024-11-10 18:26:47 +0100] [98] [INFO] Listening at: http://0.0.0.0:3333 (98)
[2024-11-10 18:26:47 +0100] [98] [INFO] Using worker: sync
:1031: RuntimeWarning: line buffering (buffering=1) isn't supported in binary mode, the default buffer size will be used
[2024-11-10 18:26:47 +0100] [99] [INFO] Booting worker with pid: 99
layer filters size/strd(dil) input output
0 conv 32 3 x 3/ 1 416 x 416 x 3 -> 416 x 416 x 32 0.299 BF
1 max 2x 2/ 2 416 x 416 x 32 -> 208 x 208 x 32 0.006 BF
2 conv 64 3 x 3/ 1 208 x 208 x 32 -> 208 x 208 x 64 1.595 BF
3 max 2x 2/ 2 208 x 208 x 64 -> 104 x 104 x 64 0.003 BF
4 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
5 conv 64 1 x 1/ 1 104 x 104 x 128 -> 104 x 104 x 64 0.177 BF
6 conv 128 3 x 3/ 1 104 x 104 x 64 -> 104 x 104 x 128 1.595 BF
7 max 2x 2/ 2 104 x 104 x 128 -> 52 x 52 x 128 0.001 BF
8 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
9 conv 128 1 x 1/ 1 52 x 52 x 256 -> 52 x 52 x 128 0.177 BF
10 conv 256 3 x 3/ 1 52 x 52 x 128 -> 52 x 52 x 256 1.595 BF
11 max 2x 2/ 2 52 x 52 x 256 -> 26 x 26 x 256 0.001 BF
12 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
13 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
14 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
15 conv 256 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 256 0.177 BF
16 conv 512 3 x 3/ 1 26 x 26 x 256 -> 26 x 26 x 512 1.595 BF
17 max 2x 2/ 2 26 x 26 x 512 -> 13 x 13 x 512 0.000 BF
18 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
19 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
20 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
21 conv 512 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 512 0.177 BF
22 conv 1024 3 x 3/ 1 13 x 13 x 512 -> 13 x 13 x1024 1.595 BF
23 conv 1024 3 x 3/ 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BF
24 conv 1024 3 x 3/ 1 13 x 13 x1024 -> 13 x 13 x1024 3.190 BF
25 route 16 -> 26 x 26 x 512
26 conv 64 1 x 1/ 1 26 x 26 x 512 -> 26 x 26 x 64 0.044 BF
27 reorg / 2 26 x 26 x 64 -> 13 x 13 x 256
28 route 27 24 -> 13 x 13 x1280
29 conv 1024 3 x 3/ 1 13 x 13 x1280 -> 13 x 13 x1024 3.987 BF
Try to load cfg: /app/model/model.cfg, weights: /app/lib/../model/model-weights.darknet, clear = 0
mini_batch = 1, batch = 8, time_steps = 1, train = 0
Try to load weights: /app/lib/../model/model-weights.darknet
30 conv 30 1 x 1/ 1 13 x 13 x1024 -> 13 x 13 x 30 0.010 BF
31 detection
mask_scale: Using default '1.000000'
Total BFLOPS 29.338
avg_outputs = 607364
Loading weights from /app/lib/../model/model-weights.darknet...Done! Loaded 32 layers from weights-file

@nberktumer
Copy link
Owner

You can try to access it from http://<obico_ml_host_api>/hc/ url.

@Bikestuff
Copy link
Author

Yes, that works. Blank page with a text "ok"

@ccos89
Copy link

ccos89 commented Nov 14, 2024

I'm having the same issue. Have set frequency of the automation to 60 seconds but it is writing logs every second. Docker running and I'm able to resolve the api host page with the 'ok' text.

@Quack6765
Copy link

Quack6765 commented Nov 18, 2024

Seems this is related to this line:


Which makes the automation trigger every second instead of following what we've set in detection_frequency

@Bikestuff
Copy link
Author

Is that a workaround to modify this value or the final solution?

@Quack6765
Copy link

Quack6765 commented Nov 26, 2024

Is that a workaround to modify this value or the final solution?

You can manually edit the value by editing the blueprint in your config/blueprints/automation/nberktumer folder in HA and reloading.

@christabone
Copy link

The PR above seems to make my automation trigger at 5 seconds past every minute instead of every 5 seconds. Can anyone else confirm? (I have the delay set to 5 seconds in the configuration.)

@thegame3202
Copy link
Contributor

The PR above seems to make my automation trigger at 5 seconds past every minute instead of every 5 seconds. Can anyone else confirm? (I have the delay set to 5 seconds in the configuration.)

Hmm, didn't get a notice here, but you're right. Seems I missed adding the forward slash prior to whatever the variable is set to. I'm not sure how to add that in front of a variable, but I'll see if I can't figure it out!

@thegame3202
Copy link
Contributor

The PR above seems to make my automation trigger at 5 seconds past every minute instead of every 5 seconds. Can anyone else confirm? (I have the delay set to 5 seconds in the configuration.)

Should be fixed! Tested on mine with multiple options. Feel free to test commit #39

This is a breaking change! You will have to edit your automation to select desired frequency from the new dropdown.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants