goruck / alexa-ip-cam

Use Alexa's Smart Home Skill API with standalone IP cameras without needing cloud service.
MIT License
161 stars 26 forks source link

Problem with stunnel #1

Closed kaputtzich closed 6 years ago

kaputtzich commented 6 years ago

Hi there,

good guide so far but i'm stuck with stunnel Log tells me service started and connection is accepted but is then reseted because of error:140760FC:SSL routines:SSL23_GET_CLIENT_HELLO:unknown protocol - tested with VLC

If connection is made directly to live555proxy stream works

jamesw4 commented 6 years ago

VLC fails for me also if going via stunnel port but it works fine from my echo show!

goruck commented 6 years ago

I haven't tested the end to end system with VLC so I'd have time check it in my system. In the meantime can you enable stunnel logging and try it again? That may help track down the issue. Thanks.

On Jan 24, 2018 2:20 PM, "jamesw4" notifications@github.com wrote:

VLC fails for me also if going via stunnel port but it works fine from my echo show!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/goruck/alexa-ip-cam/issues/1#issuecomment-360293310, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkFIAt8guCI38Ie-9lRyOYfowlSiFkmks5tN6yigaJpZM4Rq9PN .

kaputtzich commented 6 years ago

My Echo Spot arrived today an i could test a little bit further stunnel is working so far but live555 acts a little bit strange, i can see that it starts the stream but there's nothing on the spot, after a while the spot times out and live555 closes the stream Same behaviour with or without stunnel If i connect with VLC directly to the live555 stream without stunnel the video starts immediatly

goruck commented 6 years ago

Hi, if you can turn on stunnel logging, send that and a live555 output with verbose mode on that would help to determine whats behind the timeouts. I've not seen timeouts in my setup which uses echo show and spot.

On Jan 27, 2018 2:31 AM, "kaputtzich" notifications@github.com wrote:

My Echo Spot arrived today an i could test a little bit further stunnel is working so far but live555 acts a little bit strange, i can see that it starts the stream but there's nothing on the spot, after a while the spot times out and live555 closes the stream Same behaviour with or without stunnel If i connect with VLC directly to the live555 stream without stunnel the video starts immediatly

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/goruck/alexa-ip-cam/issues/1#issuecomment-360975730, or mute the thread https://github.com/notifications/unsubscribe-auth/ALkFIKlCbQtx6fJCBV5QoSBY2pFuK-O7ks5tOvsagaJpZM4Rq9PN .

kaputtzich commented 6 years ago

Uploaded on pastebin, i'm sorry for the live555 log, it may be a little bit confusing live555.log stunnel.log

First attempts where with VLC (the unkown protocol part i already mentioned) The cam I asked Alexa for has IP 192.168.0.10, I use local URI in Lambda

Something i noticed where the "RTSP/1.0 401 Unauthorized" messages, even though it's working with VLC

kaputtzich commented 6 years ago

Disabled every authentication, unauthorized messages are now gone but still can't get an image on the Echo Spot

goruck commented 6 years ago

Hi,

sorry for the long reply. Are you still seeing this issue on Spot? If so can you send a Cloudwatch log of the problem.

I'm not seeing this problem on my end, all cameras look fine on both Echo Show and Spot.

Thanks.

Lindo

savageautomate commented 6 years ago

@kaputtzich

When you say ...

The cam I asked Alexa for has IP 192.168.0.10, I use local URI in Lambda

Do you mean that you are using the raw IP address in the cameras.json file?

If so .. you can't do that. You have to use a fully qualified DNS hostname and the endpoint must be secured with a valid SSL certificate. The DNS 'A' record can point to a local (private) IP address, but you can't use the raw IP address when sending the camera stream to Alexa.

Thanks, Robert

kaputtzich commented 6 years ago

Yeah well i think that was a little bit misleading Tried in different ways - also with FQDN of course But as the old cam broke down i bought a new, smart one - so the rtsp proxy server is retired Thanks for your support!

justinmiller61 commented 6 years ago

I am having this issue as well and my logs look nearly identical (have to verify later). When I say to my Fire HD 8, 'Show me ', I can see the stunnel connection in the logs, and see it connecting to localhost:554, but then it disconnects almost immediately. I am using a FQDN in my cameras.json.

I can connect to the Live555 proxy just fine via VLC. It doesn't appear that there is a client capable of handling SSL encrypted rtsp streams, other than the Echo, so I haven't been able to test the stunnel -> live555 proxy path outside of the Fire.

Thoughts?

justinmiller61 commented 6 years ago

So the above issue was resolved because my SSL cert was missing a SAN for cam..com. I had only requested it for .com. Still can't get things to show up on my Fire, though I can see data is being sent and received, but I'll create a separate issue for that.

goruck commented 6 years ago

@justinmiller61 glad you made some progress. Let me know if I can help. FYI, I did verify this works on my Fire HD 10 device in both tablet and show mode.