Raspberry PI not serving Fire TV



  • I have tried to do as much research as possible before posting.

    My setup is a Raspberry PI 2 (I know you tested on 3) running Raspbian Stretch Lite.

    I first ran monocole-gateway on my windows10 machine and everything ran fine. I just didn’t want to leave it running there. So I got one of my PIs out of the closet to run things.

    I started and verified monocole-gateway is running.

    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: MONOCLE RTSP SERVICE - INITIALIZED
    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: -------------------------------------------------
    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: FQDN = 52222c70-a86b-4251-9e99-3ba50765e1f8.mproxy.io
    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: HOST = 192.168.0.156
    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: PORT = 443
    Apr 25 23:09:00 monoclegateway monocle-gateway[429]: -------------------------------------------------
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]: -------------------------------------------------
    
    

    I can ping the FQDN from another machine on the network and it responds just fine.

    I tell my FireTV to show me a camera and you see this in monocole-gateway --tail which is expected.

    Apr 26 08:11:23 monoclegateway monocle-gateway[429]: INITIALIZE RTSP STREAM:  Front Door Camera
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]: -------------------------------------------------
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - NAME  : Front Door Camera
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - LABEL : PRIMARY
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - URL   : rtsp://192.168.0.XXX:XXX/videoMain
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - UUID  : STREAM:4b42XXXXXXXXXbef0-882a3df081cc
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - SESS  : 4df2e114-452XXXXXXXXX216f7343
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - MODIF : Wed Apr 24 2019 19:46:58 GMT-0400 (EDT)
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]:  - TAGS  : @tunnel
    Apr 26 08:11:23 monoclegateway monocle-gateway[429]: -------------------------------------------------
    

    This is exactly the same thing that happened when the service was running on windows, HOWEVER, the camera doesn’t show on my Fire TV Cube anymore. No errors. No nothing. Fire TV Cube just says the camera isn’t responding.

    IP tables show no firewall on the PI

    Chain INPUT (policy ACCEPT 152 packets, 14483 bytes)
     pkts bytes target     prot opt in     out     source               destination
    
    Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
     pkts bytes target     prot opt in     out     source               destination
    
    Chain OUTPUT (policy ACCEPT 100 packets, 11262 bytes)
     pkts bytes target     prot opt in     out     source               destination
    
    

    The gateway is running

     ps -ef | grep mono
    avahi      311     1  0 Apr25 ?        00:00:00 avahi-daemon: running [monoclegateway.local]
    monocle    429     1  0 Apr25 ?        00:00:05 /usr/local/bin/monocle-gateway
    monocle    453   429  0 Apr25 ?        00:02:16 /usr/local/bin/monocle-proxy -p 8554
    pi       14882 14649  0 10:25 pts/0    00:00:00 grep --color=auto mono
    
    

    The only “issue” i see only on the very first start of the service, and not subsequent reboots, is the below. It makes sense b/c I was running on windows before this. The service was shut down on windows and they never ran in parallel at the same time. There are no phantom services on windows.

    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: WARNING
    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: GATEWAY INSTANCE PROMOTED!
    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: ************************************************************************************
    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: Another gateway instance has detached from your user account!
    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: This could cause problems, please make sure that only one instance of Monocle Gateway is running on your network and associated with your account.
    Apr 25 23:08:21 monoclegateway monocle-gateway[429]: >>>> THIS GATEWAY INSTANCE [192.168.0.156] IS NOW THE ACTIVE GATEWAY FOR THIS ACCOUNT.
    
    

    Can you give me anything to go on why the Raspberry PI isn’t serving up the cameras yet my windows 10 PC will? They are both on the same 192.168.0.X network and both plugged into the same router.

    Could it be as simple as Raspbian lite is missing something to serve up the stream?



  • @bms231 said in Raspberry PI not serving Fire TV:

    Could it be as simple as Raspbian lite is missing something to

    @bms231,

    I apologize for the delayed response. We would expect more log data to show up after the INITIALIZE RTSP STREAM: Front Door Camera section. Some log data to indicate that the actual Alexa device is attmepting to establish a RTSP stream to the Monocle Gateway and then the gateway to the IP camera.

    Are you using the same monocle.token for both the Windows system and the Raspberry Pi? If so, that could be the issue. Try generating a new ‘monocle.token’ for the Raspberry Pi. What may be happening is that the FQDN/DNS record (based on the unique token) for the Windows machine is cached locally either on the Alexa devices or anywhere upstream. When trying to run the Monocle Service on the Raspberry Pi, the Alexa devices may still be trying to connect to the cached IP address of the Windows machine.

    I hope this helps. Thanks, Robert



  • Thanks. When I get home I will try using a new monocle.token. It started working w/o me changing anything, but the odd behavior is if I show camera 1 then show camera 2 then try to show camera 1 again it then times out trying to show camera 1. I will see if the token issue fixes it.



  • @bms231

    A new token probably won’t help the timeout issue you are seeing. So if it started working, I would not replace the token at this point … unless you are firing the Monocle Gateway service up on the Windows box again. Basically, if you run the gateway on multiple systems, ideally you should generate separate and unique tokens. If you have moved off the Windows box and now exclusively run on the Pi, then the existing working token is fine to keep using. Moving a token from one system to another is fine, but it may take some time for the DNS records to synchronize – so that may be why you were having trouble at first, but after a while it started working on the Pi.

    As for the timeout issue, what camera make/model are you using? I know some users with Reolink cameras have reported a similar issue. For them, changing from the “@tunnel” to the “@proxy” tag seemed to help.

    Thanks, Robert



  • Ah. Gotya. Well I did generate a new token and am only running just the RP2 right now. I changed all my @tunnel to @proxy and will test again tonight when I get home. My cameras are Foscam FI9900PR and R2C.



  • I swapped everything to @proxy and gave it a try. I still have the same issue. I also noticed when I switch from one camera, to another, then back to the original it just times out. When it works, it works well, but when I want to switch back to a camera I was already on it never does. It just times out. That is if I can even get the initial pull to work.

    
    May 13 22:13:16 monoclegateway monocle-gateway[416]:   "date": "Tue, May 14 2019 02:13:16 GMT",
    May 13 22:13:16 monoclegateway monocle-gateway[416]:   "range": "npt=0.000-",
    May 13 22:13:16 monoclegateway monocle-gateway[416]:   "session": "55DAD4FA",
    May 13 22:13:16 monoclegateway monocle-gateway[416]:   "rtp-info": "url=rtsp://127.0.0.1:8554/STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc/track1;seq=40664;rtptime=1655820013,url=rtsp://127.0.0.1:8554/STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc/track2;seq=40169;rtptime=2776123615"
    May 13 22:13:16 monoclegateway monocle-gateway[416]: }
    May 13 22:13:16 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:16.169Z [INFO]  [192.168.0.115:41659 <H1ESVov2N>] RTSP ENDPOINT PLAYING MEDIA STREAM: Front Door Camera (STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc)
    May 13 22:13:16 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:16.177Z [INFO]  [192.168.0.115:41659 <H1ESVov2N>] RTSP CLIENT PLAYING MEDIA STREAM: Front Door Camera (STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc)
    
    May 13 22:13:21 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:21.593Z [INFO]  [192.168.0.115:41659 <H1ESVov2N>] RTSP CLIENT SOCKET CLOSED
    
    May 13 22:13:21 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:21.594Z [INFO]  [192.168.0.115:41659 <H1ESVov2N>] RTSP CLIENT DETACHED FROM STREAM: Front Door Camera (STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc)
    May 13 22:13:21 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:21.595Z [INFO]  [192.168.0.115:41659 <H1ESVov2N>] RTSP ENDPOINT SOCKET CLOSED [192.168.0.115:41659 <H1ESVov2N>]
    
    May 13 22:13:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:22.140Z [INFO]  [RTSP PROXY] STREAM [Front Door Camera/PRIMARY] WILL BE DE-REGISTERED IN 3 MINUTES
    
    May 13 22:13:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:22.140Z [INFO]  [RTSP PROXY] STREAM [Front Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 4 MINUTES
    May 13 22:13:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:13:22.141Z [INFO]  [RTSP PROXY] STREAM [Side Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 4 MINUTES
    
    May 13 22:14:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:14:22.146Z [INFO]  [RTSP PROXY] STREAM [Front Door Camera/PRIMARY] WILL BE DE-REGISTERED IN 2 MINUTES
    
    May 13 22:14:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:14:22.147Z [INFO]  [RTSP PROXY] STREAM [Front Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 3 MINUTES
    May 13 22:14:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:14:22.148Z [INFO]  [RTSP PROXY] STREAM [Side Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 3 MINUTES
    
    May 13 22:15:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:15:22.164Z [INFO]  [RTSP PROXY] STREAM [Front Door Camera/PRIMARY] WILL BE DE-REGISTERED IN 1 MINUTES
    
    May 13 22:15:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:15:22.164Z [INFO]  [RTSP PROXY] STREAM [Front Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 2 MINUTES
    May 13 22:15:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:15:22.165Z [INFO]  [RTSP PROXY] STREAM [Side Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 2 MINUTES
    
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.168Z [INFO]  [RTSP PROXY] DE-REGISTERING STREAM [Front Door Camera/PRIMARY]; NO LONGER IN USE
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.170Z [INFO]  [RTSP PROXY] STREAM [Front Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 1 MINUTES
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.171Z [INFO]  [RTSP PROXY] STREAM [Side Garage Camera/PRIMARY] WILL BE DE-REGISTERED IN 1 MINUTES
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.182Z [DEBUG] <RTSP-PROXY> [REQUEST]  --> [DEREGISTER] rtsp://192.168.0.184:1840/videoMain
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.183Z [TRACE] <RTSP-PROXY> [REQUEST]  --> [HEADERS] {
    May 13 22:16:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:16:22 monoclegateway monocle-gateway[416]:   "transport": "reuse_connection=0;preferred_delivery_protocol=udp;proxy_url_suffix=STREAM:4b42c4ad-5f52-424c-bef0-882a3df081cc"
    May 13 22:16:22 monoclegateway monocle-gateway[416]: }
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.185Z [DEBUG] <RTSP-PROXY> [RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined)
    May 13 22:16:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:16:22.186Z [TRACE] <RTSP-PROXY> [RESPONSE] <-- [HEADERS] {
    May 13 22:16:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:16:22 monoclegateway monocle-gateway[416]:   "date": "Tue, May 14 2019 02:16:22 GMT"
    May 13 22:16:22 monoclegateway monocle-gateway[416]: }
    
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.172Z [INFO]  [RTSP PROXY] DE-REGISTERING STREAM [Front Garage Camera/PRIMARY]; NO LONGER IN USE
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.174Z [INFO]  [RTSP PROXY] DE-REGISTERING STREAM [Side Garage Camera/PRIMARY]; NO LONGER IN USE
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.185Z [DEBUG] <RTSP-PROXY> [REQUEST]  --> [DEREGISTER] rtsp://192.168.0.180:1800/videoMain
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.186Z [TRACE] <RTSP-PROXY> [REQUEST]  --> [HEADERS] {
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "transport": "reuse_connection=0;preferred_delivery_protocol=udp;proxy_url_suffix=STREAM:25ad8905-a4e4-4b9c-86b2-d285891a8d13"
    May 13 22:17:22 monoclegateway monocle-gateway[416]: }
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.193Z [DEBUG] <RTSP-PROXY> [REQUEST]  --> [DEREGISTER] rtsp://192.168.0.187:1870/videoMain
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.194Z [TRACE] <RTSP-PROXY> [REQUEST]  --> [HEADERS] {
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "transport": "reuse_connection=0;preferred_delivery_protocol=udp;proxy_url_suffix=STREAM:e47590ed-58d7-4882-b3ca-f20bd4375920"
    May 13 22:17:22 monoclegateway monocle-gateway[416]: }
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.197Z [DEBUG] <RTSP-PROXY> [RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined)
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.198Z [TRACE] <RTSP-PROXY> [RESPONSE] <-- [HEADERS] {
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "date": "Tue, May 14 2019 02:17:22 GMT"
    May 13 22:17:22 monoclegateway monocle-gateway[416]: }
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.201Z [DEBUG] <RTSP-PROXY> [RESPONSE] <-- [200 (OK)] <cseq=1> (session=undefined)
    May 13 22:17:22 monoclegateway monocle-gateway[416]: 2019-05-14T02:17:22.201Z [TRACE] <RTSP-PROXY> [RESPONSE] <-- [HEADERS] {
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "cseq": "1",
    May 13 22:17:22 monoclegateway monocle-gateway[416]:   "date": "Tue, May 14 2019 02:17:22 GMT"
    May 13 22:17:22 monoclegateway monocle-gateway[416]: }
    
    


  • @bms231

    The next thing to try would be to use the following (2) tags “@proxy, @hangup”. This will slightly modify the behavior of the proxy connection logic to terminate the TCP/IP connection immediately after a stream is stopped rather than keeping it around for re-use. (similar to using @tunnel, but using the proxy RTSP implementation instead)

    This is somewhat of a shot in the dark, but worth a try.

    (Note, you can also try using @proxy-tcp instead of @proxy as well for another test.)

    Thanks, Robert



  • Hey there so I have still been struggling with this. I got delayed b/c of a project at my house. I have tried @hangup @proxy @proxy-tcp in all matter of combinations.

    This is what I found, @hangup @noaudio @tunnel is the optimal configuration. However, after a few switches between cameras, none work. If I go onto the monocle dashboard and change a config, suddenly the cameras start working again for a period of time. That is really odd behavior.


Log in to reply