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.