@strawberry-3.141 changed, thank you!
Read the statement by Michael Teeuw here.
Posts
-
RE: MMM-AlarmClock append / push to alarms array
I removed the Dom update and it seems to work.
-
RE: MMM-Mqtt pub and sub at the same time
@Mykle1 I ended up copying and renaming the entire module! Worked way better than my silly workaround. Thank you! :)
-
MMM-AlarmClock append / push to alarms array
I’m trying to append alarm objects to the alarms array
This is my code so far.// SET ALARM if(notification === "SET_ALARM"){ var mqttData = JSON.parse(payload); this.config.alarms.push({time: mqttData.hour+":"+mqttData.min, days: [1,2,3,4,5,6,7], sound: "alarm.mp3", title: "Alarm", message: mqttData.msg}); this.updateDom(300); console.log("alarm obj: "+this.config.alarms); }
However, in the console it shows only one alarm object.
Note: I have one alarm set in the config file
-
RE: How to show a popup window
@strawberry-3.141 great, that’s perfect I’ll take a look thank you!
-
How to show a popup window
I’m trying to write my own module that will allow me to set the alarm for the MMM-AlarmClock module through buttons attached to your Pi.
I have the code that will read my button inputs, I have the code that will send the notification to set the alarm and I have my buttons on a PCB wired to my Pi.
There are 5 buttons: one ‘confirm’ button in the middle and 4 around it that count as arrows (left, right, up, down).
This way you’ll be able to set it number per number (kind of like the iphone alarm setter but without animation).However, I just can’t seem to figure out how to show a popup window that will allow users to set the alarm in.
I know this is probably very simple, but I’m fairly new to JS. I’ve looked at the alert and iFrame modules but can’t really figure out how to use those for my module or if that would even make sense.This would be the flow:
Press confirm button > open small popup window on top > push up or down until number matches time > push right or left to set next or previous number > repeat > confirm > send notificationMy apologies if this was way too much information.
-
RE: MMM-Mqtt pub and sub at the same time
@Mykle1 this was indeed the alternative solution I had in mind! I managed to get it to work now, but it looks a bit iffy since both instances of the module will receive the incoming data and so it will be displayed on the screen twice (which doesn’t seem to happen with outgoing data). I’m going to try see if I can manage to display it only on one of them and otherwise I’ll revert to the alternative you suggested! Thank you :)
-
MMM-Mqtt pub and sub at the same time
Hello,
I was wondering if any of you know how to actually subscribe and publish to a topic using this module? I currently tried adding two different instances of the module to the config file and have one set as sending and one as receiving but that just causes the module to crash and go offline.
Has anyone figured out how to do both of these at the same time? -
RE: [SOLVED] Anyone tried MMM-mqtt?
Hello,
I was wondering if any of you know how to actually subscribe and publish to a topic using this module? I currently tried adding two different modules to the config file and have one set as sending and one as receiving but that just causes the module to crash. Has anyone figured out how to do both of these at the same time?