Read the statement by Michael Teeuw here.
Notification issued from MMM-MQTTbridge but nothing happens
-
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.htmlAny input from the developers on this? @Serge , @Bugsounet, @Jopyth :-)
Is it a MMM-MQTTbridge problem or a MMM-Remote-Control problem?
-
@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 -
@fribse said in Notification issued from MMM-MQTTbridge but nothing happens:
notiID: “‘REMOTE_ACTION’”,
Try to remove double quotes here in config
-
-
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};
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login