trevmex's tumblings

Java Coder, JavaScripter, Rubyist, Functional Programmer, Agile Practitioner.
‪If you dig UNIX, you should check out the book Life with UNIX by Don Libes and Sandy Ressler. Lots of interesting UNIX history in there that has almost been lost to time, save for this one gem of a book. When you are done, go contribute to a GNU...

‪If you dig UNIX, you should check out the book Life with UNIX by Don Libes and Sandy Ressler. Lots of interesting UNIX history in there that has almost been lost to time, save for this one gem of a book. When you are done, go contribute to a GNU project (it’s not UNIX, though) 😀‬

Journaling

I have been journalling my day, (almost) every day, for the last 14 years. The key for me has been a DayMinder G545 and a Paper Mate ComfortMate Ultra.

I find that the space for one day in a DayMinder is just enough for me to think “hey, I can write that much for today.” I’ve tried other formats, but they have always been too open-ended. With the DayMinder, the space is perfect for me to reflect on my day for 5 minutes of writing time.

The best part of journalling for me, though, is looking back at any given day. I can take a journal from 10 years ago, open to a random page, read what happened, and the rest of that day comes flooding back into my mind. I write about work, home life, anything I did that day, and the magic of it is that the rest follows.

I’m not the best writer in the world, but journaling has helped me a lot. I hope it can help you, too.

This is the schematic for the LED nightlight I made.

This is the schematic for the LED nightlight I made.

This is a little night light powered by a 9V battery.

Schematics and tutorial

To do this project, you will need:

First wire up the 5V Power Supply from the tutorial, then wire up the LED to the photocell, and finally use the transistor to flip to high and low to make the night light!

Make sure you test to see if your power supply works with the multimeter before adding the light! It should read 9V at the barrel jack and 5V at the end.

(if you look closely at the video, you will see, that I also wired up a 3.3V regulator as well, but that is for a later project)

Control your lights with a magic wand!

Schematics, code and instructions are in the video description!

 ()
 ()

Control your lights with a URL

I recently purchased some Smart Lights for my house and linked them up to my phone and Alexa and my home security system.

That’s cool and everything, but I wanted a way to turn my lights on with an arbitrary API call. That, it seems does not come for free out of the box.

Fortunately, though, there is a great service called “If This Then That,” or IFTTT, that can help us bridge the gap!

I’ll walk you through the steps to get your lights turning on and off through a simple URL you can hit with a web browser or something more interesting.

0. Buy and install a Caseta SmartHub and some lighting fixtures. Their help is great and easy to follow, so I won’t go into detail about it here.

1. Sign up for an IFTTT account if you do not already have one.

2. Under your name, click “New Applet.”

image

3. Click “this.”

image

4. In the search bar, type “maker webhooks.” Then, click the green “Maker Webhooks” box.

image

5. Click “Receive a web request.“

image

6. In the Event Name field, create a name for your event, like “light_on” or “lights_off.” Use underscores for spaces if you like. Click “Create trigger” when you are done. Make note of your event name, you will need it later.

image

7. Click “that.”

image

8.  In the search bar, type “lutron.” Then, click the blue “Lutron Caseta Wireless” box. Note: You will be asked to link your lights to IFTTT the first time you do this. That will only happen once. After that they will always be linked.

image

9. Click “Set light level.”

image

10. Pick out which light you want to turn on or off, and the light level you want to change it to. Then click “Create action.”

image

11. Click “Finish.” (I missed this the first time I did it. If you close the window before clicking “Finish” all your work is lost.)

image

12. Click the “Maker Webhooks” link in the breadcrumbs at the top of the page.

image

13. Now click “Settings.”

image

14. Highlight the URL and paste it into your browser. Note the KEY, you will need it later.

image

15. In the “{event}” text box, enter the event name you created in step 6 and click “Test It.” You lights should now turn on if you did everything right.

image

Copy the URL underlined above. That is the URL you can now use to control your lights.

Repeat the above steps to create a “lights_off” URL, and now you have a way to click a link and turn your lights on and off!

I did this as a step in a hardware project I worked on, and it worked out great! Have fun!