Code Monkey home page Code Monkey logo

Comments (17)

elad-bar avatar elad-bar commented on August 20, 2024

Not sire I understand the issue,
You have configured the motion detection and object detection of face,
You are not getting the event of motion, right?

from ha-shinobi.

dexdeadly avatar dexdeadly commented on August 20, 2024

Yes, when I go to my camera and setup under advanced, right now I have just PRIMARY ENGINE : PIXEL ARRAY because I have the use built in set to yes. The camera in Shinobi shows the red dotted box around me as I move into the camera frame and I see that message in the logs. But HA never sees a trigger for motion. It just always stays clear.

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

can you please change the log level of the component to debug and post the logs once you have that kind of issue?
it will assist understanding the cause

thanks

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

@dexdeadly , any update?

thanks

from ha-shinobi.

dexdeadly avatar dexdeadly commented on August 20, 2024

My apologies, I just recently switched over to home assistant os and I'm still not getting it. Let me see if I can switch the home assistant component level and check.

from ha-shinobi.

dexdeadly avatar dexdeadly commented on August 20, 2024

Hello. So just to confirm. I do not have the DeepStack-Object or DeepStack-Face setup. I would like to set those up. However I was just currently testing with just the motion detector and was hoping to see the event trigger. Do I need to have DeepStack-Face or Object setup in order for that sensor to show anything within Home Assistant? Is there instructions or a video to watch for the full setup of using this plugin?

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

No, you just need the shinobi video to be configured working with motion detection.

Face or object plugins (no matter which plugin of shinobi) will publish detection as an event.

To sum it up, once you have set the motion detection within shinobi, it should seamlessly work for you,
If that is not the case, i will try to assist you

from ha-shinobi.

dexdeadly avatar dexdeadly commented on August 20, 2024

Ok, so I have the logging set to debug using the following in my configuration.yaml

# Logging Setup logger: default: info logs: custom_components.shinobi: debug

When the motion detection is triggered in shinobi I can see the monitor log display like I showed in the first message. However there is nothing that I can see in the log showing any sort of attempt to send to HA. Now if I do a restart of HA and the component loads I do see this in the log.

2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.binary_sensor] Added new Shinobi Video Living/Dining Room Sound 2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.binary_sensor] Added new Shinobi Video Living/Dining Room Motion 2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.binary_sensor] Added new Shinobi Video Girls Room Sound 2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.camera] Added new Shinobi Video Living/Dining Room 2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.camera] Added new Shinobi Video Girls Room 2021-11-06 13:31:30 INFO (MainThread) [custom_components.shinobi.api.shinobi_websocket] Starting to listen connected 2021-11-06 13:31:30 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] No message handler available, Message: 0{"sid":"1Q3NnTGJ1fJ-JrpnAALn","upgrades":[],"pingInterval":25000,"pingTimeout":5000} 2021-11-06 13:31:30 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] WebSocket connection state changed to ready 2021-11-06 13:31:30 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Sending message, Data: 42["f", {"auth": "REDACTED", "f": "init", "ke": "REDACTED", "uid": "REDACTED"}], Connected: True

Then this is repeated multiple times but just looks like health checks.

2021-11-06 13:39:25 DEBUG (MainThread) [custom_components.shinobi.managers.home_assistant] Updating @2021-11-06 17:39:25.538007+00:00 2021-11-06 13:39:25 INFO (MainThread) [custom_components.shinobi.api.shinobi_api] Updating data from Shinobi Video Server (Shinobi Video) 2021-11-06 13:39:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] Retrieving camera list 2021-11-06 13:39:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] GET http://10.1.1.25:8080/P7mMVlTCB0iXsKRn9FVI3iAnbjOc9G/monitor/hP4K31upsS 2021-11-06 13:39:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] Status of http://10.1.1.25:8080/P7mMVlTCB0iXsKRn9FVI3iAnbjOc9G/monitor/hP4K31upsS: 200 2021-11-06 13:39:45 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pinging 2021-11-06 13:39:45 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Sending message, Data: 2, Connected: True 2021-11-06 13:39:45 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pong message received 2021-11-06 13:40:10 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pinging 2021-11-06 13:40:10 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Sending message, Data: 2, Connected: True 2021-11-06 13:40:10 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pong message received 2021-11-06 13:40:25 DEBUG (MainThread) [custom_components.shinobi.managers.home_assistant] Updating @2021-11-06 17:40:25.538324+00:00 2021-11-06 13:40:25 INFO (MainThread) [custom_components.shinobi.api.shinobi_api] Updating data from Shinobi Video Server (Shinobi Video) 2021-11-06 13:40:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] Retrieving camera list 2021-11-06 13:40:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] GET http://10.1.1.25:8080/P7mMVlTCB0iXsKRn9FVI3iAnbjOc9G/monitor/hP4K31upsS 2021-11-06 13:40:25 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_api] Status of http://10.1.1.25:8080/P7mMVlTCB0iXsKRn9FVI3iAnbjOc9G/monitor/hP4K31upsS: 200 2021-11-06 13:40:35 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pinging 2021-11-06 13:40:35 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Sending message, Data: 2, Connected: True 2021-11-06 13:40:35 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pong message received 2021-11-06 13:41:00 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pinging 2021-11-06 13:41:00 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Sending message, Data: 2, Connected: True 2021-11-06 13:41:00 DEBUG (MainThread) [custom_components.shinobi.api.shinobi_websocket] Pong message received

