logo elektroda
logo elektroda
X
logo elektroda

[BK7231T/WBLC5] How to attach SHT30 sensor to smart Tuya LED?

yuretskor 6702 97
ADVERTISEMENT
  • #91 21204711
    p.kaczmarek2
    Moderator Smart Home
    Yes yes, sorry, permission granted! And it seems it worked that time! All builds are successfull. https://github.com/openshwprojects/OpenBK7231T_App/pull/1333
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #92 21204872
    yuretskor
    Level 6  
    @p.kaczmarek2 Seriously, wouldn't it have been easier for you to give me a file with the TM 1637 driver included? I don't quite understand what I'm clicking on the site to create the firmware and I still have to wait for your approval. It's long and complicated. If anything, I'm sorry.

    Added after 24 [minutes]:

    Somehow I connected it, there is a shift of one sign. How to fix it?

    Added after 47 [minutes]:

    When I enter the command TMGN_print 0 0 1234 On the display I see what is in the photo below.
    LED display showing the number 321 on a wooden desk.
  • ADVERTISEMENT
  • #93 21205344
    p.kaczmarek2
    Moderator Smart Home
    If digits order is not standard, then you need to try one of many TMGN_Map combinations.
    Start with:
    
    TMGN_Map 01234567
    TMGN_print 0 0 1234 
    

    check result, of course do print on screen after doing map command.
    If still wrong, try:
    
    TMGN_Map 32104567
    TMGN_print 0 0 1234 
    

    etc, etc.
    Here are docs:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/commands.md

    This is because the order of digits is not standarized in those modules.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #94 21208643
    yuretskor
    Level 6  
    @p.kaczmarek2 I don't know what the problem is, but the TMGN_map command doesn't work for me, or rather, with different combinations, the display changes from 321 to 32 and that's it. And if the TMGN_test command, it displays 1234 correctly and each time the command is sent, it shifts by three digits 3456 then 6789 and so on in a circle. And if I send the TMGN_print 0 0 1234 command, I see what's in the photo above.
    LED display showing the numbers 0123 on a wooden table.


    Added after 4 [minutes]:

    @p.kaczmarek2 and if I send the command TMGN_print 0 0 7654321 then I see 5672 on the screen Segment display showing the number 5672.

    Added after 40 [minutes]:

    If possible, help me via telegram, for faster communication. Nick yurets_kor
  • #95 21210101
    yuretskor
    Level 6  
    Bad idea with the display. In general, I'll throw the project back in the drawer.
  • ADVERTISEMENT
  • #96 21210175
    p.kaczmarek2
    Moderator Smart Home
    You should not use TMGN_test for production. Just use:
    
    TMGN_Map 32104567
    TMGN_print 0 0 1234 
    

    Find the TMGN_Map that makes TMGN_print show 1234 correctly, I've seen you did that?
    Helpful post? Buy me a coffee.
  • #97 21210995
    yuretskor
    Level 6  
    pkaczmarek2 I I tried entering the command TMGN_Map but the changes occur only once, subsequent times when the combination changes numbers nothing changes. Or after each input do I need to reboot? Today I can spin all day under your commands.
  • #98 21305381
    yuretskor
    Level 6  
    Since yesterday, the module stopped transmitting data via mqtt, in the logs I see that it uses a password, but I use the service without a password, and to save the configuration, you need to put some sign. Probably because of this, he stopped transmitting. If you leave the password blank, the previous one will be used.
    It is not possible to save an empty field. Could you help? Thank you
    
    Info:GEN:dhcp=0 ip=192.168.0.195 gate=192.168.0.1 mask=255.255.255.0 mac=84:e3:42:41:f8:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-80,ssid=K.Y.A,bssid=ae:15:a2:4c:02:a6,channel=2,cipher_type:CCMP
    Info:MAIN:Time 981, idle 207313/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:GEN:CHANNEL_Set channel 10 has changed to 210 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 21.000000 to channel 10 
    Info:GEN:No change in channel 11 (still set to 66) - ignoring
    
    Info:SENSOR:SHT3X_Measure: Temperature:21.0C Humidity:66%
    Info:MAIN:Time 982, idle 211407/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 983, idle 172131/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 2, socks 2/38 
    Info:MAIN:Time 984, idle 220851/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 985, idle 209036/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 986, idle 199669/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 987, idle 182554/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 988, idle 192972/s, free 83816, MQTT 0(61), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MQTT:mqtt_userName yurets.kor
    mqtt_pass 1234
    mqtt_clientID obk8C000000
    mqtt_host broker.hivemq.com:1883
    Info:MAIN:Time 989, idle 220875/s, free 83728, MQTT 0(62), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 990, idle 219968/s, free 83728, MQTT 0(62), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.0.195 gate=192.168.0.1 mask=255.255.255.0 mac=84:e3:42:41:f8:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-77,ssid=K.Y.A,bssid=ae:15:a2:4c:02:a6,channel=2,cipher_type:CCMP
    Info:MQTT:MQTT base topic is dirty, will reinit callbacks and reconnect
    Info:MQTT:MQTT_RegisterCallback called for bT obk8C000000/ subT obk8C000000/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk8C000000/ subT cmnd/obk8C000000/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk8C000000/ subT obk8C000000/+/get
    Info:MQTT:MQTT has pending reconnect in 4


    Added after 5 [minutes]:

    Removed the commands and connected. What's wrong?
    mqtt_broadcastInterval 2
    mqtt_broadcastItemsPerSec 5


    Added after 4 [minutes]:

    Although the problem is that the readings are static, as soon as the sensor changes readings, it connects and sends data

Topic summary

The discussion focuses on integrating an SHT30 temperature and humidity sensor with a smart Tuya LED lamp module based on the BK7231T processor, specifically the WBLC5 module. The user seeks firmware and configuration guidance to repurpose the lamp as a temperature and humidity meter. The OpenBeken firmware is recommended, with detailed instructions on flashing, pin assignments (notably PWM0/P6, PWM4/P24, PWM5/P26 for I2C and LED control), and UART1 usage for programming. The SHT30 sensor is connected via software I2C on UART1 pins (Rx1/Tx1), requiring driver activation and scripting in the device's web interface (autoexec.bat or LittleFS scripts) to initiate periodic measurements. MQTT integration is addressed, including channel type settings, data publishing intervals, and troubleshooting MAC address issues. LED control uses the SM2135 LED driver with RGBCW channels over I2C (SDA on PWM4/P24, SCL on PWM5/P26), with commands for color mapping and brightness adjustment. Conflicts between LED and sensor I2C usage due to shared global variables were identified and resolved in firmware updates. The TM1637 4-digit display support was developed and integrated, allowing cyclic display of time, temperature, and humidity via scripting. Challenges with channel persistence after reboot, MQTT data resolution, and Android browser compatibility for color control were discussed and addressed through firmware updates. The conversation includes advanced scripting examples for event handling, channel mapping, and MQTT broadcast tuning. The user also encountered difficulties with TM1637 digit order and firmware compilation, receiving guidance and precompiled firmware with TM1637 support. Overall, the thread provides a comprehensive technical roadmap for customizing BK7231T-based Tuya LED modules with SHT30 sensors, LED color control, MQTT telemetry, and TM1637 display integration using OpenBeken firmware and scripting.
Summary generated by the language model.
ADVERTISEMENT