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

Notification issued from MMM-MQTTbridge but nothing happens

Scheduled Pinned Locked Moved Troubleshooting
5 Posts 2 Posters 734 Views 2 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.
  • F Offline
    fribse
    last edited by Oct 16, 2020, 7:43 AM

    As I posted elsewhere, after find the logs, I could get the errors removed, so now it posts the notification to REMOTE_ACTION, but nothing happens:

    It does receive the MQTT command, but nothing happens on the NOTI:

    0|mm     | [MQTT bridge] MQTT message received. Topic: bathroom/mirror, message: MONITOROFF
    0|mm     | [2020-10-16 09:23:53.728] [LOG]
    0|mm     | [MQTT bridge] MQTT -> NOTI issued: 'REMOTE_ACTION', payload: {action: 'MONITOROFF' }
    

    Same thing happens for MONITORON, DIM and UNDIM.

    The mqttdictionary file looks like this now:

    var mqttHook = [
        {
          mqttTopic: "bathroom/mirror",
          mqttPayload: [
            {
              payloadValue: "MONITOROFF",
              mqttNotiCmd: ["MONITOROFF"]
            },
            {
              payloadValue: "MONITORON",
              mqttNotiCmd: ["MONITORON"]
            },
            {
              payloadValue: "UNDIM",
              mqttNotiCmd: ["UNDIM"]
            },
            {
              payloadValue: "DIM",
              mqttNotiCmd: ["DIM"]
            },
          ],
        },
      ];
    var mqttNotiCommands = [
        {
          commandId: "MONITOROFF",
          notiID: "'REMOTE_ACTION'",
          notiPayload: "{action: 'MONITOROFF' }"
        },
        {
          commandId: "MONITORON",
          notiID: "'REMOTE_ACTION'",
          notiPayload: "{action: 'MONITORON' }"
        },
        {
          commandId: "DIM",
          notiID: "'REMOTE_ACTION'",
          notiPayload: "{action: 'BRIGHTNESS', value: '50')"
        },
        {
          commandId: "UNDIM",
          notiID: "'REMOTE_ACTION'",
          notiPayload: "action: 'BRIGHTNESS', value: '255'}"
        },
      ];
    
      module.exports = { mqttHook,  mqttNotiCommands};
    

    And the notification looks just like the one here in the documentation example here:

    this.sendNotification('REMOTE_ACTION', {action: 'RESTART'});
    

    The ipWhitelisting has been both tried with [(“127.0.0.1”,“localhost”,“my.ip.range.0/24”)] and also with just [].
    I can issue the commands MONITOROFF/MONITORON directly in the Remote-Control menu at /remote.html

    Any input from the developers on this? @Serge , @Bugsounet, @Jopyth :-)

    Is it a MMM-MQTTbridge problem or a MMM-Remote-Control problem?

    S 3 Replies Last reply Oct 18, 2020, 6:12 AM Reply Quote 0
    • S Offline
      Serge @fribse
      last edited by Oct 18, 2020, 6:12 AM

      @fribse said in Notification issued from MMM-MQTTbridge but nothing happens:

      0|mm | [MQTT bridge] MQTT message received. Topic: bathroom/mirror, message: MONITOROFF
      0|mm | [2020-10-16 09:23:53.728] [LOG]
      0|mm | [MQTT bridge] MQTT -> NOTI issued: ‘REMOTE_ACTION’, payload: {action: ‘MONITOROFF’ }

      Seems that mqttbridg isseued the predefined noti so the problem is with nite receiving by remcontrol or with noti processing by remote control.
      Send as well console log here

      1 Reply Last reply Reply Quote 0
      • S Offline
        Serge @fribse
        last edited by Oct 18, 2020, 6:14 AM

        @fribse said in Notification issued from MMM-MQTTbridge but nothing happens:

        notiID: “‘REMOTE_ACTION’”,

        Try to remove double quotes here in config

        1 Reply Last reply Reply Quote 0
        • S Offline
          Serge @fribse
          last edited by Oct 18, 2020, 2:00 PM

          @fribse resolved on GitHub.

          1 Reply Last reply Reply Quote 0
          • F Offline
            fribse
            last edited by Oct 18, 2020, 2:19 PM

            And again, Serge sharp eyes found the errors. I was somply trying to hard to add quotes and stuff so it got messed up.
            The working config for receiving commands from Home Assistant looks like this now:

            var mqttHook = [
                {
                  mqttTopic: "cmnd/bathroom/mirror",
                  mqttPayload: [
                    {
                      payloadValue: "MONITOROFF",
                      mqttNotiCmd: ["MONITOROFF"]
                    },
                    {
                      payloadValue: "MONITORON",
                      mqttNotiCmd: ["MONITORON"]
                    },
                    {
                      payloadValue: "UNDIM",
                      mqttNotiCmd: ["UNDIM"]
                    },
                    {
                      payloadValue: "DIM",
                      mqttNotiCmd: ["DIM"]
                    },
                  ],
                },
              ];
            var mqttNotiCommands = [
                {
                  commandId: "MONITOROFF",
                  notiID: 'REMOTE_ACTION',
                  notiPayload: {action: 'MONITOROFF'}
                },
                {
                  commandId: "MONITORON",
                  notiID: 'REMOTE_ACTION',
                  notiPayload: {action: 'MONITORON'}
                },
                {
                  commandId: "DIM",
                  notiID: 'REMOTE_ACTION',
                  notiPayload: {action: 'BRIGHTNESS', value: '50'}
                },
                {
                  commandId: "UNDIM",
                  notiID: 'REMOTE_ACTION',
                  notiPayload: {action: 'BRIGHTNESS', value: '255'}
                },
              ];
            
              module.exports = { mqttHook,  mqttNotiCommands};
            
            1 Reply Last reply Reply Quote 0
            • 1 / 1
            1 / 1
            • First post
              2/5
              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