Let me know what else to try and I can get it for you.

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

Hi, thanks for the logs.
As I understand, you have 2 cameras,
Living/Dining room with sound and motion detection,
Girl's room with sound detection only,
Right?

from ha-shinobi.

dexdeadly avatar dexdeadly commented on August 20, 2024

Correct, I didn't setup the motion on the girls room camera just yet. I wanted to ensure the correct setup on one camera before I repeat the process.

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

Sorry for the late response, there should be log messages with description of the event in HA log, but I cannot see them,
Will try to release a newer version with more logs later

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

No need for additional version as this one covering all scenarios.

Can you please reactivate the log level in debug, monitor both log of ha and shinobi, trigger a motion alert, make sure it was logged in both system and post the logs?

Thanks

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

Any updates?

from ha-shinobi.

jarrodsfarrell avatar jarrodsfarrell commented on August 20, 2024

Don't want this thread to die since I'm having similar issues with motion not being forwarded to HA.

Overarching setup for our house is all the still cameras use the built in Pixel Array motion detection that's then followed by object detection with a defined region to avoid motion by trees or the OSD "burned" into the video.

So added the following to my configuration.yaml

# Diagnosing Shinobi
logger:
  default: warning
  logs:
    custom_components.shinobi: debug

Restart HA and I see some logs from the integration. No glaring errors: just it recognizing, connecting, and enumerating the cameras along with occasional refresh. So I pick a camera to walk in front: the front porch. And...nothing. No logs generated by the integration while watching the camera off my phone I can see it drawing motion and a bounding box for myself.

Investigating I'm noticing the stream key the integration is using. This case orG3... which points to a restrictive API that only allows viewing the streams and snapshots from a previous test project. It didn't even try the ojqS... I made for it which has almost everything but deleting or controlling the monitors.

For testing I'll clean out the API keys and make a singular, all access API key on the account (but accidentally leave out delete video,) refresh the integration and now I see it talking over the web-socket connection using the API key, but disconnecting occasionally because it's not replying back to a ping I guess.

No payload handler available, Payload: ['ping', {'beat': 1}]

I do restart HA again since I notice I can't view the cameras anymore which brings them back. I also notice the websocket connection is working correctly this time and I see messages of it sending a ping itself on it's own timer which seems to be keeping the connection alive.

Now attempt two.

[....shinobi.api.shinobi_websocket] Payload received, Data: {'f': 'detector_trigger', 'id': 'XXX', 'ke': 'YYY', 'details': {'plug': 'built-in', 'name': 'Movement', 'reason': 'motion', 'confidence': 3, 'matrices': [{'x': 0, 'y': 98, 'width': 639, 'height': 381, 'tag': 'Movement'}], 'imgHeight': '480', 'imgWidth': '640'}, 'doObjectDetection': True}
[....shinobi.managers.event_manager] Set motion state: {'name': 'Movement', 'plug': 'built-in', 'reason': 'motion', 'state': 'on', 'timestamp': 1646026859.583889, 'topic': 'YYY/XXX'} for YYY/XXX

Hey, something!
image

So my conclusion is that either prompt for a username and password to select a API key to use or provide a API key yourself when adding/configuring the integration. Plus some code polishing since there's a few quirks in re-configuring the integration.


TL;DR: This integration picks the last API key even if the key has no or insufficient access. It should prompt to select a API to use or let you flatly give one for it to use.

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

I think I fixed the same issue while adding the support for dashboard-v3 that requires the same functionality of ping/pong,
please check if it was solved with v1.1.22 and let me know.

thanks

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

@dexdeadly @jarrodsfarrell - can you pls confirm the issue still take place or resolved?

thanks

from ha-shinobi.

elad-bar avatar elad-bar commented on August 20, 2024

closing the issue, if being reproduced, feel free to reopen

from ha-shinobi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.