• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

Issue with sendSocketNotification and socketNotificationReceived

Scheduled Pinned Locked Moved Solved Development
13 Posts 4 Posters 9.1k Views 3 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.
  • P Offline
    paviro Admin
    last edited by paviro May 28, 2016, 1:01 AM May 28, 2016, 12:57 AM

    Only had a quick look at your code but it seems like you are not sending anything from the UI JavaScript to the node_helper. In order for the node_helper to be able to communicate with the module’s JavaScript you have to open the socket connection by sending some kind of initial message to the helper first. So you can probably fix it by adding this.sendSocketNotification("hello") to the start function of your lovenotes.js.

    We're all stories in the end. Just make it a good one, eh?

    – The Doctor

    B S 2 Replies Last reply May 28, 2016, 11:15 AM Reply Quote 1
    • K Offline
      KirAsh4 Moderator
      last edited by May 28, 2016, 12:58 AM

      … ice cream. He wants you to add ice cream!

      A Life? Cool! Where can I download one of those from?

      1 Reply Last reply Reply Quote 0
      • P Offline
        paviro Admin
        last edited by May 28, 2016, 12:59 AM

        I was just on my way coping the part be a little more patient @KirAsh4 😅

        We're all stories in the end. Just make it a good one, eh?

        – The Doctor

        1 Reply Last reply Reply Quote 0
        • K Offline
          KirAsh4 Moderator
          last edited by May 28, 2016, 1:00 AM

          You hit Submit! Hahahahahaha …

          A Life? Cool! Where can I download one of those from?

          1 Reply Last reply Reply Quote 0
          • P Offline
            paviro Admin
            last edited by May 28, 2016, 1:02 AM

            Yaaaah… On my phone right now it’s a bit hard here to do stuff like that :laughing:

            We're all stories in the end. Just make it a good one, eh?

            – The Doctor

            1 Reply Last reply Reply Quote 0
            • K Offline
              KirAsh4 Moderator
              last edited by May 28, 2016, 1:05 AM

              Sorry, it was funny. I’ll go back to my dark cave now. :)

              A Life? Cool! Where can I download one of those from?

              1 Reply Last reply Reply Quote 1
              • B Offline
                BROSS @paviro
                last edited by May 28, 2016, 11:15 AM

                @paviro I’ll try that now! Thanks!

                1 Reply Last reply Reply Quote 0
                • B Offline
                  BROSS
                  last edited by May 28, 2016, 12:34 PM

                  A quick test didn’t resolve the issue. But, I’m digging in further.

                  1 Reply Last reply Reply Quote 0
                  • B Offline
                    BROSS
                    last edited by BROSS May 28, 2016, 1:09 PM May 28, 2016, 1:05 PM

                    @paviro Thanks so much for pointing me in the right direction. I have the bare bones module working. I still have some things to do, namely:

                    • Show more than one message, with prior messages truncated and reduced in size
                    • Time stamp messages
                    • Possibly add from, to allow for multiple senders
                      -and-
                    • Provide code for a companion app that will allow sending messages to the mirror.

                    Once I clean the core up I’m going to post it to a public git repository.

                    Thanks again for your help. (Curiously, how do I mark the original post as solved?)

                    -B

                    P 1 Reply Last reply May 28, 2016, 2:26 PM Reply Quote 0
                    • P Offline
                      paviro Admin @BROSS
                      last edited by paviro May 28, 2016, 2:26 PM May 28, 2016, 2:26 PM

                      @BROSS glad to hear! Don’t forget to present your finished module on the forum! :)
                      Seems like you figured the mark as solved part out yourself :smiley:

                      We're all stories in the end. Just make it a good one, eh?

                      – The Doctor

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 1 / 2
                      1 / 2
                      • First post
                        6/13
                        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