logo elektroda
logo elektroda
X
logo elektroda

[BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash

yvesdemuyter 4092 10
ADVERTISEMENT
  • #1 20419398
    yvesdemuyter
    Level 3  
    Melitec 8251-01-1-CM D110 Ceiling Light


    I successfully flashed this device with OpenBeken using tuya-cloudcutter, teardown photos will follow.
    This device is sold at Aldi as a "LightZone" device.

    The documentation referred to the Melitec brand and then I found this, which looks identical:
    https://www.leuchtenservice-melitec.de/LED-Sm...kenleuchte-D110-schlankes-Design/8251-01-1-CM

    I have a second device like this that I have transplanted an ESP chip on it so that I can experiment with the handy and clean TuyaMCU commands of Tasmota.
    DpId 20: Boolean Toggle On/Off
    DpId 21: (write only, not listed in cmd 0x08) Scene
    DpId 22: Global dimmer (0-1000)
    DpId 23: Colour temperature (0-1000)
    DpId 26: Weird field, Stays on 0, when set to 1, does a toggle of DpId 20, any other value doesn't do anything

    However this is a TuyaMCU device and following script in autoexec.bat doesn't work:
    startDriver TuyaMCU
    setChannelType 1 toggle
    setChannelType 2 dimmer
    tuyaMcu_setDimmerRange 0 1000
    linkTuyaMCUOutputToChannel 20 1 1
    linkTuyaMCUOutputToChannel 22 2 2

    TuyaMCU isn't even started once the device is rebooted, so I suspect something is wrong.
    When I perform "startDriver TuyaMCU" in the Config -> execute custom command, I start to see TuyaMCU messages in the logs that seems like a good communication.
    When I perform "setChannelType 1 toggle" in execute-custom-command, it says
    "Error:CMD:cmd setChannelType 1 toggle NOT found (args ) "

    I'm puzzled with OpenBeken.
  • ADVERTISEMENT
  • #2 20419714
    p.kaczmarek2
    Moderator Smart Home
    Very strange... I have checked now and commands seem to be working for me as always in both basic console and in app:
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    Not having setChannelType would mean that you might be running into the Safe Mode. Please let your device run for at least 30 seconds and then reboot and check again.

    Safe mode is activated when your device fails to do full reboot (run for more than 30 seconds, delay is customizable) five times in a row. In safe mode, only basic commands are available. Safe mode is used to recover device from bad/breaking config state.
    Helpful post? Buy me a coffee.
  • #3 20419933
    yvesdemuyter
    Level 3  
    Even startDriver TuyaMCU doesn't work in the webapp console...

    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash

    Prior to this, the device was on for 20 minutes and I did a reboot
  • ADVERTISEMENT
  • #4 20419969
    p.kaczmarek2
    Moderator Smart Home
    How are you doing that, which version?
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    How are you sending the command? Do you do that with some kind of "hard space" special character between "startDriver" and a driver name?

    What "startDriver" without any arguments gives you?
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash


    You know what? See:
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    why in my case, when I enter incorrect command, the command is still correctly split into the command and argument, and for you, the command entirely is shown as single token and args are empty?

    It really looks like you have some strange non-standard whitespace encoding.
    Helpful post? Buy me a coffee.
  • #5 20419984
    yvesdemuyter
    Level 3  
    Hello,

    I did a copy-paste from another post here since that was a good example.
    https://www.elektroda.com/rtvforum/topic3898502.html

    It looks like copy-paste from there introduces bad characters?
    I tried copying one line, like
    linkTuyaMCUOutputToChannel 20 1 1

    and it doesn't perform, but when I type the line myself, it works...
  • #6 20419988
    p.kaczmarek2
    Moderator Smart Home
    This explains a lot, but....
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    It still works for me after copy/paste:
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    Can you help me investigate?
    Use this page:
    https://www.utilities-online.info/ascii-to-hex
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    I get 0x20 here, a space, what do you get there?
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash

    or use this:
    http://www.mauvecloud.net/charsets/CharCodeFinder.html
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #7 20420012
    yvesdemuyter
    Level 3  
    Looks like indeed the problem, spaces are not 0x20:

    linkTuyaMCUOutputToChannel 1 1 1
    -->
    6c 69 6e 6b 54 75 79 61 4d 43 55 4f 75 74 70 75 74 54 6f 43 68 61 6e 6e 65 6c a0 31 a0 31 a0 31

    Firefox 108.0.2 (64-bit) on Windows 11

    Added after 2 [minutes]:

    When I press the "Copy to clipboard" button, it does the same thing:

    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash

    Added after 21 [minutes]:

    Please beware, in that black&blue page "startDriver TuyaMCU" worked, but not on the log-page of the webapp, nor in autoexec.bat ! Maybe the HTML text-entry field did some cleanup conversion because it is a single-line textarea ?

    Yves
  • ADVERTISEMENT
  • #8 20420145
    p.kaczmarek2
    Moderator Smart Home
    I have added a temporary fix for that on the firmware side, now 0xA0 is treated as space.
    https://github.com/openshwprojects/OpenBK7231...mmit/1b26c9a4b1ca6a15f4d150f44ae73054721cc848
    It applies to all commands now.
    Can you recheck?
    Helpful post? Buy me a coffee.
  • #9 20422105
    yvesdm3000
    Level 3  
    Tried latest build and seems fixed. Thanks !
  • #10 20422261
    p.kaczmarek2
    Moderator Smart Home
    Well, to be clear, we tested on multiple browsers and we never managed to get 0xA0 spaces out of Elektroda, so it might be something on your browser, but I still added a fix for that in firmware, just to be on the safe side.
    Helpful post? Buy me a coffee.
  • #11 20424447
    p.kaczmarek2
    Moderator Smart Home
    I am adding this device to templates list, but would be it possible to get some real photos of this device, or photos from inside of the PCB?

    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    [BK7231] Melitec 8251-01-1-CM D110 LightZone Ceiling Light: Tuya MCU & OpenBeken Flash
    Product number: 8251_01_1_CM
    Quote:

    TECHNICAL DATA

    Voltage: 230 V~, 50 Hz
    Power consumption: approx. 17 W
    : II, protective insulation
    Dimmable: with the "Smart Life" app
    Dimensions: approx. 38 x 38 x 3.5 cm (W x L x H)

    Lamp : 12.6 W: 168 x 0.075 W LED per light color
    Luminous flux: approx. 1,000 lumens
    Light colour: adjustable from approx. 2,700 warm white to 6,000 K cold white Color
    rendering: very good, Ra > 90
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the Melitec 8251-01-1-CM D110 Ceiling Light, which has been successfully flashed with OpenBeken using tuya-cloudcutter. Users are experiencing issues with TuyaMCU commands not functioning as expected, particularly in relation to the autoexec.bat script. It was identified that copy-pasting commands from other sources introduced non-standard whitespace characters, causing command recognition failures. A temporary firmware fix was implemented to treat these characters correctly, resolving the issue for most users. Additionally, there is a request for internal photos of the device for template purposes.
Summary generated by the language model.
ADVERTISEMENT