Solved the issue by simply running npm install in the vendor folder.
Found thanks to this issue
Thought I’d share the solution so maybe noobs like me can use it in the future.
Electronics & IT student @ Artesis Plantijn University College
Solved the issue by simply running npm install in the vendor folder.
Found thanks to this issue
Thought I’d share the solution so maybe noobs like me can use it in the future.
@Mykle1
I did luckily!
I indeed had the issue after manual installation. Fact is, the automatic installation script would actually get stuck on two of my Pi’s at the node modules installation.
So I had to manually install.
In the issue that helped me find the answer, he did do a manual install as well and had the same problem.
But someone did mention “in the latest version there is a npm install task in the vendor folder as well which gets executed automatically after a successful install, yours wasn’t successful so this was never executed” which means I probably made a mistake in my manual installation, although I have no clue what it could’ve is as I followed the steps thoroughly on 2 different pi’s, getting the same result.
@bhepler I was! But I manages to fix the issue.
When checking npm versions I saw that electron was ver 1.8.1
I ended up rolling back to 1.7.9 and it works perfectly!
Have no idea why 1.8.1 results in a black screen though.
@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 :)
@Mykle1 I ended up copying and renaming the entire module! Worked way better than my silly workaround. Thank you! :)
I removed the Dom update and it seems to work.
@Mykle1 I ended up copying and renaming the entire module! Worked way better than my silly workaround. Thank you! :)
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
@strawberry-3.141 great, that’s perfect I’ll take a look thank you!
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 notification
My apologies if this was way too much information.
@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 :)
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?
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?
@strawberry-3.141 I understand, that’s actually really useful thank you! Can I pass parameters with a socketnotification?