Announcement

Collapse
No announcement yet.

H801 WiFi LED RGB 5 channel upgrade for use with mcsMQTT

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    H801 WiFi LED RGB 5 channel upgrade for use with mcsMQTT

    Just a quickie DIY on upgrading the H801 LED RGB 5 channel WiFi for use with Mosquitto and mcsMQTT

    Click image for larger version  Name:	H801WiFi.jpg Views:	1 Size:	102.0 KB ID:	1248931

    Hardware:

    - H801 LED RGB WiFi device (< $10 USD)
    - Pins for connectivity for JTAG and Jumper for firmware upgrading
    - USB JTAG programmer - USE 3.3VDC pins
    Click image for larger version  Name:	USBProgrammer.jpg Views:	1 Size:	58.2 KB ID:	1248955

    Step by step

    1 - solder on 6 pins

    Click image for larger version  Name:	solderpins2.jpg Views:	1 Size:	183.4 KB ID:	1248949

    2 - software utilized for Windows 7/10 or Ubuntu 18.04 ==> Visual Studio Code / PlatformIO

    Installed it here on Windows 7 Pro 64 bit, Windows 10 Pro 64 bit and Ubuntu 18.04 LTS 64 bit with no issues.

    Click image for larger version  Name:	PlatformIO-VisualStudioCode.jpg Views:	1 Size:	33.5 KB ID:	1248960

    3 - Updating firmware

    A - put a jumper on J3

    B - connect RX, TX, GND and 3.3 pins from controller to USB programmer. Make sure you utilize 3.3VDC pins.

    C - plug in your USB programmer. The device will boot in in flash mode.

    D - Per Tinkerman's review here ==> A closer look at the H801 LED WiFi Controller

    git clone hxxps://github.com/xoseperez/espurna
    cd espurna/code
    pio run -e h801-debug -t upload

    E - another easy and fast way to do this in Ubuntu Linux is to download the bin file here ===> espurna-1.13.1-huacanxing-h801.bin

    F - install esptool ==>

    pip install esptool

    G - type (note make check to make sure your USB programmer is at ttyUSB0)

    esptool.py --port /dev/ttyUSB0 write_flash -fs 1MB -fm dout 0x0 espurna-1.13.2-huacanxing-h801.bin

    Wait until it is finished flashing. The is fastest and easiest way if you do not want to modify the code.

    H - unplug USB programmer and move jumper off the two pins.

    I - plug in USB programmer

    J - The device will be in AP mode. Connect to the AP. SSID password is fibonacci

    K - go to web page 192.168.4.1 . login with admin and password fibonacci.

    L - configure you WAP stuff and here I used a static IP and configured NTP.

    Click image for larger version  Name:	RGB.jpg Views:	1 Size:	41.4 KB ID:	1248968

    M - configured device for one channel - warm white.

    Click image for larger version  Name:	WW.jpg Views:	1 Size:	26.5 KB ID:	1248969

    N - configure MQTT in mcsMQTT


    Click image for larger version  Name:	mqtt.jpg Views:	1 Size:	26.6 KB ID:	1248992


    xxxxxxxxxxxxxxxxxxx
    Last edited by Pete; September 24, 2018, 05:48 AM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    #2
    Testing today connected a test strip to channel (01234) 4. Works fine.

    Note: that the + (positive) LED connection goes to VCC and the - (negative) connection goes to WW.

    Channels available are:

    R - channel 0
    G - channel 1
    B - channel 2
    C - channel 4 white
    D - channel 5 warm white

    and up to 4 AMPs per channel.

    In this picture have it dimmed to around 3 (0-255) and its glowing but you cannot tell from the picture.

    Click image for larger version  Name:	RGB3.jpg Views:	1 Size:	98.9 KB ID:	1249167

    If I power off and on the RGB device it remembers last dim value. Same if I use the relay button.

    Michael McSharry

    I want to change the slider value from 0 to 255 to 1 to 100. How would I do that?

    When tweaking the variables I cannot put in graphics for status as it shows that it is not allowed.

    How can I change this?

    Click image for larger version  Name:	RGB2.jpg Views:	1 Size:	38.4 KB ID:	1249165

    Found a small RGB test strip to test with. Might as well test RGB even though I probably will never install RGB lamps here.

    Putting a diffuser on the little RGB test strip and making up a tiny warm and white white with diffuser test strip. It is too bright to play with and bugs me now.
    Last edited by Pete; September 24, 2018, 02:35 PM.
    - Pete

    Auto mator
    Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
    Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
    HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

    HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
    HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

    X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

    Comment


      #3
      Connected little mini bottom WW (white white) and top W (warm) strips and two mini RGB strips to the $8.00 USD RGB controller to test all 5 channels. Works great.

      Not sure though here if I will be using RGB.

      Might utilize the controller for 5 channels (48 watts each) of outdoor LED lamps. Configuration was left at using 12VDC LED lamps outside in to zones and each zone (pair) of zones was connected to a DIN mounted MeanWell 12VDC transformer and controlled by one UPB relay.



      Click image for larger version  Name:	RGB2.jpg Views:	1 Size:	49.6 KB ID:	1250194

      xxxxxx
      - Pete

      Auto mator
      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

      Comment


        #4
        Originally posted by Pete View Post
        Testing today connected a test strip to channel (01234) 4. Works fine.


        Michael McSharry

        I want to change the slider value from 0 to 255 to 1 to 100. How would I do that?

        When tweaking the variables I cannot put in graphics for status as it shows that it is not allowed.

        How can I change this?


        Putting a diffuser on the little RGB test strip and making up a tiny warm and white white with diffuser test strip. It is too bright to play with and bugs me now.
        Pete,

        If you click the button under the "ref" column with the device number it opens a page of settings. Uncheck NO_GRAPHICS_DISPLAY to allow setting graphics (I believe it's checked by default) and make sure SHOW_VALUES is checked to allow editing values in the Device settings.

        Great project, I plan to purchase one or two of these myself. Testing with a SONOFF Basic currently, have VSC and PlatformIO installed and working.

        Comment


          #5
          Thank you Martin. Testing this afternoon configured a variable per channels 0,1,2,3,4 and goofing around with color values now even though I will probably not use them.

          Click image for larger version

Name:	colors.jpg
Views:	721
Size:	49.2 KB
ID:	1250201

          Click image for larger version

Name:	rgb.jpg
Views:	711
Size:	37.3 KB
ID:	1250202

          xxxxx
          - Pete

          Auto mator
          Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
          Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
          HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

          HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
          HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

          X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

          Comment


            #6
            Posting more pictures here for a new add to the H801 RGB controller which was done by John modifying a MagicHome controller with an on/off and pot connecting to GPIO 0, 2 and 4.

            Click image for larger version  Name:	H801GPIO.jpg Views:	1 Size:	73.0 KB ID:	1251002Click image for larger version  Name:	exp8266.jpg Views:	1 Size:	59.2 KB ID:	1251003

            John's add of an on/off and dimmer pot using GPIO 0, 2 and 4 video.



            xxxxxxx
            Last edited by Pete; October 3, 2018, 12:06 AM.
            - Pete

            Auto mator
            Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
            Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
            HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

            HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
            HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

            X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

            Comment


              #7
              Pete
              Sorry for opening up an older topic,
              I have tried for hours and hours to get the same result but further as have it working with mqtt by sending commands i can't get.
              i mean this , the sliders/buttons/toggle switches are the ones i cant seem to get working.

              Click image for larger version  Name:	fetch?id=1250202&amp;d=1538167855.jpg Views:	0 Size:	53.9 KB ID:	1441302


              i have made a video of what i am doing, can someone see where i am going wrong ?
              on the end of the video i get a control tab , but it is empty.



              hope someone see's it because i am almost about to give up for now haha.

              Comment


                #8
                Just off the top of my head, you need MQTT topics in the PUB fields that are blank. That's how the plugin uses the controls to send commands back to the device. I don't think you'll get any controls until you have values there.

                Comment


                  #9
                  I concur with mterry63 analysis. With ESPurna the pub topic will be the same as the sub topic with a /set suffixed. You can see examples earlier in this thread.

                  With your setup the plugin has no reason to provide control sliders or button since there is nothing specified to publish when the button or slider will be used.

                  Comment


                    #10
                    Thanks both of you, i just couldn't figure out why and never tried this...
                    It works instantly...
                    Well thats about half a day spent figuring out why haha.

                    Comment


                      #11
                      Good news Vincenttor !!

                      - Pete

                      Auto mator
                      Homeseer 3 Pro - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e 64 bit Intel Haswell CPU 16Gb
                      Homeseer Zee2 (Lite) - 3.0.0.548 (Linux) - Ubuntu 18.04/W7e - CherryTrail x5-Z8350 BeeLink 4Gb BT3 Pro
                      HS4 Lite - Ubuntu 22.04 / Lenovo Tiny M900 / 32Gb Ram

                      HS4 Pro - V4.1.18.1 - Ubuntu 22.04 / Lenova Tiny M900 / 32Gb Ram
                      HSTouch on Intel tabletop tablets (Jogglers) - Asus AIO - Windows 11

                      X10, UPB, Zigbee, ZWave and Wifi MQTT automation-Tasmota-Espurna. OmniPro 2, Russound zoned audio, Alexa, Cheaper RFID, W800 and Home Assistant

                      Comment


                        #12
                        I do not mean to invade the topic but since it is based on the same arduino board.
                        I have some ESP8266 boards running, also "made" or draw a 16 channel pcb led dimmer board with some mosfets.
                        Tried to make it a sort of stackable so you can put another board ontop of the first if you need more channels.
                        Click image for larger version

Name:	pcb.jpg
Views:	466
Size:	212.4 KB
ID:	1444209

                        The way i set the pwm channels is by topic and then the number for example :

                        ESP/PWM/14 1023,10000

                        14 stands for the gpio 1023 the dim level and the last is for the fade time ( can also be done without fade time setting)


                        Now can i make a slider but this is allot of work how i worked around this:
                        That is making events for every dim percentage i like for example:
                        10% event = ESP/PWM/14 100
                        20% event= ESP/PWM/14 200
                        30% event= ESP/PWM/14 300

                        and so on.

                        I hoped it was possible to do it like the way above here, setting it in mscmqtt and in the extra settings option "slider"

                        But what is different in this case is that the espeasy software does not show a topic like this as the h801 does:
                        Click image for larger version

Name:	fetch?id=1249165&amp;d=1537798287.jpg
Views:	413
Size:	59.2 KB
ID:	1444210


                        Is there a simple way to do this, make a topic which i then can set as a slider and change the steps that it can make for the dim level ?


                        Comment


                          #13
                          I interpret what you are asking is how can you use the mcsMQTT Control/Status UI slider and be able to send payloads of 100, 200 etc.

                          The slider has a value range of 0 to 100.

                          If this is what you are asking then in the Publish Template textbox use an expression. For the examples you show above this would be:

                          <<$$VALUE:*100>>

                          This will give you payloads in the range of 0 to 10000.

                          If your max value is 1023 the expression would be <<$$VALUE:*10.23>>

                          The << and >> indicate an expression that needs to be evaluate rather than using the literal text.
                          The $$VALUE: is the HS DeviceValue that is being commanded with the slider.
                          The * and 100 or 10.23 are the numerical part of the expression.

                          Comment


                            #14
                            Michael McSharry

                            Thank you this works and is what i mean't

                            made a video for someone else how i have done it.

                            Comment

                            Working...
                            X