Read the statement by Michael Teeuw here.
Execute bash command/Turn off GPIO (LED) from mirror
-
I’m looking for a quick and dirty way to turn off an LED once the mirror fully loads - basically getting around the slowness in Electron from all the random little errors on startup and waiting for systems that will never start.
I don’t care if it’s a quick module I build myself, or something else.
I’m assuming it can be done with all the abilities to read system info etc - just not sure how to do it myself.
Thanks!
-
tip: try to use gpiozero ;)
-
@bugsounet I actually have the bash command I need to run. Just the part of interfacing through the Mirror is what I need help with.
-
ah sorry, so exec your code it when all modules are started.
with
ALL_MODULES_STARTEDincoming system notification, you can send a notification to node_helper for exec your bash scriptFor execute it in node_helper, you can use
execcommand ofchild_processlibrarySee:
- system notification: about all system notification
- sendSocketNotification for send a notification to
node_helper - socketNotificationReceived for read notification in
node_helper
-
@BKeyport
MMM-NotificationTrigger for that purpose. -
-
@wishmaster270 @MMRIZE I figured one of you wizards already figured it out. I had forgotten about the all modules notification, and then I would have realized all the pieces are already there.
-
FWIW, MMM-Notification-To-Command is exactly what I was aiming for.
-
B BKeyport has marked this topic as solved on
-
@BKeyport you might want to look at raspberry pi 5 I use it to turn LEDs on and off
I also use believers are not Dragon NaturallySpeaking which is pretty cool because I can write a letter and also turn LEDs on and off just by voice -
@Ray
pinctrl 17 op dldoes the work behind the scenes, I just needed a way to call it from the mirror, which I got with MMM-Notification-to-command. -
@BKeyport another way I also do it is I use GoogleAssistant
and then use what they call a recipe these recipes you can make yourself on my recipe I have turned the lights on
so as long as I have my microphone on and link to the mirror I can turn the lights on and off
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