Read the statement by Michael Teeuw here.
Can I control a relay on MagicMirror2?
-
You may want to take a look at the MMM-PIR-Sensor module and see if you can adapt it for your needs. It includes the ability to control a relay for turning on/off the monitor.
-
@shbatm Thank you.
Can I use a bulb instead of a monitor? -
@MaengMarco said in Can I control a relay on MagicMirror2?:
@shbatm Thank you.
Can I use a bulb instead of a monitor?Sure why not? They’ve been doing it a while
example: https://www.raspberrypi.org/forums/viewtopic.php?f=44&t=82316
-
@cowboysdude
Yes. I saw. But I make to turn on & turn off a bulb on MagicMirror2.
I use to voice control used ‘annyang API’.
If I say " Turn on the light.", a bulb will turn on.
I think to make a new module about voice and relay control, right?
But It is very difficult… -
@MaengMarco Check the voice control software you’re going to use… I’m sure they have some sort of instructions on how to…
-
Using WebIOPI is simple way to control GPIOs . The followings is my solution.
-
To install WebIOPI to your raspberry Pi.
webiopi Installation
Note: if you use webiopi 0.7 and rasp 2, you have to run the patch. -
In the node_help.js of your module, use ‘http post’ to control the GPIOs.
WebIOPI rest api
ex:
SET ‘GPIO 3’ to ‘IN’ , the request as below:
HTTP POST
http:/192.168.1.200:8000/GPIO/3/function/in
-