Controlling normal bulbs brightness using Sonoff devices












6















I am doing a home automation project in which I should be able to control the lights on/off but more than that, the brightness of the lights.



I am using Home Assistant (not hassbian) and Node-Red along with MQTT.



I am using a normal bulb I purchased from a hardware store connected to a Sonoff ESP8266 and am able to use Node-RED to trigger a on and off state but am unsure how to trigger the specific brightness level.



Is it possible to control the brightness of any normal light that is made into a 'smart light' through the use of Sonoff? Or must they be devices that have that functionality made into the light itself.



(same for any other appliances, such as things such like a normal portable fan made into a smart fan through ESP8266 and controlling its speed.)










share|improve this question





























    6















    I am doing a home automation project in which I should be able to control the lights on/off but more than that, the brightness of the lights.



    I am using Home Assistant (not hassbian) and Node-Red along with MQTT.



    I am using a normal bulb I purchased from a hardware store connected to a Sonoff ESP8266 and am able to use Node-RED to trigger a on and off state but am unsure how to trigger the specific brightness level.



    Is it possible to control the brightness of any normal light that is made into a 'smart light' through the use of Sonoff? Or must they be devices that have that functionality made into the light itself.



    (same for any other appliances, such as things such like a normal portable fan made into a smart fan through ESP8266 and controlling its speed.)










    share|improve this question



























      6












      6








      6








      I am doing a home automation project in which I should be able to control the lights on/off but more than that, the brightness of the lights.



      I am using Home Assistant (not hassbian) and Node-Red along with MQTT.



      I am using a normal bulb I purchased from a hardware store connected to a Sonoff ESP8266 and am able to use Node-RED to trigger a on and off state but am unsure how to trigger the specific brightness level.



      Is it possible to control the brightness of any normal light that is made into a 'smart light' through the use of Sonoff? Or must they be devices that have that functionality made into the light itself.



      (same for any other appliances, such as things such like a normal portable fan made into a smart fan through ESP8266 and controlling its speed.)










      share|improve this question
















      I am doing a home automation project in which I should be able to control the lights on/off but more than that, the brightness of the lights.



      I am using Home Assistant (not hassbian) and Node-Red along with MQTT.



      I am using a normal bulb I purchased from a hardware store connected to a Sonoff ESP8266 and am able to use Node-RED to trigger a on and off state but am unsure how to trigger the specific brightness level.



      Is it possible to control the brightness of any normal light that is made into a 'smart light' through the use of Sonoff? Or must they be devices that have that functionality made into the light itself.



      (same for any other appliances, such as things such like a normal portable fan made into a smart fan through ESP8266 and controlling its speed.)







      mqtt esp8266 home-assistant node-red sonoff






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Dec 23 '18 at 12:31









      Aurora0001

      13.6k1041147




      13.6k1041147










      asked Dec 23 '18 at 10:15









      Eric LimEric Lim

      666




      666






















          3 Answers
          3






          active

          oldest

          votes


















          7














          No, you can't do that using Sonoff since it is an on-off switch with relay.



          You need an Triac to do that. Normally the brightness control applications for AC will be done through Triac by changing the firing angle.






          share|improve this answer


























          • Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

            – Eric Lim
            Dec 23 '18 at 19:51











          • Yes, you need to design a Triac based dimmer circuitry.

            – Electron
            Dec 23 '18 at 19:58



















          4














          No, most Sonoff devices are just remote controlled relays, they can only turn the power on or off.



          You can not use them to dim lights.






          share|improve this answer































            2














            There are devices made specially for dimming using only on-off impulses to set the brightness. A common pattern is to use a short on/off signal for on/off, and a longer on/off signal to increase brightness in n % steps.



            So provided you can make the Sonoff switch on and off sufficiently fast, and reliably to get the timing right, adding a device like this or any other similar impulse switch with dimmer should work.



            (Note that I'm not suggesting to pulse-width modulate it - the shortest impulse necessary is ~0,5 sec. The output remains as set, until it receives the next command signal).






            share|improve this answer


























            • The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

              – hardillb
              Dec 23 '18 at 22:22











            • Please clarify that via edit in your answer. Future readers should not need to read the comments.

              – Helmar
              Dec 24 '18 at 0:19











            Your Answer








            StackExchange.ready(function() {
            var channelOptions = {
            tags: "".split(" "),
            id: "666"
            };
            initTagRenderer("".split(" "), "".split(" "), channelOptions);

            StackExchange.using("externalEditor", function() {
            // Have to fire editor after snippets, if snippets enabled
            if (StackExchange.settings.snippets.snippetsEnabled) {
            StackExchange.using("snippets", function() {
            createEditor();
            });
            }
            else {
            createEditor();
            }
            });

            function createEditor() {
            StackExchange.prepareEditor({
            heartbeatType: 'answer',
            autoActivateHeartbeat: false,
            convertImagesToLinks: false,
            noModals: true,
            showLowRepImageUploadWarning: true,
            reputationToPostImages: null,
            bindNavPrevention: true,
            postfix: "",
            imageUploader: {
            brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
            contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
            allowUrls: true
            },
            onDemand: true,
            discardSelector: ".discard-answer"
            ,immediatelyShowMarkdownHelp:true
            });


            }
            });














            draft saved

            draft discarded


















            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fiot.stackexchange.com%2fquestions%2f3714%2fcontrolling-normal-bulbs-brightness-using-sonoff-devices%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown

























            3 Answers
            3






            active

            oldest

            votes








            3 Answers
            3






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            7














            No, you can't do that using Sonoff since it is an on-off switch with relay.



            You need an Triac to do that. Normally the brightness control applications for AC will be done through Triac by changing the firing angle.






            share|improve this answer


























            • Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

              – Eric Lim
              Dec 23 '18 at 19:51











            • Yes, you need to design a Triac based dimmer circuitry.

              – Electron
              Dec 23 '18 at 19:58
















            7














            No, you can't do that using Sonoff since it is an on-off switch with relay.



            You need an Triac to do that. Normally the brightness control applications for AC will be done through Triac by changing the firing angle.






            share|improve this answer


























            • Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

              – Eric Lim
              Dec 23 '18 at 19:51











            • Yes, you need to design a Triac based dimmer circuitry.

              – Electron
              Dec 23 '18 at 19:58














            7












            7








            7







            No, you can't do that using Sonoff since it is an on-off switch with relay.



            You need an Triac to do that. Normally the brightness control applications for AC will be done through Triac by changing the firing angle.






            share|improve this answer















            No, you can't do that using Sonoff since it is an on-off switch with relay.



            You need an Triac to do that. Normally the brightness control applications for AC will be done through Triac by changing the firing angle.







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jan 21 at 3:30









            user158

            129128




            129128










            answered Dec 23 '18 at 18:45









            ElectronElectron

            1863




            1863













            • Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

              – Eric Lim
              Dec 23 '18 at 19:51











            • Yes, you need to design a Triac based dimmer circuitry.

              – Electron
              Dec 23 '18 at 19:58



















            • Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

              – Eric Lim
              Dec 23 '18 at 19:51











            • Yes, you need to design a Triac based dimmer circuitry.

              – Electron
              Dec 23 '18 at 19:58

















            Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

            – Eric Lim
            Dec 23 '18 at 19:51





            Hi thanks for the suggestion on top of the answer! If I may ask, will the triac then enable me to control the brightness via nodered payload?

            – Eric Lim
            Dec 23 '18 at 19:51













            Yes, you need to design a Triac based dimmer circuitry.

            – Electron
            Dec 23 '18 at 19:58





            Yes, you need to design a Triac based dimmer circuitry.

            – Electron
            Dec 23 '18 at 19:58











            4














            No, most Sonoff devices are just remote controlled relays, they can only turn the power on or off.



            You can not use them to dim lights.






            share|improve this answer




























              4














              No, most Sonoff devices are just remote controlled relays, they can only turn the power on or off.



              You can not use them to dim lights.






              share|improve this answer


























                4












                4








                4







                No, most Sonoff devices are just remote controlled relays, they can only turn the power on or off.



                You can not use them to dim lights.






                share|improve this answer













                No, most Sonoff devices are just remote controlled relays, they can only turn the power on or off.



                You can not use them to dim lights.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Dec 23 '18 at 11:12









                hardillbhardillb

                6,8511827




                6,8511827























                    2














                    There are devices made specially for dimming using only on-off impulses to set the brightness. A common pattern is to use a short on/off signal for on/off, and a longer on/off signal to increase brightness in n % steps.



                    So provided you can make the Sonoff switch on and off sufficiently fast, and reliably to get the timing right, adding a device like this or any other similar impulse switch with dimmer should work.



                    (Note that I'm not suggesting to pulse-width modulate it - the shortest impulse necessary is ~0,5 sec. The output remains as set, until it receives the next command signal).






                    share|improve this answer


























                    • The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                      – hardillb
                      Dec 23 '18 at 22:22











                    • Please clarify that via edit in your answer. Future readers should not need to read the comments.

                      – Helmar
                      Dec 24 '18 at 0:19
















                    2














                    There are devices made specially for dimming using only on-off impulses to set the brightness. A common pattern is to use a short on/off signal for on/off, and a longer on/off signal to increase brightness in n % steps.



                    So provided you can make the Sonoff switch on and off sufficiently fast, and reliably to get the timing right, adding a device like this or any other similar impulse switch with dimmer should work.



                    (Note that I'm not suggesting to pulse-width modulate it - the shortest impulse necessary is ~0,5 sec. The output remains as set, until it receives the next command signal).






                    share|improve this answer


























                    • The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                      – hardillb
                      Dec 23 '18 at 22:22











                    • Please clarify that via edit in your answer. Future readers should not need to read the comments.

                      – Helmar
                      Dec 24 '18 at 0:19














                    2












                    2








                    2







                    There are devices made specially for dimming using only on-off impulses to set the brightness. A common pattern is to use a short on/off signal for on/off, and a longer on/off signal to increase brightness in n % steps.



                    So provided you can make the Sonoff switch on and off sufficiently fast, and reliably to get the timing right, adding a device like this or any other similar impulse switch with dimmer should work.



                    (Note that I'm not suggesting to pulse-width modulate it - the shortest impulse necessary is ~0,5 sec. The output remains as set, until it receives the next command signal).






                    share|improve this answer















                    There are devices made specially for dimming using only on-off impulses to set the brightness. A common pattern is to use a short on/off signal for on/off, and a longer on/off signal to increase brightness in n % steps.



                    So provided you can make the Sonoff switch on and off sufficiently fast, and reliably to get the timing right, adding a device like this or any other similar impulse switch with dimmer should work.



                    (Note that I'm not suggesting to pulse-width modulate it - the shortest impulse necessary is ~0,5 sec. The output remains as set, until it receives the next command signal).







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Dec 24 '18 at 8:43

























                    answered Dec 23 '18 at 22:17









                    dlatikaydlatikay

                    1213




                    1213













                    • The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                      – hardillb
                      Dec 23 '18 at 22:22











                    • Please clarify that via edit in your answer. Future readers should not need to read the comments.

                      – Helmar
                      Dec 24 '18 at 0:19



















                    • The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                      – hardillb
                      Dec 23 '18 at 22:22











                    • Please clarify that via edit in your answer. Future readers should not need to read the comments.

                      – Helmar
                      Dec 24 '18 at 0:19

















                    The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                    – hardillb
                    Dec 23 '18 at 22:22





                    The Sonoff drive a relay, you really should not be driving these on/off quickly as you will just end up welding the contacts

                    – hardillb
                    Dec 23 '18 at 22:22













                    Please clarify that via edit in your answer. Future readers should not need to read the comments.

                    – Helmar
                    Dec 24 '18 at 0:19





                    Please clarify that via edit in your answer. Future readers should not need to read the comments.

                    – Helmar
                    Dec 24 '18 at 0:19


















                    draft saved

                    draft discarded




















































                    Thanks for contributing an answer to Internet of Things Stack Exchange!


                    • Please be sure to answer the question. Provide details and share your research!

                    But avoid



                    • Asking for help, clarification, or responding to other answers.

                    • Making statements based on opinion; back them up with references or personal experience.


                    To learn more, see our tips on writing great answers.




                    draft saved


                    draft discarded














                    StackExchange.ready(
                    function () {
                    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fiot.stackexchange.com%2fquestions%2f3714%2fcontrolling-normal-bulbs-brightness-using-sonoff-devices%23new-answer', 'question_page');
                    }
                    );

                    Post as a guest















                    Required, but never shown





















































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown

































                    Required, but never shown














                    Required, but never shown












                    Required, but never shown







                    Required, but never shown







                    Popular posts from this blog

                    Måne

                    Storängen

                    VLT Carioca