MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    1. Home
    2. fribse
    3. Posts
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.
    F
    Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 35
    • Posts 159
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: MMM-MQTTbridge

      Hmm, not really sure what changed. I’ve tried setting the notilisten to false, and then I don’t see the error, but after reactivating it, I still dont’ see it.
      I can see that the log reports state 0x6 when the monitor is on, and 0x2 when it’s off.
      I can send commands to the Remote_Control module via http api, but nothing happens when I try it via the mqttbridge.
      I guess I have to ask @Jopyth about that?

      I also tried changing the quotation markings in the dict file, to match the Remote_Control parameters in the examples, but no change :-(

      var mqttNotiCommands = [
          {
            commandId: "MONITOROFF",
            notiID: 'REMOTE_ACTION',
            notiPayload: '{action: "MONITOROFF"}'
          },
          {
            commandId: "MONITORON",
            notiID: 'REMOTE_ACTION',
            notiPayload: '{action: "MONITORON"}'
          },
          {
            commandId: "UNDIM",
            notiID: 'REMOTE_ACTION',
            notiPayload: '{action; "BRIGHTNESS", value: "100"}'
          },
          {
            commandId: "DIM",
            notiID: "REMOTE_ACTION",
            notiPayload: '{action: "BRIGHTNESS", value: "75"}'
          },
          {
            commandId: "RESTART",
            notiID: "REMOTE_ACTION",
            notiPayload: '{action: "RESTART"}'
          },
        ];
      
      posted in System
      F
      fribse
    • RE: MMM-MQTTbridge

      Ok, I fixed the config.
      The typo is back :-)

      I see a few results right of the bat:

      [15:55:10.009] [LOG]    [MQTT bridge] MQTT brocker error: Error: client disconnecting
      [15:55:10.015] [LOG]    [MQTT bridge] NOTI->MQTT. Topic: home/bathroom/mirror/set, payload: {"state":"OFF"}
      [15:55:20.026] [LOG]    [MQTT bridge] MQTT brocker error: Error: client disconnecting
      [15:55:20.028] [LOG]    [MQTT bridge] NOTI->MQTT. Topic: home/bathroom/mirror/set, payload: {"state":"ON"}
      

      It also pops up on the screen that the MQTT broker is not replying, which is weird, as it’s in use for a lot of systems. Not sure what is going on?

      The dict looks like this:

      var mqttHook = [
          {
            mqttPayload: "TURN_OFF_SCREEN",
            mqttNotiCmd: ["MONITOROFF"]
          },
          {
            mqttPayload: "TURN_ON_SCREEN",
            mqttNotiCmd: ["MONITORON"]
          },
          {
            mqttPayload: "UNDIM_SCREEN",
            mqttNotiCmd: ["UNDIM"]
          },
          {
            mqttPayload: "DIM_SCREEN",
            mqttNotiCmd: ["DIM"]
          },
       ];
      var mqttNotiCommands = [
          {
            commandId: "MONITOROFF",
            notiID: "REMOTE_ACTION",
            notiPayload: "{action: 'MONITOROFF'}"
          },
          {
            commandId: "MONITORON",
            notiID: "REMOTE_ACTION",
            notiPayload: "{action: 'MONITORON'}"
          },
          {
            commandId: "UNDIM",
            notiID: "REMOTE_ACTION",
            notiPayload: "{action; 'BRIGHTNESS 100'}"
          },
          {
            commandId: "DIM",
            notiID: "REMOTE_ACTION",
            notiPayload: "{action: 'BRIGHTNESS 75'}"
          },
        ];
      
        module.exports = { mqttHook,  mqttNotiCommands};
      

      When I publish the MONITOROFF to it, it seems to pick it up and then bummer:

      [16:04:30.547] [LOG]    [MQTT bridge] MQTT message received. Topic: cmnd/home/bathroom/mirror, message: TURN_OFF_SCREEN
      [16:04:30.639] [LOG]    [MQTT bridge] MQTT -> NOTI issued: REMOTE_ACTION, payload: {action: 'MONITOROFF'}
      [16:04:30.646] [LOG]    Whoops! There was an uncaught exception...
      [16:04:30.665] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [16:04:30.667] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      [16:04:30.710] [LOG]    Whoops! There was an uncaught exception...
      [16:04:30.713] [LOG]    MagicMirror will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
      [16:04:30.714] [LOG]    If you think this really is an issue, please open an issue on GitHub: https://github.com/MichMich/MagicMirror/issues
      

      So for me it looks like the MQTT part works, it’s the sending to ‘Remote commander’ that is not working, or am I wrong?
      I’ve also tried creating a ‘RESTART’ command, same result.

      posted in System
      F
      fribse
    • RE: Working on getting a good hardware solution for MMM-AssistantMK2

      @Serge Very interesting, I even have the 4466 mic here :-)

      posted in Hardware
      F
      fribse
    • RE: MMM-MQTTbridge

      Ok, so now I tried setting it up, so far without luck.

      In the config.js I added

      {
                  module: 'MMM-MQTTbridge',
                  disabled: false,
                  config: {
                      mqttServer: "mqtt://user:password@mqttserver:1883",
                      mqttConfig:
                      {
                          listenMqtt: true,
                          useMqttBridgeFormatOnly: false,
                          interval: 300000,
                          topicSubscr: ["cmnd/home/bathroom/mirror"],
                      },
                      notiConfig:
                      {
                          listenNoti: true,
                          useMqttBridgeFormatOnly: false,
                          ignoreNotiId: ["CLOCK_MINUTE", "NEWS_FEED"],
                          ignoreNotiSender: ["system", "NEWS_FEED"],
                      },
      		// set "NOTIFICATIONS -> MQTT" dictionary at /dict/notiDictionary.js
      		// set "MQTT -> NOTIFICATIONS" dictionary at /dict/mqttDictionary.js
      	        },
              },
      

      So this should make it listen to the topic

      cmnd/home/bathroom/mirror
      

      I have added the MMM-Remote module to have the screen off/on commands.
      in the dict/mqttDictionary.js I have written

      /**  mqtt-to-notification                     **/
      /**  dictionaty                               **/
      /**  for MMM-MQTTbridge module                **/
      /**  modify comands                           **/
      /**         @sergge1                          **/
      
      var mqttHook = [
          {
            mqttPayload: "TURN_OFF_SCREEN",
            mqttNotiCmd: ["MONITOROFF"]
          },
          {
            mqttPayload: "TURN_ON_SCREEN",
            mqttNotiCmd: ["MONITORON"]
          },
          {
            mqttPayload: "UNDIM_SCREEN",
            mqttNotiCmd: ["UNDIM"]
          },
          {
            mqttPayload: "DIM_SCREEN",
            mqttNotiCmd: ["DIM"]
          },
       ];
      var mqttNotiCommands = [
          {
            commandId: "MONITOROFF",
            notiID: "REMOTE_ACTION",
            notiPayload: 'MONITOROFF'
          },
          {
            commandId: "MONITORON",
            notiID: "REMOTE_ACTION",
            notiPayload: 'MONITORON'
          },
          {
            commandId: "UNDIM",
            notiID: "REMOTE_ACTION",
            notiPayload: 'BRIGHTNESS 100'
          },
          {
            commandId: "DIM",
            notiID: "REMOTE_ACTION",
            notiPayload: 'BRIGHTNESS 75'
          },
        ];
      
        module.exports = { mqttHook,  mqttNotiCommands};
      

      But if I publish MONITOROFF to cmnd/home/bathroom/mirror nothing happens?
      Now, how do I debug this, where can I see if it even receives the message?

      posted in System
      F
      fribse
    • RE: I can't get mmm-screencast to work

      @Stoffbeuteluwe I have only tested with youtube so far, did you try that?

      posted in Troubleshooting
      F
      fribse
    • RE: MMM-MQTTbridge

      @Serge is it on purpose you write:
      useMqttBridgeFromatOnly
      and not
      useMqttBridgeFormatOnly
      ?

      posted in System
      F
      fribse
    • RE: I can't get mmm-screencast to work

      @sdetweil Ahhh, no, that was limited, and now it works :-)
      Thankyou

      posted in Troubleshooting
      F
      fribse
    • RE: I can't get mmm-screencast to work

      Hi @sdetweil
      It’s set to 0.0.0.0

      posted in Troubleshooting
      F
      fribse
    • 1 / 1