Adding Reolink API to the IpCamera binding, beta testers needed

The toggle didn’t change, but the last event data did.
This is what the log said.

2022-12-18 13:10:17.207 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'ReolinkCamerawithAPI_LastEventData' changed from [
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 0,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 0
         }
      }
   }
]
 to [
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 1,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 0
         }
      }
   }
]

New build made to try to see if the AI alarms now toggle. Now using GSON library to parse the json which should fix it and it works with some emulated tests here.

EDIT: I should have mentioned that the token (only used for moving the controls not for the polling of alarms) will expire one hour after the binding connects, and I will need some log output that shows a response from the camera when the token has expired. I can then add the code to renew the token. To reset and get a new working token, just pause and un-paused the camera and it will then work for another hour to do some testing with these Alpha builds. Hopefully someone who has a camera and can read the source code can help speed it up by doing some tests with curl to confirm what Post contents will work.

Probably a good one to try is the activateAlarmOutput channel as this one should make your cameras built in siren go off. Useful if you want to scare intruders away by making all your cameras make noise.

This new binding is only for people with a Reolink NVR, correct? I have a Reolink E1 Pro camera which I have working (although a bit flaky) via onvif, but it doesn’t seem to have the cgi-endpoints, instead it has a proprietary protocol running on port 9000. I guess this is not what’s supported in the updated binding?

No you do not need a nvr, you just need a camera that has the api implemented in it which the first post has a link to the documentation for the api. The battery powered cameras do not have the api and a few other models do not either. The cameras that have no webui builtin proba ly do not work. I do not know which ones will work, it is worth trying and seeing what the trace logs show are coming back from the camera.

Also update the firmware as some only have it after an update.

1 Like

Installed the latest version.
The toggle ‘Human Alarm’ now turns on once it detects a human and turns off a few seconds later.

Now we still need a same kind of toggle/alarm for the button press (most important part of a doorbell :wink: )

About the token, what/how can I monitor that for you?
OpenHab is running on Debian 11.
Notebook is runnin on Windows 11 Enterprise and I have Advanced REST Client installed.

EDIT:
There is a new error in the openhab log:

==> /var/log/openhab/openhab.log <==
2022-12-19 09:00:47.605 [INFO ] [era.internal.handler.IpCameraHandler] - Please report this URL:/cgi-bin/api.cgi?cmd=Snap&channel=0&rs=openHAB is not handled correctly

And also:

2022-12-19 09:04:57.506 [INFO ] [era.internal.handler.IpCameraHandler] - Please report that your Reolink camera gave a login token:, in response:[
   {
      "cmd" : "Login",
      "code" : 1,
      "error" : {
         "detail" : "login failed",
         "rspCode" : -7
      }
   }
]

I am a 100% certain that the login is correct. (And I only used lowercase and numbers, because with special characters it goes wrong (also before this error))

and also:

2022-12-19 09:23:54.289 [INFO ] [era.internal.handler.IpCameraHandler] - Please report this URL:/api.cgi?cmd=SetIrLights&token= is not handled correctly

I uploaded a newer version with some changes in it after your feedback, thank you for the help.

I think the best way is to use CURL in a linux terminal with the following to see what happens. If this works then you can test any of the API commands to see what json packet works.

curl -k -H 'Content-Type:application/json' -X POST -d '[{"cmd":"Login", "param":{ "User":{ "Version": "0", "userName":"youUserNameHere", "password":"yourPasswordHere"}}}]' http://CameraIPhere/api.cgi?cmd=Login&token=null

A user posted here on the forum and they were using a different URL (&token=null) and also their packet has action instead of version in it. Would be worth playing with what they had in case the API has a typo or omissions in it.

POST to external API from a rule - Setup, Configuration and Use / Beginners - openHAB Community

Also you will be able to provide a lot more helpful information if you turn on TRACE logging by entering this into the openHAB console.

log:set TRACE org.openhab.binding.ipcamera

Great thanks for confirming and helping with this, I have edited the first post of this thread to keep track of what is tested and what is not yet tested but is worth trying out.

Does not make a difference how many times you ask, the answer is still the same.
I have not seen it in the API and I would be surprised if it is possible, most brands do not publish this as an event/alarm so you have to use their app. My doorbell probably has only 30% of the visitors actually push the button, so I find that using a human alarm, PIR sensor of something else is actually far more reliable at picking up visitors. People seem to prefer to knock and not press a button maybe covid is a factor. There are ways around this if you search the forum, as I have posted solutions that get you a button push in the forum before by using a door contact sensor to send the alert.

It may be possible to support special characters as I have done it for FOSCAM already, but first I want to see if the token method can be used as it will be better in case people post logs into a forum as the token is useless after an hour goes by. If the token does not prove to be useful, then I can fall back to using the short term user/pass in every URL.

I’ve installed the newer version.
However, still the same login failed error.

The CURL command responds with this:

[1] 738963
root@openHAB:/usr/share/openhab/addons# [
   {
      "cmd" : "Login",
      "code" : 0,
      "value" : {
         "Token" : {
            "leaseTime" : 3600,
            "name" : "20978b87260e019"
         }
      }
   }
]

About the button press, Reolink calls it ‘Visitor’.
HACS has it working (GitHub - JimStar/reolink_cctv: Home Assistant Reolink NVR/cameras addon) So it should be doable.

FYI, I’ve read that Reolink uses the ONVIF Profile T

I enabled the trace logging.
Here is a part of it.

2022-12-20 08:44:48.833 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:Renew
2022-12-20 08:44:48.908 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.2.9:8000/onvif/PullSubManager?Idx=46209591</wsa5:To><wsse:Security><wsse:UsernameToken><wsse:Username>****</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">****</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">****</wsse:Nonce><wsu:Created>2022-12-20T07:44:48.833Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><wsnt:RenewResponse><wsnt:TerminationTime>2022-12-20T07:45:54Z</wsnt:TerminationTime><wsnt:CurrentTime>2022-12-20T07:44:54Z</wsnt:CurrentTime></wsnt:RenewResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

and

