{"id":502,"date":"2018-11-07T13:59:56","date_gmt":"2018-11-07T18:59:56","guid":{"rendered":"http:\/\/www.thesmarthomehookup.com\/test_install\/?p=502"},"modified":"2023-02-08T16:55:02","modified_gmt":"2023-02-08T21:55:02","slug":"automating-a-flawed-christmas-tree-with-a-shelly1-low-voltage","status":"publish","type":"post","link":"http:\/\/www.thesmarthomehookup.com\/test_install\/automating-a-flawed-christmas-tree-with-a-shelly1-low-voltage\/","title":{"rendered":"Automating a Flawed Christmas Tree with a Shelly1 (Low Voltage)"},"content":{"rendered":"<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/pUDGYC3mnQw\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><\/iframe><\/p>\n<p>Today on the hookup we\u2019re going to look at how to automate a pre-lit Christmas tree using the LOW voltage functionality of the shelly1.<\/p>\n<p>It\u2019s November, and in November my family and I do quite a bit of traveling, and spend basically all of our weekends away.&nbsp; That means a few things, number 1, I\u2019ll be producing slightly less content in November than I normally do, and number 2, my wife gets a free pass to start decorating for Christmas as soon as the Halloween decorations are put away.&nbsp; As I record this video it\u2019s currently November 5<sup>th<\/sup> and our Christmas tree has been up for two days.<\/p>\n<p>Overall I really like our tree.&nbsp; It is pre-lit and you can click the footswitch to toggle between four modes: off, white, multicolored, or alternating.&nbsp; But the tree has one serious flaw:&nbsp; The default state when power is lost is off, not the last selected LED color mode.&nbsp; This means if you try to automate it using a smart plug you\u2019ll be able to turn it off, but to turn it on you\u2019ll need to first toggle the outlet on, and then walk over and step on the footswitch the specified number of times to get back to your desired mode.<\/p>\n<p>After some quick probing around with a multimeter I was able to figure out that the white lights are lit by having +30 volts on the striped wire, and ground on the plain wire, and colored lights are lit by having +30 volts on the plain wire and ground on the striped wire.&nbsp; The pushbutton contians the brain and controls the mode with a little IC chip.&nbsp; The power wire before the pushbutton is at a constant 30 volts DC provided by the AC wall adapter.<\/p>\n<p>My original plan was to hook up an ESP-01 with a buck converter to step the 30 volts down to 3.3V and then use one of these 3.3V relay modules, but I really didn\u2019t want to re-invent the wheel since there are tons of these wifi relay modules out there.&nbsp; Then I briefly thought about using a sonoffSV but quickly realized it can only handle 24V input, not 30.&nbsp; Then I remembered that the Shelly1 can be powered not only by 110-240 volts AC, but also 24-60V DC, perfect!<\/p>\n<p>That means that all I needed to do was steal a little power from the wires on the adapter side to power the shelly, and then interrupt one of the wires on the tree side with the relay.&nbsp; Since the input and output of the relay on the shelly1 are isolated from voltage used to power the shelly it won\u2019t mess up the lights at all, it will just prevent them from turning on when the relay is off.<\/p>\n<p>Since the power interruption happens after the footswitch where the brain is, the brain never even knows that the lights aren\u2019t on and therefore will continue to output the correct pattern.&nbsp; If you\u2019d like to change the pattern you still need to press the footswitch, and if the power goes out you\u2019ll still need to press the footswitch to turn them back on, but 99% of the time this is a perfect solution for automating the lights without actually cutting the power to the brain in the footswitch.<\/p>\n<p>I\u2019ll probably put the shelly in a little project box just to hide some of the messy wires, but It\u2019s pretty low voltage here, so I\u2019m not particularly concerned about an electrocution risk.&nbsp; I\u2019m not sure if my particular issue with the lights defaulting to the off state has been fixed in current models of pre-lit trees, but it seems like a major oversight and effects anyone using a timer, not just a smart switch.<\/p>\n<p>Because this is a pretty temporary thing and because the shelly firmware supports MQTT now I didn\u2019t even bother putting tasmota on this shelly.&nbsp; I set the switch up in home assistant using the settings that I posted in my last video on the shelly and it works like a charm.&nbsp; If you\u2019ve been trying to use the alexa local node in node-red, amazon has changed the way that discovery works, and new nodes are no longer being discovered.&nbsp; I\u2019m currently looking for a solution or work around, but I was not able to immediately get the Christmas tree added to my alexa due to that problem with the alexa local node.&nbsp; Hopefully I\u2019ll find a solution soon and I\u2019ll let you all know about it when I do.<\/p>\n<p>That\u2019s it for today, as I said, November is going to have some shorter videos, but I\u2019ve got some big projects coming up for December, and I\u2019ve got some majors updates to push out for my holiday LED Arduino program that includes customizations for color and speed for every effect.<\/p>\n<p>Thank you to all my patrons over at patreon for your continued support of my channel.&nbsp; If you\u2019d like to buy a shelly1 the link is down in the description.&nbsp; Hopefully the shelly 2 will be back in stock soon also.&nbsp; If you enjoyed this video, please consider subscribing, and as always, thanks for watching the hookup.<\/p>\n<h3>Shelly1 AmazonUS: <a href=\"https:\/\/amzn.to\/2PPGHbj\">https:\/\/amzn.to\/2PPGHbj<\/a><\/h3>\n<h3>Shelly2 AmazonUS: <a href=\"https:\/\/amzn.to\/2PqtE0i\">https:\/\/amzn.to\/2PqtE0i<\/a><\/h3>\n<h3>&nbsp;(Still listed as unavailable, shelly tells me the shipment is en route, check back soon.&nbsp; I&#8217;ll tweet it out once they are back in stock).<\/h3>\n<h3>visit my website: <a href=\"http:\/\/www.thesmarthomehookup.com\/test_install\">http:\/\/www.thesmarthomehookup.com\/test_install<\/a><\/h3>\n<h3><\/h3>\n<h3>Follow me on Twitter: @TheHookUp1<\/h3>\n<h3><\/h3>\n<h3>Support my channel:<\/h3>\n<h3>Patreon: <a href=\"https:\/\/www.patreon.com\/thehookup\">https:\/\/www.patreon.com\/thehookup<\/a><\/h3>\n<h3><\/h3>\n<h3><\/h3>\n<h3>Music by www.BenSound.com<\/h3>\n","protected":false},"excerpt":{"rendered":"<p>Today on the hookup we\u2019re going to look at how to automate a pre-lit Christmas tree using the LOW voltage functionality of the shelly1. It\u2019s November, and in November my family and I do quite a bit of traveling, and spend basically all of our weekends away.&nbsp; That means a few things, number 1, I\u2019ll [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2588,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[4],"tags":[],"class_list":["post-502","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-projects"],"acf":[],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/502","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/comments?post=502"}],"version-history":[{"count":4,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/502\/revisions"}],"predecessor-version":[{"id":2343,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/502\/revisions\/2343"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media\/2588"}],"wp:attachment":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media?parent=502"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/categories?post=502"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/tags?post=502"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}