psyciknz / CameraEvents

Dahua NVR/Camera Alerting to MQTT. Fairly specific to my needs, but also an attempt at starting to use travis.
Eclipse Public License 2.0
58 stars 19 forks source link

Invalid authority #15

Closed kiwijunglist closed 4 years ago

kiwijunglist commented 4 years ago

I have this working correctly for my dahua cameras - https://github.com/psyciknz/CameraEvents It is working and publishing to mqtt, however it doesn't work with my amcrest camera.

Config.ini

[MQTT Broker]
IP: 192.168.1.99
Port: 1883
BaseTopic = dahua

[Cameras]
camera1=babycam

[babycam]
host=192.168.1.90
protocol=http
name=babycam
port=80
isNVR=False
user=admin
pass=xxx
auth=basic
events=VideoMotion,CrossLineDetection,CrossRegionDetection,LeftDetection,SceneChange,TakenAwayDetection,FaceDetection,RioterDetection,MoveDetection,WanderDetection,CrossFenceDetection,ParkingDetection,NumberStat,RetrogradeDetection,TrafficJunction,VideoBlind,AudioAnomaly,AudioMutation,VideoAbnormalDetection,SceneChange,LoginFailure

Error log:

2020-07-02 12:02:28,496 - __main__ - DEBUG - [babycam] OnDisconnect(Success)
2020-07-02 12:02:33,658 - __main__ - DEBUG - [babycam] OnDisconnect(Success)
2020-07-02 12:02:38,921 - __main__ - DEBUG - [babycam]: Error
Invalid Authority!

Note: I have https set to disabled in the amcrest setup and I added the server as a trusted IP.

kiwijunglist commented 4 years ago

Actually i had the password wrong. Sorry!

psyciknz commented 4 years ago

The best type of issues.....

kiwijunglist commented 4 years ago

My hope is to add audio detection, which isn't listed in the examples as an event, but I assume I can just look in the log file and apparently there is a json code and i can figure it out???

To I need to able debug logging or anything?

psyciknz commented 4 years ago

no the json is for certain types of ivs events.

Audio detection might show up as -----boundary type text.

Yes it should be in the log, I don't think I dealt with levels of logging properly. If I have then yes there's a debug setting.

There's an active branch that if you're going to make an alteration from, use that, and I can merge the two of them if you figure it out or need a code change.