Issue with sendSocketNotification and socketNotificationReceived
I’m working on a module that will allow one to send messages to a mirror via pubnub. Since my working prototype is for my wife, I’m calling the module lovenotes. Once it is polished, I intend to use it as a replacement for the random compliment module.
I’m a hobbyist and far, far, far from being a capable programmer. However, I’ve had some success.
- I’m able to populate the DOM with a default message. Basically a Hello World exercise.
- More significantly, I’m able to receive messages from PubNub and print them to the console. I have this process running in a node_helper.js.
But, I’m struggling with using sendSocketNotification and socketNotificationReceived (in the main module) to receive the message and update the DOM. While it appears the Notification and packet is being sent (more logging), it is never received (more logging).
I appreciate any tips. I’ve stared at the default modules and can’t seem to find anything different with my implementation of the methods.
The files follow:
node_helper. In order for the
startfunction of your
… ice cream. He wants you to add ice cream!
I was just on my way coping the part be a little more patient @KirAsh4 😅
You hit Submit! Hahahahahaha …
Yaaaah… On my phone right now it’s a bit hard here to do stuff like that :laughing:
Sorry, it was funny. I’ll go back to my dark cave now. :)
@paviro I’ll try that now! Thanks!
A quick test didn’t resolve the issue. But, I’m digging in further.
@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
- 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?)