2022-12-20 08:44:48.908 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-12-20 08:44:52.425 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: GET: http://192.168.2.9:80/api.cgi?cmd=GetAiState&channel=0&user=*****&password=*****
2022-12-20 08:44:52.513 [DEBUG] [era.internal.handler.IpCameraHandler] - Reply is chunked.
2022-12-20 08:44:52.513 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=GetAiState&channel=0&user=****&password=**** contains     :[
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 0,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 0
         }
      }
   }
]
:
2022-12-20 08:44:52.514 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=GetAiState&channel=0&user=****&password=**** contains     :[
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 0,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 0
         }
      }
   }
]
:
2022-12-20 08:44:52.514 [DEBUG] [era.internal.handler.IpCameraHandler] - Reply is chunked.
2022-12-20 08:44:52.514 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=GetAiState&channel=0&user=****&password=**** contains     :[
   {
      "cmd" : "GetAiState",
      "code" : 0,
      "value" : {
         "channel" : 0,
         "dog_cat" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "face" : {
            "alarm_state" : 0,
            "support" : 0
         },
         "people" : {
            "alarm_state" : 0,
            "support" : 1
         },
         "vehicle" : {
            "alarm_state" : 0,
            "support" : 0
         }
      }
   }
]
:

Please try the newer build just uploaded, it has two changes.
1.Login for the token has changed to use Capitals On The Start of words in the http headers. Despite the http spec saying it does not matter, some cameras seem to have issues if the headers are in all lowercase. Seen it before so this may fix it.
2. The onvif events will log if there is an unknown event topic the binding does not know about. DEBUG or TRACE level is needed to see it, but debug would be best to reduce the traffic in the logs down whilst you go and press the doorbell button.

Great thanks for the info, I’ll see if we can add this as its just an ONVIF event. So the logs should pick it up.

The binding does not do profile T, only profile S. The main difference is that a camera MUST protect the traffic with http digest authentication on top of the onvif auth. I have been looking into doing this recently as I have a camera which is Profile T only. Cameras can support both profiles.
Your camera is talking just fine from the short part of log you gave.

Added the latest version.
Pasted the TRACE LOG at pastebin due to the size.

FYI, changed the login and password of the camera to **** in the logs :wink:

I Guess the log did pick it up :slight_smile:

Please report this camera has an un-implemented Onvif Event Topic:RuleEngine/MyRuleDetector/Visitor

Done, new build uploaded that now should have Visitor and all the AI alarms implemented via ONVIF event based methods. Since a new channel was added called doorBell you should delete and readd the thing, taking care to use the same UID so the items all link back up when the new thing is created.

I also added the token=null but I doubt that will be it.

Thank you, I’ve updated to PM2.
Here is the log: https://pastebin.com/9jsay0bY

The log is not working it says its private or waiting for moderation… I found and fixed a bug that would have stopped the token url from working, uploaded to try.

I see it is still pending moderation indeed.
I’ve updated to the newest version.

Small update,
I can confirm that the doorbell button is pressed trigger works.
It stays on quite a while, but that is easy fixable to set it to off at the end of a script/rule.
So, many thanks for including this.
Now it already does what the Google nest doorbell did, and gives me a lot of extra options.

Don’t worry, of course I will stil test new updates for you.
Hope to see this binding go live with full reolink support so that others can enjoy this.

I will try and do this tomorrow! Cannot wait… been trying to get my Reolinks to work

Yes, the channel only shows what ONVIF events are sent by the camera. It is a READ ONLY channel so you cannot change its state with a rule. It may be possible to use the metadata/expiration timer feature. If you do that it is really only for cosmetic reasons in the UI.
See the different triggers for rules here:
Rules | openHAB

If you only trigger on received command ON the rule works compared to changed from OFF to ON. You could see the second one being more useful if someone is pressing the button multiple times and you only want 1 picture of the visitor to make reviewing easier at the end of the day.

No problem it was 30 seconds of work to add it, just takes a user that willing to turn on TRACE logs and report that the camera has feature not hooked up so thank you for doing that and also pointing out that it was possible. Reolink has done a smart thing by adding this feature as it is going to make their camera very popular as almost all other brands cannot do this.

That is what opensource is all about, we contribute so others can enjoy it as well.

I uploaded another build last night which hopefully the token works this time so the other channels can get tested. Some other tweaks like defaulting the onvif port to 8000 was done, so any feedback and suggestions on what needs to be changed to get the camera fully working would be great. It should be a matter of just user/pass/ip and the NVR channel and the rest should be fine to leave on defaults. If someone needs to be changed, then we can now set the default values to work out of the box as Relolink now has its own thing-type.

Great the more testers the better whilst the code is fresh in my head it is quicker to make changes.

Before getting this merged the following needs to be done:

  • Get the token working or revert to using user/pass in all urls.
  • Test the new channels function correct that are listed in the first post of this thread.
  • Test if auto discovery works and the result is for REOLINK and not ONVIF.
  • Work out how to turn the motion detection on and off without specifying a schedule.

The last one can be done by using CURL and playing with the json cutting out lines and seeing if the camera allows a reduced json to only toggle the on and off without specifying a schedule.

So, I’ve added the latest build (ipcamera-Reolink-20221221-PM).
The TRACE log from just adding the camera again gave 47067 rows in the log in just a bit more than 1 second. But, luckily then stopped, so no errors atm.
The amount of data is even to big for pastebin :open_mouth: and the .txt is to big to upload here. Zipped it, and that isn’t accepted. So please rename the .log back to .zip to open the .txt of the log.
ipcamera-Reolink-20221221-PM TRACE LOG.zip.log (42.9 KB)

Just quickly looking at the logs I see some positive news.
The token seems to be made.
And the token is accepted because the getability works. (Although I don’t know why it is done 3 times.)

My guess is that due to changing JARs whilst code was running there may be more than 1 request getting sent. Best to do a restart or stop openhab when swapping out the JAR files. Also it was creating logs for every chunk sent, so I have hopefully fixed it in this build just uploaded. Just a note that the token will expire in 1 hour and I need to know what the camera sends when you try and use a command with an expired token so I can detect and send the renew a token. Whilst testing just pause and un-pause and it will get a new token to keep testing with. It will not stop the alarms working so the build can be used in production if you wish as any features that stop, do not exist in the ONVIF thing type.

Installed the latest version and rebooted the machine just te be sure.

Log is way more compact now :wink:

2022-12-23 08:32:34.334 [DEBUG] [amera.internal.onvif.OnvifConnection] - Connecting 192.168.2.9 to ONVIF
2022-12-23 08:32:34.335 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSystemDateAndTime
2022-12-23 08:32:34.352 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: POST: http://192.168.2.9:80/api.cgi?cmd=Login&token=null
2022-12-23 08:32:34.376 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Body><tds:GetSystemDateAndTimeResponse><tds:SystemDateAndTime><tt:DateTimeType>NTP</tt:DateTimeType><tt:DaylightSavings>true</tt:DaylightSavings><tt:TimeZone><tt:TZ>CST-1:00:00DST-1:00:00,M3.4.0/02:00:00,M10.5.0/03:00:00</tt:TZ></tt:TimeZone><tt:UTCDateTime><tt:Time><tt:Hour>7</tt:Hour><tt:Minute>32</tt:Minute><tt:Second>35</tt:Second></tt:Time><tt:Date><tt:Year>2022</tt:Year><tt:Month>12</tt:Month><tt:Day>23</tt:Day></tt:Date></tt:UTCDateTime><tt:LocalDateTime><tt:Time><tt:Hour>8</tt:Hour><tt:Minute>32</tt:Minute><tt:Second>35</tt:Second></tt:Time><tt:Date><tt:Year>2022</tt:Year><tt:Month>12</tt:Month><tt:Day>23</tt:Day></tt:Date></tt:LocalDateTime></tds:SystemDateAndTime></tds:GetSystemDateAndTimeResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:34.377 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetCapabilities
2022-12-23 08:32:34.379 [DEBUG] [amera.internal.onvif.OnvifConnection] - Cameras  UTC dateTime is:2022-12-23T7:32:35
2022-12-23 08:32:34.379 [DEBUG] [amera.internal.onvif.OnvifConnection] - Openhabs UTC dateTime is:2022-12-23T07:32:34.379Z
2022-12-23 08:32:34.432 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.433 [TRACE] [era.internal.handler.IpCameraHandler] - LastHttpContent and is chunked:true
2022-12-23 08:32:34.433 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=Login&token=null contains 	:[
   {
      "cmd" : "Login",
      "code" : 0,
      "value" : {
         "Token" : {
            "leaseTime" : 3600,
            "name" : "1d547e408776388"
         }
      }
   }
]
:
2022-12-23 08:32:34.433 [DEBUG] [era.internal.handler.IpCameraHandler] - Your Reolink camera gave a login token:1d547e408776388
2022-12-23 08:32:34.434 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.439 [TRACE] [era.internal.handler.IpCameraHandler] - Sending camera: POST: http://192.168.2.9:80/api.cgi?cmd=GetAbility&token=1d547e408776388
2022-12-23 08:32:34.459 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">nLvUHeGdYj/IiMWOQA1uOnjHBgs=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">ODE4NzI5NzEz</wsse:Nonce><wsu:Created>2022-12-23T07:32:34.377Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tds:GetCapabilitiesResponse><tds:Capabilities><tt:Device><tt:XAddr>http://192.168.2.9:8000/onvif/device_service</tt:XAddr><tt:Network><tt:IPFilter>false</tt:IPFilter><tt:ZeroConfiguration>false</tt:ZeroConfiguration><tt:IPVersion6>false</tt:IPVersion6><tt:DynDNS>false</tt:DynDNS></tt:Network><tt:System><tt:DiscoveryResolve>true</tt:DiscoveryResolve><tt:DiscoveryBye>true</tt:DiscoveryBye><tt:RemoteDiscovery>false</tt:RemoteDiscovery><tt:SystemBackup>false</tt:SystemBackup><tt:SystemLogging>false</tt:SystemLogging><tt:FirmwareUpgrade>false</tt:FirmwareUpgrade><tt:SupportedVersions><tt:Major>21</tt:Major><tt:Minor>6</tt:Minor></tt:SupportedVersions></tt:System><tt:IO></tt:IO><tt:Security><tt:TLS1.1>false</tt:TLS1.1><tt:TLS1.2>false</tt:TLS1.2><tt:OnboardKeyGeneration>false</tt:OnboardKeyGeneration><tt:AccessPolicyConfig>false</tt:AccessPolicyConfig><tt:X.509Token>false</tt:X.509Token><tt:SAMLToken>false</tt:SAMLToken><tt:KerberosToken>false</tt:KerberosToken><tt:RELToken>false</tt:RELToken></tt:Security></tt:Device><tt:Events><tt:XAddr>http://192.168.2.9:8000/onvif/event_service</tt:XAddr><tt:WSSubscriptionPolicySupport>true</tt:WSSubscriptionPolicySupport><tt:WSPullPointSupport>true</tt:WSPullPointSupport><tt:WSPausableSubscriptionManagerInterfaceSupport>false</tt:WSPausableSubscriptionManagerInterfaceSupport></tt:Events><tt:Imaging><tt:XAddr>http://192.168.2.9:8000/onvif/imaging_service</tt:XAddr></tt:Imaging><tt:Media><tt:XAddr>http://192.168.2.9:8000/onvif/media_service</tt:XAddr><tt:StreamingCapabilities><tt:RTPMulticast>false</tt:RTPMulticast><tt:RTP_TCP>true</tt:RTP_TCP><tt:RTP_RTSP_TCP>true</tt:RTP_RTSP_TCP><tt:Extension></tt:Extension></tt:StreamingCapabilities><tt:Extension><tt:ProfileCapabilities><tt:MaximumNumberOfProfiles>10</tt:MaximumNumberOfProfiles></tt:ProfileCapabilities></tt:Extension></tt:Media><tt:Extension><tt:DeviceIO><tt:XAddr>http://192.168.2.9:8000/onvif/deviceIO_service</tt:XAddr><tt:VideoSources>1</tt:VideoSources><tt:VideoOutputs>0</tt:VideoOutputs><tt:AudioSources>1</tt:AudioSources><tt:AudioOutputs>0</tt:AudioOutputs><tt:RelayOutputs>0</tt:RelayOutputs></tt:DeviceIO></tt:Extension></tds:Capabilities></tds:GetCapabilitiesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:34.459 [DEBUG] [amera.internal.onvif.OnvifConnection] - deviceXAddr:http://192.168.2.9:8000/onvif/device_service
2022-12-23 08:32:34.459 [DEBUG] [amera.internal.onvif.OnvifConnection] - eventsXAddr:http://192.168.2.9:8000/onvif/event_service
2022-12-23 08:32:34.459 [DEBUG] [amera.internal.onvif.OnvifConnection] - mediaXAddr:http://192.168.2.9:8000/onvif/media_service
2022-12-23 08:32:34.460 [DEBUG] [amera.internal.onvif.OnvifConnection] - Camera has no ONVIF PTZ support.
2022-12-23 08:32:34.492 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetProfiles
2022-12-23 08:32:34.503 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.504 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.504 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.506 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.514 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.534 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:34.534 [TRACE] [era.internal.handler.IpCameraHandler] - LastHttpContent and is chunked:true
2022-12-23 08:32:34.534 [TRACE] [era.internal.handler.IpCameraHandler] - HTTP Result from /api.cgi?cmd=GetAbility&token=1d547e408776388 contains 	:[
   {
      "cmd" : "GetAbility",
      "code" : 0,
      "value" : {
         "Ability" : {
            "3g" : {
               "permit" : 0,
               "ver" : 0
            },
            "abilityChn" : [
               {
                  "aiTrack" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "aiTrackDogCat" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "alarmAudio" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "alarmIoIn" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "alarmIoOut" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "alarmMd" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "alarmRf" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "batAnalysis" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "battery" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "cameraMode" : {
                     "permit" : 6,
                     "ver" : 0
                  },
                  "disableAutoFocus" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "enc" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "floodLight" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ftp" : {
                     "permit" : 6,
                     "ver" : 6
                  },
                  "image" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "indicatorLight" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "isp" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "isp3Dnr" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ispAntiFlick" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispBackLight" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ispBright" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispContrast" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispDayNight" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispExposureMode" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ispFlip" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispHue" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ispMirror" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispSatruation" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispSharpen" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "ispWhiteBalance" : {
                     "permit" : 6,
                     "ver" : 0
                  },
                  "ledControl" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "live" : {
                     "permit" : 4,
                     "ver" : 1
                  },
                  "mainEncType" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "mask" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "mdTriggerAudio" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "mdTriggerRecord" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "mdWithPir" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "osd" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "powerLed" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ptzCtrl" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ptzDirection" : {
                     "permit" : 1,
                     "ver" : 0
                  },
                  "ptzPatrol" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ptzPreset" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ptzTattern" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "ptzType" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "recCfg" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "recDownload" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "recReplay" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "recSchedule" : {
                     "permit" : 6,
                     "ver" : 2
                  },
                  "shelterCfg" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "snap" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAi" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiAnimal" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportAiDetectConfig" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiDogCat" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportAiFace" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportAiPeople" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiSensitivity" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiStayTime" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiTargetSize" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportAiTrackClassify" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportAiVehicle" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportAoAdjust" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportFLBrightness" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportFLIntelligent" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportFLKeepOn" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportFLSchedule" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportFLswitch" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportGop" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportMd" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "supportPtzCheck" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportThresholdAdjust" : {
                     "permit" : 0,
                     "ver" : 0
                  },
                  "supportWhiteDark" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "videoClip" : {
                     "permit" : 6,
                     "ver" : 2
                  },
                  "waterMark" : {
                     "permit" : 6,
                     "ver" : 1
                  },
                  "white_balance" : {
                     "permit" : 6,
                     "ver" : 0
                  }
               }
            ],
            "alarmAudio" : {
               "permit" : 6,
               "ver" : 1
            },
            "alarmDisconnet" : {
               "permit" : 6,
               "ver" : 1
            },
            "alarmHddErr" : {
               "permit" : 6,
               "ver" : 1
            },
            "alarmHddFull" : {
               "permit" : 6,
               "ver" : 1
            },
            "alarmIpConflict" : {
               "permit" : 6,
               "ver" : 1
            },
            "auth" : {
               "permit" : 6,
               "ver" : 1
            },
            "autoMaint" : {
               "permit" : 6,
               "ver" : 1
            },
            "cloudStorage" : {
               "permit" : 6,
               "ver" : 35
            },
            "customAudio" : {
               "permit" : 1,
               "ver" : 1
            },
            "dateFormat" : {
               "permit" : 6,
               "ver" : 1
            },
            "ddns" : {
               "permit" : 6,
               "ver" : 9
            },
            "ddnsCfg" : {
               "permit" : 6,
               "ver" : 1
            },
            "devInfo" : {
               "permit" : 4,
               "ver" : 1
            },
            "devName" : {
               "permit" : 6,
               "ver" : 2
            },
            "disableAutoFocus" : {
               "permit" : 0,
               "ver" : 0
            },
            "disk" : {
               "permit" : 0,
               "ver" : 0
            },
            "display" : {
               "permit" : 6,
               "ver" : 1
            },
            "email" : {
               "permit" : 6,
               "ver" : 3
            },
            "emailInterval" : {
               "permit" : 6,
               "ver" : 1
            },
            "emailSchedule" : {
               "permit" : 6,
               "ver" : 1
            },
            "exportCfg" : {
               "permit" : 4,
               "ver" : 0
            },
            "ftpAutoDir" : {
               "permit" : 6,
               "ver" : 1
            },
            "ftpExtStream" : {
               "permit" : 6,
               "ver" : 1
            },
            "ftpPic" : {
               "permit" : 0,
               "ver" : 0
            },
            "ftpSubStream" : {
               "permit" : 6,
               "ver" : 1
            },
            "ftpTest" : {
               "permit" : 6,
               "ver" : 0
            },
            "hourFmt" : {
               "permit" : 6,
               "ver" : 2
            },
            "http" : {
               "permit" : 6,
               "ver" : 3
            },
            "httpFlv" : {
               "permit" : 6,
               "ver" : 1
            },
            "https" : {
               "permit" : 6,
               "ver" : 3
            },
            "importCfg" : {
               "permit" : 1,
               "ver" : 0
            },
            "ipcManager" : {
               "permit" : 6,
               "ver" : 1
            },
            "ledControl" : {
               "permit" : 7,
               "ver" : 1
            },
            "localLink" : {
               "permit" : 6,
               "ver" : 1
            },
            "log" : {
               "permit" : 6,
               "ver" : 1
            },
            "mediaPort" : {
               "permit" : 6,
               "ver" : 1
            },
            "ntp" : {
               "permit" : 6,
               "ver" : 1
            },
            "online" : {
               "permit" : 6,
               "ver" : 1
            },
            "onvif" : {
               "permit" : 6,
               "ver" : 3
            },
            "p2p" : {
               "permit" : 6,
               "ver" : 1
            },
            "performance" : {
               "permit" : 4,
               "ver" : 1
            },
            "pppoe" : {
               "permit" : 6,
               "ver" : 0
            },
            "push" : {
               "permit" : 6,
               "ver" : 1
            },
            "pushSchedule" : {
               "permit" : 6,
               "ver" : 1
            },
            "reboot" : {
               "permit" : 1,
               "ver" : 1
            },
            "recExtensionTimeList" : {
               "permit" : 6,
               "ver" : 1
            },
            "recOverWrite" : {
               "permit" : 6,
               "ver" : 1
            },
            "recPackDuration" : {
               "permit" : 6,
               "ver" : 0
            },
            "recPreRecord" : {
               "permit" : 6,
               "ver" : 1
            },
            "restore" : {
               "permit" : 1,
               "ver" : 1
            },
            "rtmp" : {
               "permit" : 6,
               "ver" : 3
            },
            "rtsp" : {
               "permit" : 6,
               "ver" : 3
            },
            "scheduleVersion" : {
               "permit" : 6,
               "ver" : 1
            },
            "sdCard" : {
               "permit" : 6,
               "ver" : 1
            },
            "showQrCode" : {
               "permit" : 6,
               "ver" : 0
            },
            "simMoudule" : {
               "permit" : 6,
               "ver" : 0
            },
            "supportAudioAlarm" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportAudioAlarmEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportAudioAlarmSchedule" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportAudioAlarmTaskEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportAudioFileList" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportAutoReply" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportBuzzer" : {
               "permit" : 0,
               "ver" : 0
            },
            "supportBuzzerEnable" : {
               "permit" : 0,
               "ver" : 0
            },
            "supportBuzzerTask" : {
               "permit" : 0,
               "ver" : 0
            },
            "supportBuzzerTaskEnable" : {
               "permit" : 0,
               "ver" : 0
            },
            "supportEmailEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportEmailTaskEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpCoverPicture" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpCoverVideo" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpDirYM" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpPicCaptureMode" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpPicResoCustom" : {
               "permit" : 6,
               "ver" : 0
            },
            "supportFtpPictureSwap" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpTask" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpTaskEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpVideoSwap" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportFtpsEncrypt" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportHttpEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportHttpsEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportOnvifEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportPushInterval" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportRecScheduleEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportRecordEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportRtmpEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "supportRtspEnable" : {
               "permit" : 6,
               "ver" : 1
            },
            "talk" : {
               "permit" : 4,
               "ver" : 1
            },
            "time" : {
               "permit" : 6,
               "ver" : 2
            },
            "tvSystem" : {
               "permit" : 6,
               "ver" : 0
            },
            "upgrade" : {
               "permit" : 1,
               "ver" : 2
            },
            "upnp" : {
               "permit" : 6,
               "ver" : 1
            },
            "user" : {
               "permit" : 6,
               "ver" : 1
            },
            "videoClip" : {
               "permit" : 6,
               "ver" : 2
            },
            "wifi" : {
               "permit" : 6,
               "ver" : 1
            },
            "wifiTest" : {
               "permit" : 6,
               "ver" : 1
            }
         }
      }
   }
]
:
2022-12-23 08:32:34.534 [TRACE] [era.internal.handler.IpCameraHandler] - Recieved partial reply that is chunked.
2022-12-23 08:32:35.053 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">FY7nqY1HkGWYoJhtmrYPvSjwRdY=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MTQ3NzY0Mzc4Mg==</wsse:Nonce><wsu:Created>2022-12-23T07:32:34.493Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><trt:GetProfilesResponse><trt:Profiles token="000" fixed="true"><tt:Name>Profile000_MainStream</tt:Name><tt:VideoSourceConfiguration token="000"><tt:Name>VideoS_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:SourceToken>000</tt:SourceToken><tt:Bounds x="0" y="0" width="2560" height="1920"></tt:Bounds></tt:VideoSourceConfiguration><tt:AudioSourceConfiguration token="000"><tt:Name>AudioS_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:SourceToken>000</tt:SourceToken></tt:AudioSourceConfiguration><tt:VideoEncoderConfiguration token="000"><tt:Name>VideoE_000</tt:Name><tt:UseCount>1</tt:UseCount><tt:Encoding>H264</tt:Encoding><tt:Resolution><tt:Width>2560</tt:Width><tt:Height>1920</tt:Height></tt:Resolution><tt:Quality>0</tt:Quality><tt:RateControl><tt:FrameRateLimit>20</tt:FrameRateLimit><tt:EncodingInterval>1</tt:EncodingInterval><tt:BitrateLimit>6144</tt:BitrateLimit></tt:RateControl><tt:H264><tt:GovLength>40</tt:GovLength><tt:H264Profile>Main</tt:H264Profile></tt:H264><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>239.0.1.0</tt:IPv4Address></tt:Address><tt:Port>4000</tt:Port><tt:TTL>64</tt:TTL><tt:AutoStart>false</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT10S</tt:SessionTimeout></tt:VideoEncoderConfiguration><tt:AudioEncoderConfiguration token="000"><tt:Name>AudioE_000</tt:Name><tt:UseCount>1</tt:UseCount><tt:Encoding>AAC</tt:Encoding><tt:Bitrate>16</tt:Bitrate><tt:SampleRate>16</tt:SampleRate><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>238.255.255.255</tt:IPv4Address></tt:Address><tt:Port>25320</tt:Port><tt:TTL>60</tt:TTL><tt:AutoStart>false</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT0S</tt:SessionTimeout></tt:AudioEncoderConfiguration><tt:VideoAnalyticsConfiguration token="000"><tt:Name>VideoA_000</tt:Name><tt:UseCount>1</tt:UseCount><tt:AnalyticsEngineConfiguration><tt:AnalyticsModule Type="tt:CellMotionEngine" Name="MyCellMotionModule"><tt:Parameters><tt:SimpleItem Name="Sensitivity" Value="0"></tt:SimpleItem><tt:ElementItem Name="Layout"><tt:CellLayout Columns="80" Rows="60"><tt:Transformation><tt:Translate x="-1.000000" y="-1.000000"/><tt:Scale x="0.000781" y="0.001042"/></tt:Transformation></tt:CellLayout></tt:ElementItem></tt:Parameters></tt:AnalyticsModule></tt:AnalyticsEngineConfiguration><tt:RuleEngineConfiguration><tt:Rule Type="CellMotionDetector" Name="MyMotionDetectorRule"><tt:Parameters><tt:SimpleItem Name="AlarmOnDelay" Value="100"></tt:SimpleItem><tt:SimpleItem Name="AlarmOnDelay" Value="100"></tt:SimpleItem><tt:SimpleItem Name="AlarmOnDelay" Value="Av///PwAAj////wAAw///8D9AAMD///w/AAC///8+wA="></tt:SimpleItem></tt:Parameters></tt:Rule></tt:RuleEngineConfiguration></tt:VideoAnalyticsConfiguration><tt:MetadataConfiguration token="000"><tt:Name>Metadata_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:PTZStatus><tt:Status>false</tt:Status><tt:Position>false</tt:Position></tt:PTZStatus><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>224.2.0.0</tt:IPv4Address></tt:Address><tt:Port>40020</tt:Port><tt:TTL>64</tt:TTL><tt:AutoStart>true</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT60S</tt:SessionTimeout></tt:MetadataConfiguration></trt:Profiles><trt:Profiles token="001" fixed="true"><tt:Name>Profile001_SubStream</tt:Name><tt:VideoSourceConfiguration token="000"><tt:Name>VideoS_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:SourceToken>000</tt:SourceToken><tt:Bounds x="0" y="0" width="2560" height="1920"></tt:Bounds></tt:VideoSourceConfiguration><tt:AudioSourceConfiguration token="000"><tt:Name>AudioS_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:SourceToken>000</tt:SourceToken></tt:AudioSourceConfiguration><tt:VideoEncoderConfiguration token="001"><tt:Name>VideoE_001</tt:Name><tt:UseCount>1</tt:UseCount><tt:Encoding>H264</tt:Encoding><tt:Resolution><tt:Width>640</tt:Width><tt:Height>480</tt:Height></tt:Resolution><tt:Quality>2</tt:Quality><tt:RateControl><tt:FrameRateLimit>10</tt:FrameRateLimit><tt:EncodingInterval>1</tt:EncodingInterval><tt:BitrateLimit>256</tt:BitrateLimit></tt:RateControl><tt:H264><tt:GovLength>40</tt:GovLength><tt:H264Profile>Main</tt:H264Profile></tt:H264><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>239.0.1.0</tt:IPv4Address></tt:Address><tt:Port>4000</tt:Port><tt:TTL>64</tt:TTL><tt:AutoStart>false</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT10S</tt:SessionTimeout></tt:VideoEncoderConfiguration><tt:AudioEncoderConfiguration token="001"><tt:Name>AudioE_001</tt:Name><tt:UseCount>1</tt:UseCount><tt:Encoding>AAC</tt:Encoding><tt:Bitrate>16</tt:Bitrate><tt:SampleRate>16</tt:SampleRate><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>238.255.255.255</tt:IPv4Address></tt:Address><tt:Port>25320</tt:Port><tt:TTL>60</tt:TTL><tt:AutoStart>false</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT0S</tt:SessionTimeout></tt:AudioEncoderConfiguration><tt:VideoAnalyticsConfiguration token="001"><tt:Name>VideoA_001</tt:Name><tt:UseCount>1</tt:UseCount><tt:AnalyticsEngineConfiguration><tt:AnalyticsModule Type="tt:CellMotionEngine" Name="MyCellMotionModule"><tt:Parameters><tt:SimpleItem Name="Sensitivity" Value="0"></tt:SimpleItem><tt:ElementItem Name="Layout"><tt:CellLayout Columns="80" Rows="60"><tt:Transformation><tt:Translate x="-1.000000" y="-1.000000"/><tt:Scale x="0.000781" y="0.001042"/></tt:Transformation></tt:CellLayout></tt:ElementItem></tt:Parameters></tt:AnalyticsModule></tt:AnalyticsEngineConfiguration><tt:RuleEngineConfiguration><tt:Rule Type="CellMotionDetector" Name="MyMotionDetectorRule"><tt:Parameters><tt:SimpleItem Name="AlarmOnDelay" Value="100"></tt:SimpleItem><tt:SimpleItem Name="AlarmOnDelay" Value="100"></tt:SimpleItem><tt:SimpleItem Name="AlarmOnDelay" Value="Av///PwAAj////wAAw///8D9AAMD///w/AAC///8+wA="></tt:SimpleItem></tt:Parameters></tt:Rule></tt:RuleEngineConfiguration></tt:VideoAnalyticsConfiguration><tt:MetadataConfiguration token="000"><tt:Name>Metadata_000</tt:Name><tt:UseCount>2</tt:UseCount><tt:PTZStatus><tt:Status>false</tt:Status><tt:Position>false</tt:Position></tt:PTZStatus><tt:Multicast><tt:Address><tt:Type>IPv4</tt:Type><tt:IPv4Address>224.2.0.0</tt:IPv4Address></tt:Address><tt:Port>40020</tt:Port><tt:TTL>64</tt:TTL><tt:AutoStart>true</tt:AutoStart></tt:Multicast><tt:SessionTimeout>PT60S</tt:SessionTimeout></tt:MetadataConfiguration></trt:Profiles></trt:GetProfilesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.054 [TRACE] [amera.internal.onvif.OnvifConnection] - String was found:000
2022-12-23 08:32:35.054 [TRACE] [amera.internal.onvif.OnvifConnection] - String was found:001
2022-12-23 08:32:35.054 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetSnapshotUri
2022-12-23 08:32:35.055 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetStreamUri
2022-12-23 08:32:35.056 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetEventProperties
2022-12-23 08:32:35.056 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:GetServiceCapabilities
2022-12-23 08:32:35.163 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">u095k+Qk5xP6WhNL7sG1V08RL1U=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">LTE3MTMwNzQyNDY=</wsse:Nonce><wsu:Created>2022-12-23T07:32:35.054Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><trt:GetSnapshotUriResponse><trt:MediaUri><tt:Uri>http://192.168.2.9:80/cgi-bin/api.cgi?cmd=onvifSnapPic&amp;channel=0</tt:Uri><tt:InvalidAfterConnect>true</tt:InvalidAfterConnect><tt:InvalidAfterReboot>true</tt:InvalidAfterReboot><tt:Timeout>PT10S</tt:Timeout></trt:MediaUri></trt:GetSnapshotUriResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.164 [DEBUG] [amera.internal.onvif.OnvifConnection] - GetSnapshotUri:/cgi-bin/api.cgi?cmd=onvifSnapPic&amp;channel=0
2022-12-23 08:32:35.185 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Body><SOAP-ENV:Fault><SOAP-ENV:Code><SOAP-ENV:Value>SOAP-ENV:Sender</SOAP-ENV:Value></SOAP-ENV:Code><SOAP-ENV:Reason><SOAP-ENV:Text xml:lang="en">Method 'GetServiceCapabilities' not implemented: method name or namespace not recognized</SOAP-ENV:Text></SOAP-ENV:Reason></SOAP-ENV:Fault></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.201 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">05F+I7llBfsIUOigNNxi3TtgyCI=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">LTc0OTcwMjQyNA==</wsse:Nonce><wsu:Created>2022-12-23T07:32:35.056Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tev:GetEventPropertiesResponse><tev:TopicNamespaceLocation>http://www.onvif.org/onvif/ver10/topics/topicns.xml</tev:TopicNamespaceLocation><wsnt:FixedTopicSet>true</wsnt:FixedTopicSet><wstop:TopicSet><tns1:VideoSource wstop:topic="false"><MotionAlarm wstop:topic="true"><tt:MessageDescription IsProperty="true"><tt:Source><tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken"/></tt:Source><tt:Data><tt:SimpleItemDescription Name="State" Type="xsd:boolean"/></tt:Data></tt:MessageDescription></MotionAlarm><ImageTooDark wstop:topic="false"><ImagingService wstop:topic="true"><tt:MessageDescription IsProperty="true"><tt:Source><tt:SimpleItemDescription Name="Source" Type="tt:ReferenceToken" /></tt:Source><tt:Data><tt:SimpleItemDescription Name="State" Type="xsd:boolean" /></tt:Data></tt:MessageDescription></ImagingService></ImageTooDark></tns1:VideoSource><tns1:Media wstop:topic="false"><ProfileChanged wstop:topic="true"><tt:MessageDescription IsProperty="false"><tt:Data><tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" /></tt:Data></tt:MessageDescription></ProfileChanged><ConfigurationChanged wstop:topic="true"><tt:MessageDescription IsProperty="false"><tt:Source><tt:SimpleItemDescription Name="Token" Type="tt:ReferenceToken" /></tt:Source><tt:Data><tt:SimpleItemDescription Name="Type" Type="xsd:string" /></tt:Data></tt:MessageDescription></ConfigurationChanged></tns1:Media><tns1:RuleEngine wstop:topic="true"><CellMotionDetector wstop:topic="true"><Motion wstop:topic="true"><tt:MessageDescription IsProperty="true"><tt:Source><tt:SimpleItemDescription Name="VideoSourceConfigurationToken" Type="tt:ReferenceToken"/><tt:SimpleItemDescription Name="VideoAnalyticsConfigurationToken" Type="tt:ReferenceToken"/><tt:SimpleItemDescription Name="Rule" Type="xsd:string"/></tt:Source><tt:Data><tt:SimpleItemDescription Name="IsMotion" Type="xsd:boolean"/></tt:Data></tt:MessageDescription></Motion></CellMotionDetector></tns1:RuleEngine></wstop:TopicSet><wsnt:TopicExpressionDialect>http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet</wsnt:TopicExpressionDialect><wsnt:TopicExpressionDialect>http://docs.oasis-open.org/wsn/t-1/TopicExpression/Concrete</wsnt:TopicExpressionDialect><tev:MessageContentFilterDialect>http://www.onvif.org/ver10/tev/messageContentFilter/ItemFilter</tev:MessageContentFilterDialect><tev:MessageContentSchemaLocation>http://www.onvif.org/onvif/ver10/schema/onvif.xsd</tev:MessageContentSchemaLocation></tev:GetEventPropertiesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.201 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:CreatePullPointSubscription
2022-12-23 08:32:35.269 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.2.9:8000/onvif/event_service</wsa5:To><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">oSES9/sZ48ug8WO4YulovEIWuX4=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MTY5OTcxNjQ1OQ==</wsse:Nonce><wsu:Created>2022-12-23T07:32:35.201Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tev:CreatePullPointSubscriptionResponse><tev:SubscriptionReference><wsa5:Address>http://192.168.2.9:8000/onvif/PullSubManager?Idx=35701699</wsa5:Address></tev:SubscriptionReference><wsnt:CurrentTime>2022-12-23T07:32:36Z</wsnt:CurrentTime><wsnt:TerminationTime>2022-12-23T07:42:36Z</wsnt:TerminationTime></tev:CreatePullPointSubscriptionResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.269 [DEBUG] [amera.internal.onvif.OnvifConnection] - subscriptionXAddr=http://192.168.2.9:8000/onvif/PullSubManager?Idx=35701699
2022-12-23 08:32:35.269 [TRACE] [amera.internal.onvif.OnvifConnection] - Sending ONVIF request:PullMessages
2022-12-23 08:32:35.290 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">KmW0no3iTriFyh/B06riNtHMlvA=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">LTE3MDIxMTc0ODY=</wsse:Nonce><wsu:Created>2022-12-23T07:32:35.056Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><trt:GetStreamUriResponse><trt:MediaUri><tt:Uri>rtsp://192.168.2.9:554/</tt:Uri><tt:InvalidAfterConnect>false</tt:InvalidAfterConnect><tt:InvalidAfterReboot>false</tt:InvalidAfterReboot><tt:Timeout>PT10S</tt:Timeout></trt:MediaUri></trt:GetStreamUriResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:35.291 [DEBUG] [amera.internal.onvif.OnvifConnection] - GetStreamUri:rtsp://192.168.2.9:554/
2022-12-23 08:32:35.351 [TRACE] [amera.internal.onvif.OnvifConnection] - Onvif reply is:<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsdd="http://schemas.xmlsoap.org/ws/2005/04/discovery" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:chan="http://schemas.microsoft.com/ws/2005/02/duplex" xmlns:wsa5="http://www.w3.org/2005/08/addressing" xmlns:c14n="http://www.w3.org/2001/10/xml-exc-c14n#" xmlns:ds="http://www.w3.org/2000/09/xmldsig#" xmlns:saml1="urn:oasis:names:tc:SAML:1.0:assertion" xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#" xmlns:wsc="http://docs.oasis-open.org/ws-sx/ws-secureconversation/200512" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:ns1="http://www.onvif.org/ver20/media/wsdl" xmlns:tdn="http://www.onvif.org/ver10/network/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trc="http://www.onvif.org/ver10/recording/wsdl" xmlns:trp="http://www.onvif.org/ver10/replay/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:trv="http://www.onvif.org/ver10/receiver/wsdl" xmlns:tse="http://www.onvif.org/ver10/search/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:tad="http://www.onvif.org/ver20/analytics/wsdl"><SOAP-ENV:Header><wsa5:To SOAP-ENV:mustUnderstand="1">http://192.168.2.9:8000/onvif/PullSubManager?Idx=35701699</wsa5:To><wsse:Security><wsse:UsernameToken><wsse:Username>OpenHab</wsse:Username><wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">nUjl8Xc9aFkHTVv3wESD/Axvshs=</wsse:Password><wsse:Nonce EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary">MTY2Mzg0NTkyOQ==</wsse:Nonce><wsu:Created>2022-12-23T07:32:35.269Z</wsu:Created></wsse:UsernameToken></wsse:Security></SOAP-ENV:Header><SOAP-ENV:Body><tev:PullMessagesResponse><tev:CurrentTime>2022-12-23T07:32:36Z</tev:CurrentTime><tev:TerminationTime>2022-12-23T07:42:36Z</tev:TerminationTime><wsnt:NotificationMessage><wsnt:Topic Dialect="http://www.onvif.org/ver10/tev/topicExpression/ConcreteSet">tns1:RuleEngine/CellMotionDetector/Motion</wsnt:Topic><wsnt:Message><tt:Message UtcTime="1970-01-01T00:00:00Z" PropertyOperation="Initialized"><tt:Source><tt:SimpleItem Name="VideoSourceConfigurationToken" Value="VideoSourceToken" /></tt:Source><tt:Data><tt:SimpleItem Name="IsMotion" Value="false" /></tt:Data></tt:Message></wsnt:Message></wsnt:NotificationMessage></tev:PullMessagesResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>

