Cameras stopped working after server migration

Posted on
Wed Nov 28, 2018 11:21 pm
webdeck offline
Posts: 388
Joined: May 07, 2005

Cameras stopped working after server migration

I migrated my server over to a new Mac Mini, which meant upgrading to Mojave (10.14.1) and I believe SecuritySpy updated around the same time to the latest version (4.2.9.) My cameras stopped working in HomeKit - I get the still images just fine, but I don't get video - it times out trying to connect. I tried deleting the cameras and recreating them, but it didn't help.

I don't know what triggered it - the new Mac Mini, Mojave, or SecuritySpy. Has anyone else updated to either macOS 10.14.1 and/or Security Spy 4.2.9 and is seeing the same problem?

Here is the homebridge log with Debug Homebridge and Indigo Script turned on for maximum output - I would love to know if a working one looks different:

Code: Select all
Thu, 29 Nov 2018 05:12:18 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /resource
Thu, 29 Nov 2018 05:12:18 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: POST /resource
[2018-11-28 21:12:18] [Camera-ffmpeg] Snapshot from Rear Door Camera at 480x270
Thu, 29 Nov 2018 05:12:18 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:18 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics?id=1.22,1.15
Thu, 29 Nov 2018 05:12:20 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: GET /characteristics?id=1.22,1.15
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Getting value for Characteristic "Streaming Status"
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Got Characteristic "Streaming Status" value: AQEA
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Getting value for Characteristic "Streaming Status"
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Got Characteristic "Streaming Status" value: AQEA
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics
Thu, 29 Nov 2018 05:12:20 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: PUT /characteristics
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Processing characteristic set: [{"aid":1,"iid":23,"value":"ARBoJiNhFN1BJIlzZOl8aWosAxoBAQACDTE5Mi4xNjguNDIuMTgDAofEBAKj8wQlAhDAnlUW6yKIdfkpnrLMFnhjAw6O8XEox60gpTmrkgyDUgEBAAUlAhDBq44GaiTHzBZEShhvEbg5Aw4+3Wp8Xjd+w93YkPd1HQEBAA=="}]
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Setting Characteristic "Setup Endpoints" to value ARBoJiNhFN1BJIlzZOl8aWosAxoBAQACDTE5Mi4xNjguNDIuMTgDAofEBAKj8wQlAhDAnlUW6yKIdfkpnrLMFnhjAw6O8XEox60gpTmrkgyDUgEBAAUlAhDBq44GaiTHzBZEShhvEbg5Aw4+3Wp8Xjd+w93YkPd1HQEBAA==
Thu, 29 Nov 2018 05:12:20 GMT StreamController
Session:  <Buffer 68 26 23 61 14 dd 41 24 89 73 64 e9 7c 69 6a 2c>
ControllerAddress:  192.168.42.18
VideoPort:  50311
AudioPort:  62371
Video Crypto:  0
Video Master Key:  <Buffer c0 9e 55 16 eb 22 88 75 f9 29 9e b2 cc 16 78 63>
Video Master Salt:  <Buffer 8e f1 71 28 c7 ad 20 a5 39 ab 92 0c 83 52>
Audio Crypto:  0
Audio Master Key:  <Buffer c1 ab 8e 06 6a 24 c7 cc 16 44 4a 18 6f 11 b8 39>
Audio Master Salt:  <Buffer 3e dd 6a 7c 5e 37 7e c3 dd d8 90 f7 75 1d>
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics?id=1.23
Thu, 29 Nov 2018 05:12:20 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: GET /characteristics?id=1.23
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Getting value for Characteristic "Setup Endpoints"
Thu, 29 Nov 2018 05:12:20 GMT StreamController Setup Read
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Got Characteristic "Setup Endpoints" value: ARBoJiNhFN1BJIlzZOl8aWosAgEAAxoBAQACDTE5Mi4xNjguNDIuMjMDAofEBAKj8wQlAQEAAhDAnlUW6yKIdfkpnrLMFnhjAw6O8XEox60gpTmrkgyDUgUlAQEAAhDBq44GaiTHzBZEShhvEbg5Aw4+3Wp8Xjd+w93YkPd1HQYEpF8XAAcEsuhQAA==
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics
Thu, 29 Nov 2018 05:12:20 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: PUT /characteristics
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Processing characteristic set: [{"aid":1,"iid":21,"value":"ARUCAQEBEGgmI2EU3UEkiXNk6XxpaiwCNAEBAAIJAQECAgECAwEAAwsBAgAFAgLQAgMBHgQXAQFjAgQxiwqUAwIrAQQEAAAAPwUCYgUDLAEBAgIMAQEBAgEAAwEBBAEeAxYBAW4CBBRmBfQDAhgABAQAAKBABgENBAEA"}]
Thu, 29 Nov 2018 05:12:20 GMT Accessory [Rear Door Camera] Setting Characteristic "Selected RTP Stream Configuration" to value ARUCAQEBEGgmI2EU3UEkiXNk6XxpaiwCNAEBAAIJAQECAgECAwEAAwsBAgAFAgLQAgMBHgQXAQFjAgQxiwqUAwIrAQQEAAAAPwUCYgUDLAEBAgIMAQEBAgEAAwEBBAEeAxYBAW4CBBRmBfQDAhgABAQAAKBABgENBAEA
Thu, 29 Nov 2018 05:12:20 GMT StreamController Write SelectedStreamConfiguration
[2018-11-28 21:12:20] [Camera-ffmpeg] Start streaming video from Rear Door Camera with 1280x720@299kBit
Thu, 29 Nov 2018 05:12:20 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:24 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics
Thu, 29 Nov 2018 05:12:24 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: PUT /characteristics
Thu, 29 Nov 2018 05:12:24 GMT Accessory [Rear Door Camera] Processing characteristic set: [{"aid":1,"iid":21,"value":"ARUCAQQBEGgmI2EU3UEkiXNk6XxpaiwCGQMLAQKAAgICaAEDAR4ECgMChAAEBAAAAAA="}]
Thu, 29 Nov 2018 05:12:24 GMT Accessory [Rear Door Camera] Setting Characteristic "Selected RTP Stream Configuration" to value ARUCAQQBEGgmI2EU3UEkiXNk6XxpaiwCGQMLAQKAAgICaAEDAR4ECgMChAAEBAAAAAA=
Thu, 29 Nov 2018 05:12:24 GMT StreamController Write SelectedStreamConfiguration
Thu, 29 Nov 2018 05:12:24 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
Thu, 29 Nov 2018 05:12:29 GMT EventedHTTPServer [::ffff:127.0.0.1] New connection from client
Thu, 29 Nov 2018 05:12:29 GMT EventedHTTPServer [::ffff:127.0.0.1] HTTP server listening on port 59697
Thu, 29 Nov 2018 05:12:29 GMT EventedHTTPServer [::ffff:127.0.0.1] Client connection closed
Thu, 29 Nov 2018 05:12:29 GMT EventedHTTPServer [::ffff:127.0.0.1] HTTP connection was closed
Thu, 29 Nov 2018 05:12:29 GMT EventedHTTPServer [::ffff:127.0.0.1] HTTP server was closed
Thu, 29 Nov 2018 05:12:50 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP request: /characteristics
Thu, 29 Nov 2018 05:12:50 GMT HAPServer [C5:86:BF:98:63:73] HAP Request: PUT /characteristics
Thu, 29 Nov 2018 05:12:50 GMT Accessory [Rear Door Camera] Processing characteristic set: [{"aid":1,"iid":21,"value":"ARUCAQABEGgmI2EU3UEkiXNk6Xxpaiw="}]
Thu, 29 Nov 2018 05:12:50 GMT Accessory [Rear Door Camera] Setting Characteristic "Selected RTP Stream Configuration" to value ARUCAQABEGgmI2EU3UEkiXNk6Xxpaiw=
Thu, 29 Nov 2018 05:12:50 GMT StreamController Write SelectedStreamConfiguration
Thu, 29 Nov 2018 05:12:50 GMT EventedHTTPServer [::ffff:192.168.42.18] HTTP Response is finished
[2018-11-28 21:12:50] [Camera-ffmpeg] Stopped streaming


