{"id":515,"date":"2018-11-28T07:23:20","date_gmt":"2018-11-28T12:23:20","guid":{"rendered":"http:\/\/www.thesmarthomehookup.com\/test_install\/?p=515"},"modified":"2023-02-08T16:48:39","modified_gmt":"2023-02-08T21:48:39","slug":"automate-your-toddler-with-an-rgb-lightbulb","status":"publish","type":"post","link":"http:\/\/www.thesmarthomehookup.com\/test_install\/automate-your-toddler-with-an-rgb-lightbulb\/","title":{"rendered":"Automate your toddler with an RGB lightbulb"},"content":{"rendered":"<p><iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/OgDABg0BptM\" frameborder=\"0\" allow=\"accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen=\"\"><\/iframe><\/p>\n<p><strong>Automate your child with the Sonoff B1 Bulb<\/strong><\/p>\n<p>Today on the hookup we\u2019re going to look at using an RGB smart bulb like the sonoff B1 to help your toddler develop a healthy nighttime and morning routine, and help you get more sleep.<\/p>\n<p>When my daughter was a little over two years old she graduated from her crib to a toddler bed.&nbsp; This meant a lot of extra freedom for her, but also extra trouble for me and my wife.&nbsp; A two year old can\u2019t tell time and doesn\u2019t have a great internal clock yet, but they do know their colors!<\/p>\n<p>The concept is simple, at night she uses the light as a night light.&nbsp; It\u2019s pretty common knowledge today that blue light isn\u2019t good for sleep patterns, so we wanted to choose something with a low amount of blue.&nbsp; Luckily it was pretty easy to convince our two and a half year old girl that she wanted a pink night light.&nbsp; Another added benefit of using this bulb as a night light is that you can gradually decrease the brightness as they get older to make them less dependent on the night light.<\/p>\n<p>In the mornings her night light changes colors a few times.&nbsp; The first change, to the color yellow happens at the minimum time you think it is acceptable for your child to wake up.&nbsp; We explained to her that when her light is yellow she is allowed to get out of her bed and play with toys in her room, but she is not supposed to leave her room and she is not supposed to wake me or her mother up.<\/p>\n<p>The next change, to the color green, happens when you decide it is acceptable for your child to come and wake you up.&nbsp; For me and my wife this basically acted as our alarm clock since my daughter was always ready to come get us as soon as her light turned green.&nbsp; The light remains green for an hour before turning back to the pink night light color.<\/p>\n<p>As my daughter has gotten older the light has remained functional.&nbsp; Now it signifies the time when she is allowed to turn on her ipad on weekend mornings.&nbsp; We still monitor the on and off times for the ipad just to make sure she is following the rules, but she has only ever turned it on before she was supposed to one time, and now that she knows that we know, she hasn\u2019t done it again.<\/p>\n<p>Now that we\u2019ve talked about the concept, lets talk about the products.&nbsp; I am an avid user of home assistant and smart home products, but my daughter\u2019s night light bulb isn\u2019t in home assistant, or even connected to the internet.&nbsp; It\u2019s a Bluetooth low energy bulb with a phone app called \u201cmagic light\u201d.&nbsp; The scheduling is all done via the app and stored directly on the bulb.&nbsp; These bulbs have some major upsides but also a few drawbacks.<\/p>\n<p>Lets start with the good stuff:<\/p>\n<p>They never crash, I\u2019ve got some other smart bulbs in my house made by TP-link and every few days I see them turn off momentarily and then lose their brightness information, this thing has been on 24 hours a day for 4 years and has never needed tech support.<\/p>\n<p>They don\u2019t care about the internet, if your wifi goes down they aren\u2019t going to reboot or become useless, you connect to them with Bluetooth with you need to and they work on their own the rest of the time.<\/p>\n<p>You can set up as many different on of schedules as you want, we\u2019ve got a weekend and a weekday schedule, but you could set up more if needed.<\/p>\n<p>Unfortunately, the lack of constant connectivity comes with one major drawback: Power loss causes the schedules to be lost, sort of.&nbsp; After power loss the bulb loses its schedules, but the app remembers them.&nbsp; To reactivate the schedules you just need to connect to the bulb with Bluetooth to allow the schedules to be uploaded to the light.&nbsp; The biggest problem is that it\u2019s impossible to know whether the light has lost power since it always comes back on with the last color that it was set to<\/p>\n<p>After the first few times my daughters schedule didn\u2019t function due to random power outages we put her bedside lamp on the smallest battery backup we could find and it has worked like a champ\u2026 It\u2019s also nice that her nightlight doesn\u2019t turn off during a power outage.<\/p>\n<p>If you are looking for a simple solution that works, look no further, buy the Flux Bluetooth bulb from amazon and don\u2019t look back.<\/p>\n<p>However, If you really want to integrate this bulb into your home automation platform you\u2019re going to need another bulb since the flux bulb is BLE and doesn\u2019t have a published API. There are lots of smart RGB bulbs on the market, but the cheapest and easiest to integrate into existing smart home is the sonoff B1.&nbsp; Like other sonoff products, the B1 works by default with the Ewelink app, but in addition to many other shortfalls the scheduling option in the ewelink app doesn\u2019t allow for color selection.&nbsp; In order to change colors on a schedule you\u2019ll need to flash the custom tasmota firmware.&nbsp; It\u2019s a pretty quick and painless process, but it does require some simple soldering.&nbsp; DrZzs has a good video on exactly this subject, so I\u2019m not going to go through all the steps here.<\/p>\n<p>Once you have tasmota uploaded you can use your automation platform of choice to change the color using MQTT messages on the topic cmnd\/[SONOFF_NAME]\/Color with a&nbsp; payload of a 10 digit HEX color code.&nbsp; This code controls the 5 pixel types that are in sonoff B1:&nbsp; The first two digits are the red pixel, the second set is the green pixel, the third set is the blue pixel, the fourth is the cool white pixel, and the fifth is the warm white pixel.&nbsp; To send pure red you would send FF,00,00,00,00.&nbsp; If you want to know how to send a specific color you can use google\u2019s color picker to find the hex code, and then just add four zeroes at the end.<\/p>\n<p>No doubt the B1 is a more connected bulb, but it\u2019s got a few downsides.<\/p>\n<p>First, it\u2019s not going to be nearly as bright as the Flux bulb since the B1 only has 3 RGB pixels and mostly focuses on being a white bulb.<\/p>\n<p>Second, it\u2019s not really user friendly.&nbsp; Just to achieve the same functionality of the Flux bulb you\u2019ll need to solder, flash custom firmware, and set up MQTT automations, it also wifi to follow the schedule so if your network goes down your color changes won\u2019t happen, because there\u2019s no option to save the schedules locally.<\/p>\n<p>In fact, I\u2019m just going to say it.&nbsp; If you\u2019re planning on using this light to automate your toddler, go ahead and buy the flux light, the B1 will work, but it is unnecessarily difficult.&nbsp; I own and use Sonoff B1s, but they just don\u2019t make a lot of sense for this application.<\/p>\n<p>Thank you to all of my wonderful patrons from patreon, if you\u2019re curious about how I use my sonoff B1s and sync their color with my outdoor LEDs I do share all of my node-red flows and my configuration.yaml file with my patrons via dropbox.<\/p>\n<p>If you enjoyed this video, please consider subscribing, and as always, thanks for watching the hookup.<\/p>\n<h5>Flux Bluetooth Bulb: <a href=\"https:\/\/amzn.to\/2SjQKXf\">https:\/\/amzn.to\/2SjQKXf<\/a><\/h5>\n<h5>Sonoff B1 Bulb: <a href=\"https:\/\/amzn.to\/2FHXYCY\">https:\/\/amzn.to\/2FHXYCY<\/a><\/h5>\n<h5><\/h5>\n<h5>Visit my website: http:\/\/www.thesmarthomehookup.com\/test_install<\/h5>\n<h5>Follow me on Twitter: @TheHookUp1<\/h5>\n<h5><\/h5>\n<h5>Support my channel:<\/h5>\n<h5>Patreon: <a href=\"https:\/\/www.patreon.com\/thehookup\">https:\/\/www.patreon.com\/thehookup<\/a><\/h5>\n<h5><\/h5>\n<h5>Music by <a href=\"http:\/\/www.BenSound.com\">www.BenSound.com<\/a><\/h5>\n","protected":false},"excerpt":{"rendered":"<p>Automate your child with the Sonoff B1 Bulb Today on the hookup we\u2019re going to look at using an RGB smart bulb like the sonoff B1 to help your toddler develop a healthy nighttime and morning routine, and help you get more sleep. When my daughter was a little over two years old she graduated [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":2584,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-515","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"acf":[],"mb":[],"mfb_rest_fields":["title","gutenberg_elementor_mode"],"_links":{"self":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/515","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=515"}],"version-history":[{"count":4,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/515\/revisions"}],"predecessor-version":[{"id":2339,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/posts\/515\/revisions\/2339"}],"wp:featuredmedia":[{"embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media\/2584"}],"wp:attachment":[{"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/media?parent=515"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/categories?post=515"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.thesmarthomehookup.com\/test_install\/wp-json\/wp\/v2\/tags?post=515"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}