I was unable to test the public DDNS name resolution but the code has become pretty common so it should work.
Here are the items added:
2017-01-18: v2.3.0
Fixed the HostName resolution
Allow user-defined RTSP port
Allow for multi-camera HDCVI systems (e.g. 4-camera AMDV7204-4B: just pick channels 0 through 3 and set up as individual cameras, thx to JBethancourt)
Updated debugging code for readability (thx to ady624 for the formatting code)
Changed the default state of recording to “Auto” instead of “Off”
Added a function (queryMotion) to return ON/OFF based on current state.
I will update the first post with the details once I have confirmation that this resolves the issues recently reported (thx for being my beta testers )
Let me know if you have any issues with this change and thank you for your patience and enjoy!
p.s. @ElwoodBlues, I tried the test with SHM and confirmed that this is “private” functionality that ST does not expose to the device programmers. It does not appear that this will be free functionality.
Not sure if anyone else is seeing this but with the new version when I tap on the toggle motion detect icon, it changes color (gray/green) like before but the feature doesn’t actually toggle the camera motion detect feature on and off. It did work with the old version.
@jjslegacy, did you go into the configuration in the DTH and enter in the RTSP port? This is a new field so it may be failing on the RTSP port not being set, if that is the stream option you are using.
@Roadrider, same question/suggestion. Try refiling your configuration with the new prompts to make sure everything is entered and try again.
There is still something wrong with the convert hostname. Too distracted to figure out which line but replace the matching section with this:
if (response.data?.Status == 0) { // Success
for (answer in response.data?.Answer) { // Loop through results looking for the first IP address returned otherwise it's redirects
//log.trace "Processing response: ${answer}"
if (isIpAddress(answer?.data)) {
log.trace "Hostname ${answer?.name} has IP Address ${answer?.data}"
return answer?.data // We're done here (if there are more ignore it, we'll use the first IP address returned)
} else {
log.trace "Hostname ${answer?.name} redirected to ${answer?.data}"
}
}
}
The problem for that issue is in the return line… I already have that fixed (I believe). I am getting a constant reboot on my camera that I am trying to track down.
Change your version from “return answer?.data” to “return result?.data” and it should be fine.
Fixed a typo in the return value for ‘convertHostnameToIPAddress’.
Also, ST revoked S3 access so snapshots are no longer functional.
Also, I separated the camera channel from the video channel, so your configurations must be refiled!
RTSP streaming works on my cameras, but MJPEG does not. I am not sure if this is related to the ST security changes being made right now, but I do know that snapshots will no longer work as ST took away the S3 access.
I have to head out for the night, but I will check back in as time allows.
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:01:23 PM: info configure -> Executing
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:01:23 PM: info ‘updated()’ called…
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:01:23 PM: info configure -> Executing
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:01:23 PM: info ‘updated()’ called…
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:00:38 PM: info ¦¦¦¦ ipIsLocal -> Host IP ‘xx.xxx.x.xxx’ is Public
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:00:38 PM: info ¦¦¦¦ convertIPtoBinary -> IP address passed in is xx.xxx.x.xxx and the converted binary is xxxxxxxxxxxxxxxxx
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:00:38 PM: info ¦±- videoStart -> Streaming MJPEG video; apiCommand = /cgi-bin/mjpg/video.cgi?channel=0&subtype=0, IP = xx.xxx.x.xxx, Port = xxxx
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:00:38 PM: info ±-- videoStart -> camVideoChannel = 0, state.camVideoChannel = 0, camChannelModString =
e3dea4f0-7c1b-4851-aee3-ab9740bb0b8e 1:00:38 PM: info videoStart -> Turning Video Streaming ON
Try changing to RTSP with channel 1… that is working for me but I can not get MJPEG working at the moment. It is unclear to me if this is a ST issue with MJPEG or not.
Make sure you have a value (typically 554) defined for the “camRTSPPort” parameter then touch the bottom right tile on the DTH screen that says “MJPEG”. It should switch to “RTSP”. Then hit play.