And this is the ffmpeg command that I see running with a ps (and the security spy URL is correct - I can open that just fine in a browser or with curl):

Code: Select all
ffmpeg -re -i "http://[security spy credentials and URL redacted]/++video?cameraNum=3&width=2560&height=1440" -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 10 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 1531812 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params wJ5VFusiiHX5KZ6yzBZ4Y47xcSjHrSClOauSDINS "srtp://192.168.42.18:50311?rtcpport=50311&localrtcpport=50311&pkt_size=1316"


Thanks,
-Mike

Posted on
Wed Nov 28, 2018 11:25 pm
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

I just encountered this myself yesterday when I moved my SS server to a different Mac Pro. I’m investigating, I can’t see why it is failing.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed Nov 28, 2018 11:41 pm
webdeck offline
Posts: 388
Joined: May 07, 2005

Re: Cameras stopped working after server migration

I just tried doing the ffmpeg command and then used ffplay to play back the srtp stream and it just hangs on playback there as well. I can ffplay the direct securityspy stream no problem, but not the encrypted srtp version.

Code: Select all
ffplay -srtp_in_suite AES_CM_128_HMAC_SHA1_80 -srtp_in_params wJ5VFusiiHX5KZ6yzBZ4Y47xcSjHrSClOauSDINS "srtp://localhost:50311"

