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?