-
1Setup Arduino
First setup your Arduino IDE to work with the MKR GSM 1400:
https://www.arduino.cc/en/Guide/MKRGSM1400
Make sure you have a SIM at hand that can receive SMS.
-
2Low voltage stuff
Connect a relay breakout to pin 7, mine needed to be connected to VCC and GND. And one of the signal inputs to 7.
Connect some neopixels, I used a 16 neopixel ring, to 3.3V, GND and pin 5.
Side note here, neopixel's spec says the difference between power and signal should be 0.7V max. That's why I power them with 3.3V
-
3High voltage stuff
Warning, hic sunt dragones.
This step has the potential to kill somebody, including yourself, if you're not qualified ask an electrician friend.
Prepare one cable with a wall plug and a second with a lamp socket. Connect them using the relay, according to your local rules.
-
4FLash software
Get the software from here https://github.com/morgulbrut/smartBulbReseter and set it up according to the README.md there.
Flash it to your Arduino MKR GSM 1400.
The neopixels should light up in purple, and get switched off if a connection to your mobile network is established. This can take some time, especially on the first start.
Observe with the serial terminal what's going on. (Funfact here, my provider often sends SMS to tell were I could recharge my phone's prepaid card.) -
5Test and maybe fixes
After flashing the software. waiting till it's connected and there are no stupid SMS left from your provider, try send an SMS with either "ge_pre_2.7" or "ge_post_2.8" to your bulb reseter. There should be some output on the serial command as well as some click-e-di-clack from the relay.
Power stuffNow you could try if the light is blinking, connect the whole thing to power, make sure you have some fuses you can reset yourself, just in case.
The bulb should be on for some seconds, then off for 5 seconds, and then the pattern should start.If the bulb starts dark, you probably have to fix smartlamps.ino:
void ON(int secs) { digitalWrite(REL2_PIN, LOW); Serial.print("ON for "); Serial.print(secs); Serial.println(" secs"); delay(secs * 1000); } void OFF(int secs) { digitalWrite(REL2_PIN, HIGH); Serial.print("OFF for "); Serial.print(secs); Serial.println(" secs"); delay(secs * 1000); }
As you see here, my relay breakout is actually low active, I'm sure some are high active. Then you have to change HIGH to LOW.
-
6Add other smartbulbs
There are other smartbulb manufacturers who have similar funny ways to reset their lamp. So feel free to add your own and send a PR.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.