Posted on
Thu Nov 29, 2018 8:21 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

I am thinking that SS may have updated something that is no longer compatible with FFMPEG. The URL's are correct in the config and I can pull the urls in a browser but for some reason FFMPEG just exits when trying to run them.

Fortunately I have HKB work slated for some work in the coming days so hopefully I can try to figure it out. It's not a huge deal for me because I use the SS iOS app but it's something in HKB that is kind of cool and not currently working (and I want to get the new thing we discussed working).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Thu Nov 29, 2018 8:44 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

I am also wondering if it is how SS acts with Mojave since that's the only big change between computers for me. I know that High Sierra and Mojave both make use of GPU's and metal video where previous versions did not. I'm going to try to test this today by putting SS on a High Sierra box. The box I moved it to has a higher end video card and that may be why FFMPEG is bombing out.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 10:46 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

So I thought I had solved this by restarting the Indigo box because everything started working but this actually depend the mystery. All cameras in Indigo point to the new location of SecuritySpy but it only worked because my Indigo server was still starting SS itself so my cameras all started working at the ORIGINAL source even though the new source was what everything is configured for.

Considering the configuration file points to the new IP address I believe that the problem is that somewhere either Homebridge or FFMPEG is caching the camera locations because there is no way that the config can point to x.x.x.5 but the cameras still function 100% fine when on x.x.x.3.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 10:52 am
webdeck offline
Posts: 388
Joined: May 07, 2005

Re: Cameras stopped working after server migration

For what it’s worth, my issue isn’t IP address related because I kept the same IP addresses in place. It also seems that our symptoms may be slightly different.

Posted on
Fri Nov 30, 2018 10:55 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

Yes that is odd then. For me the configs all point to my .5 address but only work when the .3 server is running (which of course messes with licensing if they both run). At least on my end of things there seems to be a caching issue somewhere.

What message do you get in the log if you debug the server your cameras are on? My FFMPEG just gets the following message no matter what level of debugging I enable:
Code: Select all
[2018-10-4 09:12:33] [Camera-ffmpeg] Start streaming video from Deck Camera with 1280x720@299kBit
[2018-10-4 09:12:39] [Camera-ffmpeg] ERROR: FFmpeg exited with code 1

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 11:25 am
webdeck offline
Posts: 388
Joined: May 07, 2005

Re: Cameras stopped working after server migration

I included my log in the first post of this thread.

I don't get ffmpeg exiting. It runs for 20 seconds until HomeKit times out trying to open the stream, and then HomeKit tells homebridge to stop and it stops ffmpeg normally.

Posted on
Fri Nov 30, 2018 11:39 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

