The node-red flow at the moment is:waaren wrote: Wednesday 08 April 2020 22:52using os.execute dzVents can send any MQTT message to any topic. Only thing needed is installed mosquitto on the domoticz system.gschmidt wrote: Wednesday 08 April 2020 21:19 I have another question, maybe you have an answer.
I also use node-red-contrib-cast nodes to send audio notifications for the "Frietpan" Switch to my google home speakers.
Now this is working when I turn the "Frietpan" switch ON or OFF, but the 2 delay notifications I have a problem with:
the Switch ON/OFF message is published through the MQTT node: domoticz/out into the node-red flow, but is it also possible to publish a "domoticz" log message to the MQTT node? Then I could use the domoticz "frietpan" delay messages to send the audio messages parallel
Just let me know what you want to send to which topic and when and I will have a look.
The white comment nodes I have added to show which domoticz notification message should be used.
The ''Frietpan" ON and OFF messages are already spoken by the Google Home speakers of course, so there is no need for an extra audio message
Only the 2 delayed messages I want to use as an audio message
In the current flow the Function node "Frietpan Klaar" is based on the state of the domoticz Frietpan Switch "idx=283":
Code: Select all
var msgFrietpanKlaar = {
"url": "http://192.168.1.51:1880/frietpan-klaar",
"contentType": "audio/mp3",
"volume": 60
}
var msgVolumeBack = {
"volume": 30
}
if (msg.payload.idx == '283') {
if (msg.payload.nvalue == '1') {
node.send(msgFrietpanKlaar);
setTimeout(function(){
node.send(msgVolumeBack);
}, 7000);
}
}Code: Select all
if (msg.payload.klaarDelay == 'Frietpan is klaar om te frituren') --this is the 15minutes later message Note: Node-Red and MQTT/Domoticz are running on different Raspberry Pi's
I hope the question is clear to you