logo elektroda
logo elektroda
X
logo elektroda

[BK7321N] IR smart receiver with CHT8305 sensor with CBU module

DeDaMrAz 1458 14
ADVERTISEMENT
  • Helpful post
    #1 20560227
    DeDaMrAz
    Level 19  
    Here is a short teardown of a generic IR controller with CBU module and CHT8305 temperature sensor. Sorry now links or prices but it looks very similar to this topic - https://www.elektroda.com/rtvforum/topic3933390.html#20348190

    Easy to open and disassemble:

    [BK7321N] IR smart receiver with CHT8305 sensor with CBU module [BK7321N] IR smart receiver with CHT8305 sensor with CBU module

    You can now use new features in the web app to get the templates and save them locally, this is mine for this device

    [BK7321N] IR smart receiver with CHT8305 sensor with CBU module

    also see here is the working config:

    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231N",
      "board": "TODO",
      "flags": "4244484",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "6": "CHT8305_SDA;1",
        "8": "IRSend;0",
        "15": "LED_n;0",
        "17": "WifiLED;0",
        "24": "IRRecv;0",
        "26": "CHT8305_SCK;0",
        "28": "Btn;0"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }
  • ADVERTISEMENT
  • #2 20560614
    p.kaczmarek2
    Moderator Smart Home
    It's very nice to see Tuya using a step down converter to get efficient 3.3V source instead of bulky, power-hungry AMS1117-3.3V. Are you able to tell which chip is used there, marked as U1 on the silkscreen?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #4 20585737
    baidedov5
    Level 4  
    Hi all Thanks for great work and sharing your settings here.
    I'm newbie in electronics and will be more than happy if someone can help
    I've created exactly the same config and sensor reading are Temperature:125.000000C Humidity:100.000000%
    When I short press the button for a sec they are going back to normal for 1 time and then back to :125.000000C Humidity:100.000000%

    
    
    Info:SENSOR:DRV_CHT8304_readEnv: Temperature:125.000000C Humidity:100.000000%
    Info:GEN:28 key_short_press
    Info:MQTT:Channel has changed! Publishing 0 to channel 0 
    Info:MQTT:Publishing val 0 to my_def_int/0/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic my_def_int/0/get
    Debug:MQTT:channelSet topic 4208968 with arg 0
    Info:GEN:CHANNEL_Set channel 1 has changed to 219 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 219 to channel 1 
    Info:MQTT:Publishing val 219 to my_def_int/1/get retain=0
    Info:GEN:CHANNEL_Set channel 0 has changed to 57 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 57 to channel 0 
    Info:MQTT:Publishing val 57 to my_def_int/0/get retain=0
    Info:SENSOR:DRV_CHT8304_readEnv: Temperature:21.976654C Humidity:57.361713%
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic my_def_int/1/get
    Debug:MQTT:channelSet topic 4208968 with arg 219
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic my_def_int/0/get
    Debug:MQTT:channelSet topic 4208968 with arg 57
    Info:GEN:CHANNEL_Set channel 1 has changed to 1250 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1250 to channel 1 
    Info:MQTT:Publishing val 1250 to my_def_int/1/get retain=0
    Info:GEN:CHANNEL_Set channel 0 has changed to 100 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 100 to channel 0 
    Info:MQTT:Publishing val 100 to my_def_int/0/get retain=0
    Info:SENSOR:DRV_CHT8304_readEnv: Temperature:125.000000C Humidity:100.000000%
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic my_def_int/1/get
    Debug:MQTT:channelSet topic 4208968 with arg 1250
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic my_def_int/0/get
    Debug:MQTT:channelSet topic 4208968 with arg 100
    Info:GEN:No change in channel 1 (still set to 1250) - ignoring
    
    Info:GEN:No change in channel 0 (still set to 100) - ignoring
    
    Info:SENSOR:DRV_CHT8304_readEnv: Temperature:125.000000C Humidity:100.000000%
    
  • ADVERTISEMENT
  • #5 20585834
    baidedov5
    Level 4  
    Hi,

    I'm referring to the values in the log file taken out of WEB application:
    Temperature: 21.976654C Humidity: 57.361713%
    I might find something. In device config that is different. In my case Flags: 0, but on the picture they are 424484
    Is this some kind of default value that needs to be changed. It's highly possible to be something wrong on my end, since this is my first flash.
  • #6 20585842
    p.kaczmarek2
    Moderator Smart Home
    Well, we've never focused on adding rounding to Web App log, as it's only for debugging. So basically your feature request is that you want to have rounding on Web App log values?

    Or do you also get non-rounded values on the WWW panel?

    Added after 36 [seconds]:

    EDIT: Flags can be changed in the Configure Flags menu.
    Helpful post? Buy me a coffee.
  • #7 20585855
    baidedov5
    Level 4  
    Hi,

    We are not on the same page here. Rounding is not what I'm looking for. My problem is that sensor readings are wrong
    Temperature:125.000000C Humidity:100.000000%

    When I short press button one single measurement is correct for a fraction of a second
    Temperature:21.976654C Humidity:57.361713%

    and then it shows wrong values again
    Temperature:125.000000C Humidity:100.000000%
  • #8 20585892
    p.kaczmarek2
    Moderator Smart Home
    Now I see. This is very strange. I was sure those are example/test values, but yet you somehow get invalid/stock results.

    Does it work correctly at random or ONLY when pressing button?
    Helpful post? Buy me a coffee.
  • #9 20585909
    baidedov5
    Level 4  
    Hi,

    It is showing correct values only when button is short pressed.
    I have second device like this and I re-flashed it as well - configuration is exactly the same and it is working perfectly fine.
    Could be something fried or shorted on the first device.
    Last thing I need to understand is how to read IR codes.
    Awesome work with this project.
  • #10 20585942
    p.kaczmarek2
    Moderator Smart Home
    I am totally confused right now.

    I understand your description (I was wrong at first, so I cleared some posts) but still confused.

    Okay, let's do one test. Please clear all pins (maybe even reset whole device, if that's not a problem - ClearConfig command), configure it via AP again, and then, set ONLY CH8305 GPIO in the Configure module.
    Remember, set also two channels for CH8305 (two separate channels), and then post a screenshot and check.
    Helpful post? Buy me a coffee.
  • #11 20585985
    baidedov5
    Level 4  
    Hi,

    Thanks for the reset command. I was looking for it. So after config reset same behavior is observed. I even re-uploaded the firmware to the BK7321N chip, however this device is still problematic. Now I'm 99% sure, that hardware of the device is damaged.
    I have 2 more devices exact same IR circuits with CH8305 and I've flashed them just now, reconfigured them the same way, and CH8305 sensors are working perfectly. Thank you for the cooperation here. One last question. How to get IR receive codes. I'm trying in the web application log page and shooting the device with air conditioner remote, but nothing show up.
    Thanks in advance
  • #12 20586013
    p.kaczmarek2
    Moderator Smart Home
    Wait a moment, maybe this is something that can be fixed.

    So, even with clear config, the CHT8305 works only when button is hold?

    What if you use PowerSave 1 in console or use another power supply?
    Helpful post? Buy me a coffee.
  • #13 20586049
    baidedov5
    Level 4  
    Found out what's happening. There was a thin lead wire shortening pin 18 (CEN pin) of the CBU module and the pin next to it.
    After clearing the spot CH8305 is back in operation. Thanks so much for the assistance. Still struggling to understand how to read IR codes.
  • #14 20586314
    p.kaczmarek2
    Moderator Smart Home
    So it was a hardware issue... I am still not sure how a short could create such behavior, but it's good it's solved now.

    Regarding IR codes, not all codes are currently supported. The basic ones like Samsung, etc, Sony, are working fine, but if you need something more advanced, there is a pull request for better IR:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/723
    You can download PR build artifacts (binaries) from Github directly, if you click into the build results in the given pull request.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #15 20588089
    DeDaMrAz
    Level 19  
    To compliment the CHT driver, a CHT_Cycle command has been added with latest 1.17.119 build - usage:

    //CHT_Cycle (sample time in seconds)
    CHT_Cycle 60

    You can add this in autoexec.bat script and adapt to your needs.

Topic summary

The discussion revolves around the teardown and configuration of an IR smart receiver utilizing the BK7321N chip, CHT8305 temperature sensor, and CBU module. Users share insights on the device's performance, including issues with incorrect temperature and humidity readings, which were initially reported as 125°C and 100% humidity. Troubleshooting steps included resetting configurations and re-flashing firmware, leading to the discovery of a hardware issue caused by a short circuit. The conversation also touches on the ability to read IR codes, with some basic protocols supported and a pull request for enhanced IR functionality mentioned. A new command, CHT_Cycle, was introduced in the latest firmware build to complement the CHT driver.
Summary generated by the language model.
ADVERTISEMENT