I think there is a caching issue that is impacting both of us. Quite convenient when you think that of all the people for this to impact it should be you and I :).

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 11:48 am
webdeck offline
Posts: 388
Joined: May 07, 2005

Re: Cameras stopped working after server migration

For what it's worth, I've removed homebridge out of the equation and am trying to get SRTP streaming to work with just ffmpeg and ffplay directly, using the same commands that homebridge was using, and it isn't working. ffmpeg sets up the streaming fine, but ffplay just hangs and doesn't display anything. Here are the two commands I'm trying. I've tried it with the latest versions of ffmpeg on Mojave as well, and even a patched version of ffplay that supposedly fixes a Mojave issue (https://www.reddit.com/r/ffmpeg/comment ... _released/)

Code: Select all
ffmpeg -loglevel trace -re -i "[REDACTED SECURITY SPY IP + AUTH]/++video?cameraNum=3&width=2560&height=1440" -map 0:0 -vcodec libx264 -pix_fmt yuv420p -r 10 -f rawvideo -tune zerolatency -vf scale=1280:720 -b:v 299k -bufsize 299k -maxrate 299k -payload_type 99 -ssrc 1531812 -f rtp -srtp_out_suite AES_CM_128_HMAC_SHA1_80 -srtp_out_params wJ5VFusiiHX5KZ6yzBZ4Y47xcSjHrSClOauSDINS "srtp://192.168.42.18:50311?rtcpport=50311&localrtcpport=50311&pkt_size=1316"


Code: Select all
ffplay -loglevel trace -srtp_in_suite AES_CM_128_HMAC_SHA1_80 -srtp_in_params wJ5VFusiiHX5KZ6yzBZ4Y47xcSjHrSClOauSDINS "srtp://192.168.42.18:50311"

Posted on
Fri Nov 30, 2018 11:52 am
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

So this may be Mohave because that is a common denominator, they may have updated something there that broke it. In my case it still magically used an. IP address for the old server rather than the new, so that still smells fishy to me. Also my stills don't work either, and those are JPEG.

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 11:52 am
webdeck offline
Posts: 388
Joined: May 07, 2005

Re: Cameras stopped working after server migration

Stills work perfectly for me. Check your SecuritySpy device in Indigo to make sure it's pointing at the right IP address.

Posted on
Fri Nov 30, 2018 12:02 pm
Colorado4Wheeler offline
User avatar
Posts: 2765
Joined: Jul 20, 2009
Location: Colorado

Re: Cameras stopped working after server migration

Already did that and checked that it is passing to the HB config as well. You can see in the screenshot that SS in Indigo is talking to the cameras without issue and below that the config is also pointed in the right direction.

Code: Select all
                        "platform": "Camera-ffmpeg",
                        "cameras": [
                                {
                                        "videoConfig": {
                                                "maxBitrate": 500,
                                                "maxWidth": 1280,
                                                "packetSize": 1316,
                                                "stillImageSource": "-i http://xxx:xxx@10.1.200.5:8000/++image?cameraNum=2&width=1280&height=720",
                                                "source": "-re -i http://xxx:xxx@10.1.200.5:8000/++video?cameraNum=2&width=1280&height=720",
                                                "maxHeight": 720,
                                                "maxFPS": 10
                                        },
                                        "name": "Basement Camera"
                                },


Screen Shot 2018-11-30 at 10.59.37 AM.png
Screen Shot 2018-11-30 at 10.59.37 AM.png (14.83 KiB) Viewed 561 times
Screen Shot 2018-11-30 at 11.00.00 AM.png
Screen Shot 2018-11-30 at 11.00.00 AM.png (24.1 KiB) Viewed 561 times

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Fri Nov 30, 2018 3:29 pm
siclark offline
Posts: 828
Joined: Jun 13, 2017
Location: UK

Re: Cameras stopped working after server migration

Just so you don't feel special , cameras are broken for me too, also under Mojave. No IP changes either. Occasionally they update, or the still refreshes after 30 seconds but no streaming picture.

Who is online

Users browsing this forum: No registered users and 0 guests