• 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.

MMM-IFTTT - If-This-Then-That Maker Notifications

Scheduled Pinned Locked Moved Productivity
11 Posts 3 Posters 15.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
    paulocarrasco @jc21
    last edited by paviro Oct 9, 2016, 1:33 PM Oct 4, 2016, 3:37 PM

    @jc21 Hi, I a fan of IFTTT and I trying to include your module on my project.

    The process isn’t working very well :-), and I decided to seek some help here.

    The problem, after installing the module like you prescribed, is that I can’t connect to the Pi (with MM) on port 8080.

    I tried, for testing purposes, the following commands on the terminal of the Pi itself:

    curl -X POST -H "Content-Type: application/json" -d '{"message": "Your pizza is ready!"}' "http://192.168.1.103:8080/IFTTT"

    or

    curl -X POST -H "Content-Type: application/json" -d '{"message": "Your pizza is ready!"}' "http://127.0.0.1:8080/IFTTT"

    with the same result:

    curl: (7) Failed to connect to 192.168.1.103 port 8080: Connection refused
    

    Trying from another ip (local or external) gives the same error.

    Am I forgetting something?


    Note from admin: Please use Markdown on code snippets for easier reading!

    1 Reply Last reply Reply Quote 0
    • J Offline
      jc21
      last edited by Oct 4, 2016, 11:57 PM

      When you are running MagicMirror do you see these lines in the console output?

      All module helpers loaded.
      Starting server op port 8080 ...
      Server started ...
      
      P 1 Reply Last reply Oct 5, 2016, 8:25 AM Reply Quote 0
      • P Offline
        paulocarrasco @jc21
        last edited by Oct 5, 2016, 8:25 AM

        @jc21 I made an update to the Git modules, and now I getting those lines on my console. Everything is working 100%, thanks :-).

        1 Reply Last reply Reply Quote 0
        • J Offline
          jc21
          last edited by Oct 6, 2016, 1:55 AM

          Update: Added support for my new MMM-Sounds module. Notification integration instructions are in the updated MMM-IFTTT readme.

          1 Reply Last reply Reply Quote 1
          • C Offline
            cowboysdude Module Developer
            last edited by Oct 6, 2016, 10:42 PM

            Great idea but am clueless on how IFTTT works… your example looks like a facebook notification which is pretty cool… but as far as getting that to work… LOL

            1 Reply Last reply Reply Quote 0
            • P Offline
              paulocarrasco
              last edited by paviro Oct 9, 2016, 1:33 PM Oct 9, 2016, 12:18 AM

              Hi, since last update of MMM-IFTTT I am getting this error, when I make a notification to the MM:

              TypeError: Cannot read property &#39;debug&#39; of undefined<br> &nbsp; &nbsp;at Class.log (/home/pi/MagicMirror/modules/MMM-IFTTT/node_helper.js:116:54)<br> &nbsp; &nbsp;at expressApp.post (/home/pi/MagicMirror/modules/MMM-IFTTT/node_helper.js:57:18)<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 next (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:131:13)<br> &nbsp; &nbsp;at Route.dispatch (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:112:3)<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 /home/pi/MagicMirror/node_modules/express/lib/router/index.js:277:22<br> &nbsp; &nbsp;at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:330:12)<br> &nbsp; &nbsp;at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:271:10)<br> &nbsp; &nbsp;at urlencodedParser (/home/pi/MagicMirror/modules/MMM-IFTTT/node_modules/body-parser/lib/types/urlencoded.js:82:7)
              

              I already installed everything from the beginning twice, and updated all but without luck. Any ideias?


              Note from admin: Please use Markdown on code snippets for easier reading!

              J 1 Reply Last reply Oct 9, 2016, 1:20 AM Reply Quote 0
              • J Offline
                jc21 @paulocarrasco
                last edited by Oct 9, 2016, 1:20 AM

                @paulocarrasco That was my bad. The module has been fixed now, do a git pull inside the module dir.

                P 1 Reply Last reply Oct 9, 2016, 6:00 PM Reply Quote 0
                • P Offline
                  paulocarrasco @jc21
                  last edited by Oct 9, 2016, 6:00 PM

                  @jc21 Thanks for your quick reply. As you mentioned I made a ‘pull’ of MMM-IFTTT new version. Unfortunately It still giving the same error for me. All te rest appears that is working. Also the server is listening fine on port 8080.

                  For testing purposes I have this minimalistic config.js

                  ´´´
                  //* Magic Mirror Config Sample
                  *

                  • By Michael Teeuw http://michaelteeuw.nl
                  • MIT Licensed.
                    */

                  var config = {
                  port: 8080,

                  language: 'en',
                  timeFormat: 24,
                  units: 'metric',
                  
                  modules: [
                  	{
                  		module: 'alert',
                  	},
                  
                  	{
                  		module: 'clock',
                  		position: 'top_left'
                  	},
                  
                  	{
                    module: 'MMM-PIR-Sensor',
                  		config: {
                  	        		sensorGpio: 4,// See 'Configuration options' for more information.
                  			      }
                  	},
                  
                  	{
                  	  module: 'MMM-IFTTT',
                  	  position: 'lower_third',
                  	  config: {
                  						}
                  	},
                  ]
                  

                  };

                  /*************** DO NOT EDIT THE LINE BELOW ***************/
                  if (typeof module !== ‘undefined’) {module.exports = config;}

                  ´´´

                  This is the command I enter, followed by the error:

                  ´´´
                  MBP:~ paulocarrasco$ curl -X POST -H “Content-Type: application/json” -d ‘{“message”: “Your pizza is ready!”}’ “http://192.168.1.69:8080/IFTTT”

                  TypeError: Cannot read property 'debug' of undefined
                     at Class.log (/home/pi/MagicMirror/modules/MMM-IFTTT/node_helper.js:116:54)
                     at expressApp.post (/home/pi/MagicMirror/modules/MMM-IFTTT/node_helper.js:57:18)
                     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
                     at next (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:131:13)
                     at Route.dispatch (/home/pi/MagicMirror/node_modules/express/lib/router/route.js:112:3)
                     at Layer.handle [as handle_request] (/home/pi/MagicMirror/node_modules/express/lib/router/layer.js:95:5)
                     at /home/pi/MagicMirror/node_modules/express/lib/router/index.js:277:22
                     at Function.process_params (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:330:12)
                     at next (/home/pi/MagicMirror/node_modules/express/lib/router/index.js:271:10)
                     at urlencodedParser (/home/pi/MagicMirror/modules/MMM-IFTTT/node_modules/body-parser/lib/types/urlencoded.js:82:7)

                  ´´´

                  I hope this helps finding the error, because as I am a IFTTT fan your IFTTT module has main importance for me ;-).

                  J 1 Reply Last reply Oct 9, 2016, 11:46 PM Reply Quote 1
                  • J Offline
                    jc21 @paulocarrasco
                    last edited by Oct 9, 2016, 11:46 PM

                    @paulocarrasco Pull again now.

                    Made the noob mistake of not testing, I wasn’t near my mirror at the time. All good now.

                    P 1 Reply Last reply Oct 10, 2016, 4:40 PM Reply Quote 1
                    • P Offline
                      paulocarrasco @jc21
                      last edited by Oct 10, 2016, 4:40 PM

                      @jc21 No problem. Its working like a charm now. Thanks.

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