Elektroda.com
Elektroda.com
X

Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

joelstevens1101 3285 12
  • This device was a challenging one to get working perfectly, but with some fantastic support from p.kaczmarek2 and a few firmware revisions we got it working perfectly. The following is a teardown and programming of the device as well as the required Home Assistant integration. It is available in Australia from Kmart. However there are many of what appear to be the exact same model available under a number of different brandings online.

    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Genio Galaxy Lamp
    This device differs from most normal ESP devices. It has 3 main componenets, and RGB led/driver, laser and a motor.
    The basic operation is that the RGB led is projected through a calleidoscope like lense, which is then projected through a fresnel style glass plate and finally out of the unit through a magnification lense. What this achieves is a coloured cloud like image, akin to that of a nebula or galaxy. The laser, which looks to be fairly high power also projects through its on caleleidoscope style tube which then is projected through a diffusion lense and out of the unit. This creates the stars of the "galaxy". Where it gets interesting is that both the fresnel lense and calleidoscope tube for the laser have a gear attached to them. These gears mesh with each other and are geared down to be driven by the motor. This achieves an opposite rotation of the laser and RGB led, i.e. the stars spin clockwise and the LED counter-clockwise!
    It makes for a fantastic effect on the ceiling of any room.

    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Interior
    After removing 4 screws from the outside of the housing, the device can be slpit in half. There is a cable between the Button board and the main PCB.
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Remove 3 screws from the PCB to access programing headers.
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    3rd screw hidden behind motor and laser connectors.
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    WB3s Chip (BK7231T)
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    TX and RX Pins for programing. (Bottom of PCB)
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    3v3 and GND pins for Programing. (Bottom of PCB)
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Programming of the BK7321T
    Programming BK7231T
    Download the last batch binaries and BKwriter 1.60 from:
    Link
    All operations are performed after disconnecting the product from the electrical network.
    Depending on your programmer, connect 3v3, GND RX and TX to their corresponding headers on the PCB. Examples of this can be seen in many other forum posts. Unfortunately I did not take any photos at the time.
    Programming
    Connect the USB UART converter, you may need to connect to the 5v pad depending on your programmer as some don't produce enough current to correctly start the Wifi module.
    Run BKwriter 1.60. (Link)
    Make a copy of the original batch (Read button), programming is done in the same way, we just first choose what batch we want to upload.
    Choose what batch to upload (here, select the UA versions) and start programming (waiting for BK booting):
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Now, as long as BKwriter is actively waiting for the BK boot signal, temporarily connect CEN to ground (here it is just on the USB dongle pin), literally for a second. Only then will the actual programming begin:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Programming Success:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    The BK access point is already visible:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Connect to the WiFi point created by the BK7231T.
    Here you may need to set our WiFi to a rigid IP, e.g. 192.168.4.10, in case DHCP does not work:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Open the page 192.168.4.1:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    In Config, set your wifi credentials (e.g. information on our home WiFi):
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    After connecting to your WiFi, reset the system. You may also need to disconnect the power supply temporarily or wait a minute for the device to join our network. Its new IP can be found on our router in the list of DHCP clients:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Pin Configuration
    Once connected to the device. Click "Config" and then "Configure Module"
    Your settings should be as follows. This may vary from device to device and depending on brand so you may have to experiment.
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Click Save.
    Next click "Configure General" It should be set like the following:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Thank you to p.kaczmarek2 for adding a few custom flags and settings to the firmware to get this working perfectly!
    Click Save.
    Finally we need to run a script on the device to enable proper control in Home Assistant.
    On the home screen of the device click "Launch Web Application"
    Go to the "Filesystem" tab
    Click the "Create File" button
    Create a file called "autoexec.bat"
    In the editing box paste the following script:
    startDriver PWMToggler
    toggler_channel0 4
    toggler_name0 Laser
    
    toggler_channel1 5
    toggler_name1 Motor
    
    
    // this will make disabling LED also disable both togglers (laser and motor)
    addEventHandler LEDState 0 backlog toggler_enable0 0; toggler_enable1 0; 
    // this will make enabling LED also enable both togglers (laser and motor)
    // Comment out if you don't want it!
    addEventHandler LEDState 1 backlog toggler_enable0 1; toggler_enable1 1; 
    
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Click "Save, Reset SVM and Run the file as script thread"
    Restart the device.
    This script enables the PWM toggler.
    PWM toggler provides you an abstraction layer over PWM channels
    and allows you to enable/disable them without losing the set PWM value. The script also adds the ability to have RGB, laser and motor toggle via only toggling the RGB control. Bassically it tells the controller "if LEDState changes to 0, do a enable/disable on toggler."
    You can choose to comment this part of the script out if you would prefer not to have it activated. To enable it at a later time just edit the scipt via the web application and un-comment the "addEventHandler" sections.
    PWM toggler was created to support this lamp with RGB LED and PWM laser and PWM motor. This allows Home assistant to recognise the device as 3 light entities, giving full control over each aspect of the device whilst remebering the values they are set at.

    Your new home screen should look like the following:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Home Assistant Integration
    Providing you have MQTT correctly set-up in Home Assistant, copy the following into your MQTT devices section of your configuration:
      light:
        - unique_id: "OpenBK7231T_760BF030_galaxy_light"
          name: "GenioRGB"
          rgb_command_template: "{{ '%02x%02x%02x' | format(red, green, blue)}}"
          rgb_state_topic: "obk760BF030/led_basecolor_rgb/get"
          rgb_command_topic: "cmnd/obk760BF030/led_basecolor_rgb"
          rgb_value_template: "{{ value[0:2]|int(base=16) }},{{ value[2:4]|int(base=16) }},{{ value[4:6]|int(base=16) }}"
          #rgb_value_template: "{{ '%02x%02x%02x'| format(red, green, blue) }}"
          command_topic: "cmnd/obk760BF030/led_enableAll"
          state_topic: "obk760BF030/led_enableAll/get"
          availability_topic: "obk760BF030/connected"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obk760BF030/led_dimmer"
          brightness_scale: 100
          brightness_state_topic: "obk760BF030/led_dimmer/get"
          brightness_value_template: "{{value}}"
    
        - unique_id: "OpenBK7231T_760BF030_galaxy_laser"
          name: "GenioLaser"
          command_topic: "cmnd/obk760BF030/toggler_enable0"
          state_topic: "obk760BF030/toggler_enable0/get"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obk760BF030/toggler_set0"
          brightness_scale: 100
          brightness_state_topic: "obk760BF030/toggler_set0/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1
    
        - unique_id: "OpenBK7231T_760BF030_galaxy_motor"
          name: "GenioMotor"
          command_topic: "cmnd/obk760BF030/toggler_enable1"
          state_topic: "obk760BF030/toggler_enable1/get"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obk760BF030/toggler_set1"
          brightness_scale: 100
          brightness_state_topic: "obk760BF030/toggler_set1/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1

    The Unique ID will be specific to your device and you will need to replace the example code with your device ID. This can be found on the Home Assistant Configuration page of the device. Only copy the Unique ID from the Home Assistant Configuration Page. The rest of the example configuration will not work in Home Assistant:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide
    Adjust the unique ID to suit each part of the device e.g. OpenBK7231T_760BF030_galaxy_light, OpenBK7231T_760BF030_galaxy_laser and OpenBK7231T_760BF030_galaxy_motor. 3 of the same Unique IDs will not work and Home Assistant will only detect 1 entity.

    Once you have restarted Home Assistant you should have 3 entities named light.GenioRGB, light.GenioLaser and light.GenioMotor. Keep in mind changing the name of these entities in your configuration willl change the name that they are displayed with.
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    Operation
    You should be able to select any RGB colour from the colour wheel, turn on the laser to any brightness and adjust the motor to any speed. Something to note is that the Laser and Motor are electrically connected within the device. This means that setting the laser to maximum brightness with the motor off will result in a dim laser output. Activating the motor immediately increases the laser brightness. The motor can spin extremely slow and this will still allow full brightness of the laser. I assume this is an effort to prevent the laser from damaging the internals of the device and outputing a static beam. Finally the button on the side of the device has been set as a master ON/OFF button for the lamp. It should retain all brightness values when toggled. You can change the function of this button by changing the assignment of the button channel on the module configuration page.

    Your device should be fully operational now!
    Again a huge thanks to p.kaczmarek2 for the firmware and for the modifications to get this device working flawlessly!

    Cool? Ranking DIY
    About Author
    joelstevens1101
    Level 1  
    Offline 
    joelstevens1101 wrote 1 posts with rating 8. Been with us since 2022 year.
  • #2
    p.kaczmarek2
    Moderator Smart Home
    Thank you for writing the guide, it turned out great.

    This device was a very interesting to support. I have never seen a device using PWMs for motor and laser before, especially in conjunction with RGB LED.

    I had to add a special flag for this device, because currently OpenBeken is using a number of PWM roles to determine whether a device is a single color dimmer, or a CW, or RGB, or RGBCW, just like Tasmota...
    And in case of your device OpenBK recognized it as RGBCW and tried to treat Laser and Motor as C & W LEDs!
    That's why the extra flag was needed, to force RGB-only mode.
  • #3
    wolfieeewolf
    Level 9  
    I have followed the setup instructions and have managed to get my device working as expected. After playing around I have found that you don't have to add all the flags to get the device to work correctly. I only have Flags 3, 10, 20 and 27 turned on and the device appears to function as expected.

    I've had to modify the Home Assistant code a bit to get it to work with my setup. Feel free to try this if you having issues.

      light:
        - unique_id: "OpenBK7231T_760BF030_galaxy_laser"
          name: "GenioLaser"
          command_topic: "cmnd/obk760BF030/toggler_enable0"
          state_topic: "obk760BF030/toggler_enable0/get"
          payload_on: "1"
          payload_off: "0"
          brightness_command_topic: "cmnd/obk760BF030/toggler_set0"
          brightness_scale: 100
          brightness_state_topic: "obk760BF030/toggler_set0/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1
    
        - unique_id: "OpenBK7231T_760BF030_galaxy_motor"
          name: "GenioMotor"
          command_topic: "cmnd/obk760BF030/toggler_enable1"
          state_topic: "obk760BF030/toggler_enable1/get"
          payload_on: "1"
          payload_off: "0"
          brightness_command_topic: "cmnd/obk760BF030/toggler_set1"
          brightness_scale: 100
          brightness_state_topic: "obk760BF030/toggler_set1/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1


    As the light was detected automatically on my setup I took that part out as it was just doubling up. It is a bit of a pain that now have 3 entities on my overview tab. I don't really use the laser and guess I could just remove those options.

    It's interesting to note that if you just leave the default MQTT and turn off flag 20 you can control the laser and motor via the temperature tab. unfortunately, the control of the laser and motor appear to work opposite of each other when you move the slider. IE the laser get dimmer when you move it to the "Warm" setting but the motor gets faster and vice versa when you move the slider to "Cool"

    You can change Pin 6 to PWM_n and this does fix the opposite issue but then create another one as the motor spin to high speed when the laser is at full brightness and slows down when the laser is at low brightness. You also have to deal with the temperature slider and it would be nice to have it like the original function of the device. the other issue is that when you turn the device off the motor turns on.

    The other issue in doing the above is you can only turn the laser on and off and not have any of the RGB colours so it was not really the best solution in the end.

    I tried splitting the temperature slider into warm and cold sliders but so far have not had much luck. I wonder if there would be a way to get OpenBK to split the channels so home assistant picks them up as separate sliders. Not sure how you would achieve this and I would say you couldn't have the RGB going at the same time as the laser and motor. So again probably not a solution

    I have tried also tried to set the channel types to different things to see if I can trick home assistant into thinking those channels are something else but I couldn't get it to bring up anything else and I assume that is because home assistant sees it as a light and those options are not available. I guess making a custom entity would be a way but getting it to work could take some time.

    I have also been playing around with making some custom effects for this device so that when you press the button on the side it cycles through a few different effects. I have WLED installed on an ESP device and have been trying to get it to run a few lightning effects using DDP. So far some are working and some are not. When I get it worked out I'll post my scripts.
  • #4
    p.kaczmarek2
    Moderator Smart Home
    It's very good to hear you got that working,
    wolfieeewolf wrote:

    I have tried also tried to set the channel types to different things to see if I can trick home assistant into thinking those channels are something else but I could get it to bring up anything else and I assume that is because home assistant sees it as a light and those options are not available. I guess making a custom entity would be a way but getting it to work could take some time.

    the simplest way would be to write the YAML manually. The Home Assistant discovery is not recommended for the custom/non-standard devices. With manual approach, you can access channels however you want.
  • #5
    wolfieeewolf
    Level 9  
    Had a typo. Was meant to be I couldn't get the channel types to work or send info to home assistant. Not sure that it would help anyway. WIll see how I go with making a custom YAML script for this device.
  • #6
    jnh5383
    Level 1  
    EDIT: Problem fixed - Wasn't thorough enough! Didn't realize that the three entities wouldn't show up under the MQTT integration. Found them under the Entities tab in "Devices & Services". Everything is there, naming and all. Hope this helps someone!

    Awesome to see this device is supported! Flashed it and got the primary light to pop up in Home Assistant. However, I cannot get the laser and motor to show up in HA no matter what I do.

    I tried altering the provided example with my unique device ID, creating this:
    mqtt:
      light:
        - unique_id: "OpenBK_GalaxyProjector_light"
          name: "Galaxy Light"
          rgb_command_template: "{{ '%02x%02x%02x' | format(red, green, blue)}}"
          rgb_state_topic: "obkFF1ED38C/led_basecolor_rgb/get"
          rgb_command_topic: "cmnd/obkFF1ED38C/led_basecolor_rgb"
          rgb_value_template: "{{ value[0:2]|int(base=16) }},{{ value[2:4]|int(base=16) }},{{ value[4:6]|int(base=16) }}"
          #rgb_value_template: "{{ '%02x%02x%02x'| format(red, green, blue) }}"
          command_topic: "cmnd/obkFF1ED38C/led_enableAll"
          state_topic: "obkFF1ED38C/led_enableAll/get"
          availability_topic: "obkFF1ED38C/connected"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obkFF1ED38C/led_dimmer"
          brightness_scale: 100
          brightness_state_topic: "obkFF1ED38C/led_dimmer/get"
          brightness_value_template: "{{value}}"
    
        - unique_id: "OpenBK_GalaxyProjector_laser"
          name: "Galaxy Laser"
          command_topic: "cmnd/obkFF1ED38C/toggler_enable0"
          state_topic: "obkFF1ED38C/toggler_enable0/get"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obkFF1ED38C/toggler_set0"
          brightness_scale: 100
          brightness_state_topic: "obkFF1ED38C/toggler_set0/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1
    
        - unique_id: "OpenBK_GalaxyProjector_motor"
          name: "Galaxy Motor"
          command_topic: "cmnd/obkFF1ED38C/toggler_enable1"
          state_topic: "obkFF1ED38C/toggler_enable1/get"
          payload_on: 1
          payload_off: 0
          brightness_command_topic: "cmnd/obkFF1ED38C/toggler_set1"
          brightness_scale: 100
          brightness_state_topic: "obkFF1ED38C/toggler_set1/get"
          brightness_value_template: "{{value}}"
          retain: true
          qos: 1


    This looks correct to me, and I pasted it into my configuration.yaml in HA. However, the laser and motor still don't show up as light entities, and the main color wheel that alters the galaxy color has temperature control that dosen't work properly.

    Here's what the device looks like in Home Assistant:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    And here's the only light entity provided, note that the temperature wheel is available when it shouldn't be:
    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide


    Has anyone else ran into this issue, or can link an article that explains further about attaching custom configuration OpenBeken devices to Home Assistant?

    I really appreciate the help, and thank you for all the hard work!
  • #7
    wolfieeewolf
    Level 9  
    I'm experiencing a similar issue.

    The temperature control works, but there's a problem: when it's cold, the laser and motor turn off, while in warm temperatures, the opposite happens. It seems that these channels need to be separated and assigned to sliders. However, achieving this without coding a dedicated device specifically for this purpose poses a challenge. Although reaching out to the Home Assistant forums might be an option, it's uncertain whether there are enough users with the same device to prompt their assistance. Regardless, it's worth a shot.

    Using the OP's custom MQTT code, I managed to make the motor and laser visible. However, they appear as separate entities on my Home Assistant overview dashboard. Since I don't often use the laser, I've omitted that part for now.

    Unfortunately, I don't see a straightforward solution to consolidating the motor and laser entities within Home Assistant, unless the platform itself introduces features like building custom light entities or incorporating a dedicated device for such cases.

    I'm not certain about the specifics of the Tuya integration, and there might be some crucial data that we lack. Although I don't have an unmodified device to verify, it could be worthwhile for someone to investigate this aspect before flashing using the Tuya IoT website.

    For those considering flashing this device, I recommend gathering this information beforehand, as it could greatly assist in setting up the device correctly.

    The only approach I've found that might work involves using something like Template Light. Although it appears user-friendly, I haven't had the chance to experiment with it. However, a challenge with this solution is that the MQTT data from OBK would still be sent to Home Assistant, so finding a way to prevent this transmission would be necessary.

    Since OBK currently lacks the capability to create custom MQTT setups, our options seem limited. While the OP's MQTT script did function, it did result in multiple entities. While having them combined would be preferable, it's uncertain whether this option will become available soon or even at all.

    It would be great to see OBK give us a way to create custom devices like this one and have the ability to send this data to home assistant. I do believe there is the option to create custom MQTT scripts coming but I am not sure what the timeline will be for that. For now we just have to play the waiting game.

    Added after 29 [minutes]:

    You could try to make a custom component in home assistant if you have the know-how. Creating custom components.

    It is a little beyond my level of skill and again I still think you will have the issue of OBK sending the MQTT data and getting a double up of devices. Until there is a way we can stop the MQTT data being sent then I don't really know of any other way.
  • #8
    p.kaczmarek2
    Moderator Smart Home
    Hello, it's nice to people are finding this new device support useful. I can try to help you to improve it further, but I don't have this device at hand so I can only help remotely. Can you be more specific from a technical standpoint why it happens:
    wolfieeewolf wrote:

    The temperature control works, but there's a problem: when it's cold, the laser and motor turn off, while in warm temperatures, the opposite happens. It seems that these channels need to be separated and assigned to sliders. However, achieving this without coding a dedicated device specifically for this purpose poses a challenge.

    Btw:
    wolfieeewolf wrote:

    achieving this without coding a dedicated device specifically for this purpose poses a challenge.

    I can code you a flag or a driver, as long as I have enough device understanding to help. I just need exactly to know what kind of modification you need to the source.

    Also, would the ability to do a custom (hand-edited) HA discovery yaml help with HA integration?
  • #9
    wolfieeewolf
    Level 9  
    p.kaczmarek2 wrote:
    Would the ability to do a custom (hand-edited) HA discovery YAML help with HA integration?


    This could help, but I still think we would have the issue of the device having separate entities in Home Assistant.

    The issue is that the laser and motor register as a colour temperature slider in Home Assistant. If there is a way to split the cold and warm channels apart, then we could control the laser and motor separately.

    Genio Galaxy Smart Lamp - BK7231T - Teardown + Guide

    The behaviour at the moment is when setting the colour temperature to 100% warm or 2000K, it turns the motor on to 100% but turns the laser off. Setting the colour temperature to 100% cold or 6493K turns the laser on 100% and the motor off.

    The behaviour I would like to see is instead of a colour temperature slider, there are two sliders. One for the laser and one for the motor. They need to be combined with the RGB to make one component in Home Assistant.

    I'm not sure a custom yaml from OBK would achieve this, but it's worth giving it a go. This would solve problems with other devices I have if we are able to send our own yaml instead of the OBK auto-generated one. It would also be great if there was an option to turn off the sending of the auto-generated yaml as well so we can make our own custom yaml in home assistant should we need to.

    See here for a good video that explains how it works.

    Would be nice to have all the functions that the app can do in OBK but I think just getting the laser and motor to be on different sliders is the most important thing for now.
  • #10
    p.kaczmarek2
    Moderator Smart Home
    wolfieeewolf wrote:

    The issue is that the laser and motor register as a colour temperature slider in Home Assistant. If there is a way to split the cold and warm channels apart, then we could control the laser and motor separately.

    But they both would need to have also option to enable and disable? So slider + toggle for on and off?
  • #11
    wolfieeewolf
    Level 9  
    p.kaczmarek2 wrote:
    But they both would need to have also option to enable and disable? So slider + toggle for on and off?


    The sliders would be fine if 0 = off but toggles plus sliders would probably be the best way to handle it. Then at least you would know they are truly off
  • #12
    alexreddy78
    Level 1  
    >>20696686
    Dear Developer,

    Is it possible to turn off buttom LED on device, it's always on, no matter if Galaxy Star is on or off. I didnt find any topic to send for turn it off.

    BRGDS
  • #13
    p.kaczmarek2
    Moderator Smart Home
    Hello, is the bottom LED connected to some GPIO of the BK7231? Or is it connected to VDD and GND directly (with resistor)?