MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirrorΒ² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    68 Posts 5 Posters 16.7k Views 4 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rkorell @sdetweil
      last edited by rkorell

      @sdetweil
      As your posting above implies your debug message confirms a received message - but the message cannot be received, because the curl command doesn’t work …

      As per your advise I’ve git pulled, restarted mirror - but get same error message as before.
      The curl command is bad or the URL doesn’t work.
      I don’t know why and have no idea how to figure this out…

      Screen input- and output as follws:

      pi@MagicMirrorPi5:~ $ curl --header "Content-Type: application/json"   --request POST   --data '{"notification":"SHOW_ALERT","payload":{"message":"fribble"}}' http://localhost:8080/doorbell
      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="utf-8">
      <title>Error</title>
      </head>
      <body>
      <pre>InternalServerError: stream is not readable<br> &nbsp; &nbsp;at readStream (/home/pi/MagicMirror/node_modules/raw-body/index.js:185:17)<br> &nbsp; &nbsp;at getRawBody (/home/pi/MagicMirror/node_modules/raw-body/index.js:116:12)<br> &nbsp; &nbsp;at read (/home/pi/MagicMirror/node_modules/body-parser/lib/read.js:79:3)<br> &nbsp; &nbsp;at jsonParser (/home/pi/MagicMirror/node_modules/body-parser/lib/types/json.js:138:5)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at trim_prefix (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:328:13)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:286:9<br> &nbsp; &nbsp;at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:91:12)<br> &nbsp; &nbsp;at trim_prefix (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:328:13)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:286:9<br> &nbsp; &nbsp;at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/body-parser/lib/read.js:132:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:206:9)<br> &nbsp; &nbsp;at invokeCallback (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:238:16)<br> &nbsp; &nbsp;at done (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:227:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:287:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:518:28)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1698:12)<br> &nbsp; &nbsp;at process.processTicksAndRejections (node:internal/process/task_queues:82:21)</pre>
      </body>
      </html>
      pi@MagicMirrorPi5:~ $ cd MagicMirror/modules
      pi@MagicMirrorPi5:~/MagicMirror/modules $ cd MMM-CurlToNotification/
      pi@MagicMirrorPi5:~/MagicMirror/modules/MMM-CurlToNotification $ git pull
      Updating 71ea1c1..bd1e417
      Fast-forward
       MMM-CurlToNotification.js | 14 ++++++++++----
       README.md                 |  1 +
       node_helper.js            | 13 +++++++++++--
       3 files changed, 22 insertions(+), 6 deletions(-)
      pi@MagicMirrorPi5:~/MagicMirror/modules/MMM-CurlToNotification $ pm2 restart MagicMirror
      Use --update-env to update environment variables
      [PM2] Applying action restartProcessId on app [MagicMirror](ids: [ 0 ])
      [PM2] [MagicMirror](0) βœ“
      β”Œβ”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚ id β”‚ name           β”‚ namespace   β”‚ version β”‚ mode    β”‚ pid      β”‚ uptime β”‚ β†Ί    β”‚ status    β”‚ cpu      β”‚ mem      β”‚ user     β”‚ watching β”‚
      β”œβ”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
      β”‚ 0  β”‚ MagicMirror    β”‚ default     β”‚ 2.31.0… β”‚ fork    β”‚ 87731    β”‚ 0s     β”‚ 1    β”‚ online    β”‚ 0%       β”‚ 2.6mb    β”‚ pi       β”‚ enabled  β”‚
      β””β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
      pi@MagicMirrorPi5:~/MagicMirror/modules/MMM-CurlToNotification $ curl --header "Content-Type: application/json"   --request POST   --data '{"notification":"SHOW_ALERT","payload":{"message":"fribble"}}' http://localhost:8080/doorbell
      <!DOCTYPE html>
      <html lang="en">
      <head>
      <meta charset="utf-8">
      <title>Error</title>
      </head>
      <body>
      <pre>InternalServerError: stream is not readable<br> &nbsp; &nbsp;at readStream (/home/pi/MagicMirror/node_modules/raw-body/index.js:185:17)<br> &nbsp; &nbsp;at getRawBody (/home/pi/MagicMirror/node_modules/raw-body/index.js:116:12)<br> &nbsp; &nbsp;at read (/home/pi/MagicMirror/node_modules/body-parser/lib/read.js:79:3)<br> &nbsp; &nbsp;at jsonParser (/home/pi/MagicMirror/node_modules/body-parser/lib/types/json.js:138:5)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)<br> &nbsp; &nbsp;at trim_prefix (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:328:13)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:286:9<br> &nbsp; &nbsp;at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:91:12)<br> &nbsp; &nbsp;at trim_prefix (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:328:13)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:286:9<br> &nbsp; &nbsp;at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:346:12)<br> &nbsp; &nbsp;at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:280:10)<br> &nbsp; &nbsp;at /home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/body-parser/lib/read.js:132:5<br> &nbsp; &nbsp;at AsyncResource.runInAsyncScope (node:async_hooks:206:9)<br> &nbsp; &nbsp;at invokeCallback (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:238:16)<br> &nbsp; &nbsp;at done (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:227:7)<br> &nbsp; &nbsp;at IncomingMessage.onEnd (/home/pi/MagicMirror/modules/MMM-Remote-Control/node_modules/raw-body/index.js:287:7)<br> &nbsp; &nbsp;at IncomingMessage.emit (node:events:518:28)<br> &nbsp; &nbsp;at endReadableNT (node:internal/streams/readable:1698:12)<br> &nbsp; &nbsp;at process.processTicksAndRejections (node:internal/process/task_queues:82:21)</pre>
      </body>
      </html>
      pi@MagicMirrorPi5:~/MagicMirror/modules/MMM-CurlToNotification $ 
      
      

      Any additional idea?

      regards,
      Ralf

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @rkorell
        last edited by

        @rkorell do curl -v

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rkorell @sdetweil
          last edited by

          @sdetweil

          curl --v --header "Content-Type: application/json"   --request POST   --data '{"notification":"SHOW_ALERT","payload":{"message":"fribble"}}' http://localhost:8080/doorbell
          curl: option --v: is ambiguous
          curl: try 'curl --help' or 'curl --manual' for more information
          
          
          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @rkorell
            last edited by

            @rkorell not double dash

            just trying to figure out what the problem is
            maybe curl version

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            R 3 Replies Last reply Reply Quote 0
            • R Offline
              rkorell @sdetweil
              last edited by rkorell

              @sdetweil OK
              this is curl --version :-) (just successfully trial&errored)

              curl --version
              curl 7.88.1 (aarch64-unknown-linux-gnu) libcurl/7.88.1 OpenSSL/3.0.15 zlib/1.2.13 brotli/1.0.9 zstd/1.5.4 libidn2/2.3.3 libpsl/0.21.2 (+libidn2/2.3.3) libssh2/1.10.0 nghttp2/1.52.0 librtmp/2.3 OpenLDAP/2.5.13
              Release-Date: 2023-02-20, security patched: 7.88.1-10+deb12u12
              Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp
              Features: alt-svc AsynchDNS brotli GSS-API HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB PSL SPNEGO SSL threadsafe TLS-SRP UnixSockets zstd
              
              1 Reply Last reply Reply Quote 0
              • R Offline
                rkorell @sdetweil
                last edited by rkorell

                @sdetweil because it doesn’t work on windows either this is most likely not a version but a command or URL thing …

                S 1 Reply Last reply Reply Quote 0
                • R Offline
                  rkorell @sdetweil
                  last edited by

                  @sdetweil said in Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream:

                  just trying to figure out what the problem

                  Dear Sam,
                  I caught it …
                  The Windows command is not working for other reasons - doesn’t matter…
                  The curl on MY Pi doesn’t work because - for some strange reason the resolving of β€œlocalhost” doesn’t work ???

                  Figured this out by using another linux client (Macbook) and therefor using IP address of pi remotely - which worked instantly.

                  And trying this locally on Pi with IP adreees does the job as well.

                  Thanks again for your help!
                  Regards,
                  Ralf

                  S 1 Reply Last reply Reply Quote 0
                  • S Offline
                    sdetweil @rkorell
                    last edited by sdetweil

                    @rkorell weird, it works on windows for me

                    i just copy/pasted from the repo and
                    changed the address and port at the end

                    i can do it on the same machine or across the network to other machines

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    1 Reply Last reply Reply Quote 0
                    • S Offline
                      sdetweil @rkorell
                      last edited by

                      @rkorell localhost is(always) mapped to 127.0.0.1 on the same system

                      which is called the loopback adapter, cause the packets never leave the system

                      ping localhost

                      should work

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        rkorell @sdetweil
                        last edited by

                        @sdetweil said in Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream:

                        @rkorell localhost is(always) mapped to 127.0.0.1 on the same system
                        which is called the loopback adapter, cause the packets never leave the system

                        Yes. I’m aware of this, thanks.

                        ping localhost
                        should work

                        Yes, do work:

                        pi@MagicMirrorPi5:~/MagicMirror/modules/MMM-CurlToNotification $ ping localhost
                        PING localhost(localhost (::1)) 56 data bytes
                        64 bytes from localhost (::1): icmp_seq=1 ttl=64 time=0.027 ms
                        64 bytes from localhost (::1): icmp_seq=2 ttl=64 time=0.035 ms
                        64 bytes from localhost (::1): icmp_seq=3 ttl=64 time=0.035 ms
                        64 bytes from localhost (::1): icmp_seq=4 ttl=64 time=0.036 ms
                        64 bytes from localhost (::1): icmp_seq=5 ttl=64 time=0.031 ms
                        64 bytes from localhost (::1): icmp_seq=6 ttl=64 time=0.039 ms
                        ^Z
                        [1]+  Stopped                 ping localhost
                        
                        

                        thanks anyway,
                        Regards,
                        Ralf

                        S 1 Reply Last reply Reply Quote 0
                        • S Offline
                          sdetweil @rkorell
                          last edited by sdetweil

                          @rkorell so, its a curl problem… weird…
                          but its using ipv6 (::1 is the ipv6 version of 127.0.0.1)

                          Sam

                          How to add modules

                          learning how to use browser developers window for css changes

                          R 1 Reply Last reply Reply Quote 0
                          • R Offline
                            rkorell @sdetweil
                            last edited by

                            @sdetweil said in Need help with MMM-MQTTbridge not "communicating" with MMM-RTSPStream:

                            but its using ipv6 (::1 is the ipv6 version of 127.0.0.1)

                            good catch!
                            THis may is the reason, because - as far as I. know - ipV6 isn’t implemented (properly?) in my network (at least I do not have anything configured. My AVM (Fritzbox) router is ipV6 aware but I do not β€œuse” it esplicitely …

                            Strange!

                            Ralf

                            S 1 Reply Last reply Reply Quote 0
                            • S Offline
                              sdetweil @rkorell
                              last edited by

                              @rkorell can you edit your /etc/hosts
                              to see how localhost is defined

                              on my amd host it is

                              127.0.0.1       localhost
                              

                              on my pi it is

                              127.0.0.1       localhost
                              ::1             localhost ip6-localhost ip6-loopback
                              

                              Sam

                              How to add modules

                              learning how to use browser developers window for css changes

                              R 1 Reply Last reply Reply Quote 0
                              • R Offline
                                rkorell @sdetweil
                                last edited by rkorell

                                @sdetweil Oh, yes - I remember …
                                interesting enough my /etc/hosts is likely the same as on your Pi - with ipV6 entries.
                                If I delete them, error remains :-(

                                Ralf

                                S 1 Reply Last reply Reply Quote 0
                                • S Offline
                                  sdetweil @rkorell
                                  last edited by

                                  @rkorell weird

                                  Sam

                                  How to add modules

                                  learning how to use browser developers window for css changes

                                  R 2 Replies Last reply Reply Quote 0
                                  • R Offline
                                    rkorell @sdetweil
                                    last edited by

                                    @sdetweil :-) indeed

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      rkorell @sdetweil
                                      last edited by

                                      @sdetweil and now 3hours later more weird it doesn’t work with IP address as well.

                                      In addition for some strange reason the enablement of the MMM-Mplayer module leads to unrecoverable disconnects of PI from network.

                                      This currently is too much resistance to me, so sorry dear @Cr4z33 - I’m not able to dig in deeper to assist you…

                                      Regards,
                                      Ralf

                                      Cr4z33C 1 Reply Last reply Reply Quote 0
                                      • Cr4z33C Offline
                                        Cr4z33 @rkorell
                                        last edited by

                                        Once again thank you @rkorell and @sdetweil for willing to help me!

                                        Unfortunately real life last minute serious event had to stop me to dedicate to this matter for a long while.

                                        R 1 Reply Last reply Reply Quote 0
                                        • R Offline
                                          rkorell @Cr4z33
                                          last edited by

                                          @Cr4z33 OH…
                                          All the best!

                                          Ralf

                                          1 Reply Last reply Reply Quote 0

                                          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                          With your input, this post could be even better πŸ’—

                                          Register Login
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 3 / 4
                                          • First post
                                            Last post
                                          Enjoying MagicMirror? Please consider a donation!
                                          MagicMirror created by Michael Teeuw.
                                          Forum managed by Sam, technical setup by Karsten.
                                          This forum is using NodeBB as its core | Contributors
                                          Contact | Privacy Policy