2022-12-23 08:32:50.509 [WARN ] [.core.thing.binding.BaseThingHandler] - Attempt to apply invalid configuration 'Configuration[{key=config_52_2; type=BigDecimal; value=3600}, {key=config_31_1; type=BigDecimal; value=1}, {key=config_33_1; type=BigDecimal; value=0}, {key=config_54_1; type=BigDecimal; value=1}, {key=config_10_2; type=BigDecimal; value=0}, {key=config_50_1; type=BigDecimal; value=10}, {key=group_5; type=EmptyList; value=[]}, {key=group_4; type=EmptyList; value=[]}, {key=group_1; type=ArrayList; value=[controller, controller]}, {key=group_3; type=EmptyList; value=[]}, {key=group_2; type=EmptyList; value=[]}, {key=config_16_2; type=BigDecimal; value=5}, {key=config_39_2; type=BigDecimal; value=250}, {key=config_35_1; type=BigDecimal; value=1}, {key=config_14_1; type=BigDecimal; value=1}, {key=config_37_1; type=BigDecimal; value=1}, {key=config_58_1; type=BigDecimal; value=0}, {key=config_20_1; type=BigDecimal; value=0}, {key=config_41_1; type=BigDecimal; value=2}, {key=config_22_1; type=BigDecimal; value=0}, {key=config_43_1; type=BigDecimal; value=1}, {key=action_heal; type=Boolean; value=false}, {key=config_1_1; type=BigDecimal; value=12}, {key=config_7_1; type=BigDecimal; value=1}, {key=config_28_1; type=BigDecimal; value=1}, {key=config_49_1; type=BigDecimal; value=1}, {key=config_9_1; type=BigDecimal; value=1}, {key=config_3_1; type=BigDecimal; value=1}, {key=config_24_1; type=BigDecimal; value=0}, {key=config_45_1; type=BigDecimal; value=1}, {key=config_5_1; type=BigDecimal; value=1}, {key=config_26_1; type=BigDecimal; value=0}, {key=config_47_1; type=BigDecimal; value=1}, {key=config_30_1; type=BigDecimal; value=2}, {key=binding_cmdrepollperiod; type=BigDecimal; value=1500.0}, {key=config_32_1; type=BigDecimal; value=2}, {key=config_53_2; type=BigDecimal; value=10}, {key=switchall_mode; type=BigDecimal; value=255}, {key=action_reinit; type=Boolean; value=false}, {key=config_59_2; type=BigDecimal; value=0}, {key=config_11_2; type=BigDecimal; value=255}, {key=config_19_1; type=BigDecimal; value=0}, {key=config_34_1; type=BigDecimal; value=1}, {key=config_13_1; type=BigDecimal; value=0}, {key=config_15_1; type=BigDecimal; value=30}, {key=config_42_1; type=BigDecimal; value=3}, {key=config_21_1; type=BigDecimal; value=1}, {key=config_40_1; type=BigDecimal; value=3}, {key=action_failed; type=Boolean; value=false}, {key=action_remove; type=Boolean; value=false}, {key=binding_pollperiod; type=BigDecimal; value=86400.0}, {key=config_2_1; type=BigDecimal; value=83}, {key=config_27_1; type=BigDecimal; value=15}, {key=config_6_2; type=BigDecimal; value=1}, {key=config_29_1; type=BigDecimal; value=0}, {key=config_8_2; type=BigDecimal; value=5}, {key=config_23_1; type=BigDecimal; value=1}, {key=config_46_1; type=BigDecimal; value=1}, {key=config_44_2; type=BigDecimal; value=600}, {key=config_25_1; type=BigDecimal; value=0}, {key=config_48_1; type=BigDecimal; value=1}, {key=config_4_2; type=BigDecimal; value=0}, {key=node_id; type=BigDecimal; value=11}]' on thing 'zwave:device:a60e9f6a:node11' blocked. This is most likely a bug: {group_1=Only 1 elements are allowed but 2 are provided.}
2022-12-23 08:32:52.435 [DEBUG] [era.internal.handler.IpCameraHandler] - Closing an idle channel for camera:192.168.2.9
2022-12-23 08:32:52.535 [DEBUG] [era.internal.handler.IpCameraHandler] - Closing an idle channel for camera:192.168.2.9

What command would you like me to send where/how after an hour?

Hi,

I’m a reolink user as well with some cameras and thinking on buying a doorbell, so I’m really exciting about your work here :slight_smile:

I’m using my cameras with API and RTSP not ONVIF, but I will migrate to this binding if it works wit reolink.

Here are how I switch recording and ftp on/off (changing enabled to 0 or 1) with API, without schedule. I couldn’t find how to turn off motion detection and it was easier to switch these off to not have recordings. I hope it helps.
curl -s --data @$json_file "http://rlc-410wg/api.cgi?cmd=SetRec&user=****&password=****"

json
[
  {
    "cmd":"SetRec",
    "param":
    {
        "Rec" : 
        {
            "channel" : 0,
            "schedule" : 
            {
               "enable" : 0
            }
         }
    }
  }
]

curl -s --data @$json_file "http://rlc-410wg/api.cgi?cmd=SetFtp&user=****&password=****"

json
[
  {
    "cmd":"SetFtp",
    "param":
    {
        "Ftp" : 
        {
            "schedule" : 
            {
               "enable" : 0
            }
         }
    }
  }
]

In the cgi doc I can find GetMdState command, but no Set.