logo elektroda
logo elektroda
X
logo elektroda
ADVERTISEMENT
  • #1 20969637
    iff7378
    Level 4  
    I got this WiFi Smart IR blaster because it has a built-in humidity and temperature sensor with the goal of controlling an AC unit.

    The good news is taking the device apart is very easy, the plastic case opens nicely. Flashing with OBK was as simple as soldering wires to the CB2S module, and flashing the firmware (I use hid_download_py since I'm on Linux).

    Close-up of a label on the bottom of a WiFi Smart Remote Control module. Electronic module with visible STC chip. Top view of a WiFi Smart IR module with a circuit board and components on a wooden surface. Close-up of a WiFi Smart IR module PCB on a wooden surface.

    I did manage to figure out the IRSend and IRRecv pins; however, I wasn't unable to figure out the onboard status LED or the button. Going through the GPIO Finder didn't help with either of those. I also have no idea how to figure out how to read the temp or humidity sensors. There is another MCU (https://stcmicro.com/stc/stc8h1k08.html) on the board shown in the pictures above. My thought is the sensors are talking through that? Unsure what to do next. My searches of the forum and online didn't bring up other smart devices with this chip in it. Is this considered a TuyaMCU??

    Here's my config so far:

    Code: JSON
    Log in, to see the code


    Any help to figure out the rest of this device would be appreciated! Original firmware read from the device is attached, and the TuyaConfig read using OBK.
  • ADVERTISEMENT
  • #2 20970108
    p.kaczmarek2
    Moderator Smart Home
    The first step in such cases is to check the Tuya Config. It may contain baud information:
    Screenshot of the BK7231 Easy UART Flasher application showing Tuya configuration.
    And yes, it indeed looks like there is a baud setting. This device is using 9600 baud, which matches the low-speed TuyaMCU.
    So, I think you can now try to start TuyaMCU driver and maybe request state from it.
    See our autoexec examples:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    To query TuyaMCU state, use tuyaMcu_sendQueryState
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20974411
    iff7378
    Level 4  

    Finally got around to messing with this some more:

    I enabled the TuyaMCU driver and it looks like it started talking to the chip.
    Code: Text
    Log in, to see the code


    It seems that I would do a setChannelType1 Temperature to assign channel one as temperature and setChannelType2 Humidity to assign OBK channel 1 and 2 to temperature and humidity. I'm not 100% sure how to determine the dpIDs from TuyaMCU to link the channels. I guess I should have sniffed the UART communication before flashing OBK and put those into the TuyaMCUAnalyzer? OBK is already on the device, am I screwed? I tried my like to assume it was similar to other devices with temperature and humidity by running this for autoexec.bat
    
    startDriver TuyaMCU
    startDriver tmSensor
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    


    No such luck:
    Temperature 0.00C (1)
    Humidity 0.0% (2)

    I did try sending the TuyaMCU_sendQuery_state but got no response in the console.


    BTW mono did a nice job of compiling an running the TuyaMCU on Ubuntu, but I don't think i'll be able to use it to do the realtime UART capture.
  • #4 20974498
    p.kaczmarek2
    Moderator Smart Home
    Is this a battery-powered device? If not, remove tmSensor.

    And WiFi state set to 0x04 so it thinks it's paired.
    
    startDriver TuyaMCU
    // set TuyaMCU default wifi state 0x04, which means "paired",
    // because some TuyaMCU MCUs will not report all data
    // unless they think they are connected to cloud
    tuyaMcu_defWiFiState 4
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    

    Use tuyaMcu_sendQueryState and try to observe what is being sent. It should send some data points with unique dpIDs, types and values.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #5 20974923
    iff7378
    Level 4  

    I think I found it!

    
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 65 02 00 04 00 00 00 B7 33 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 101 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 183
    Info:TuyaMCU:Received: 55 AA 03 07 00 08 66 02 00 04 00 00 00 29 A6 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 7 (State) len 15
    Info:TuyaMCU:ParseState: id 102 type 2-val len 4
    Info:TuyaMCU:ParseState: int32 41
    


    So it looks like 101 is temperature_div10 and 102 is humidity. This is my autoexec.bat. Once I added the WiFi state line, the data above showed up in the console after a reboot.

    
    startDriver TuyaMCU
    tuyaMcu_defWiFiState 4
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 101 2 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 102 2 2
    


    I still don't think it was responding to TuyaMCU_sendQueryState however:
    
    Info:TuyaMCU:Received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 0 (Hearbeat) len 8
    Info:MAIN:Time 254, idle 86550/s, free 73008, MQTT 0(14), bWifi 1, secondsWithNoPing 166, socks 2/38 
    Info:CMD:[WebApp Cmd 'tuyaMcu_sendQueryState' Result] OK
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 255, idle 78149/s, free 73008, MQTT 0(15), bWifi 1, secondsWithNoPing 167, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:ProcessIncoming[v=3]: cmd 3 (WiFiState) len 7
    


    Thanks for the help!
  • Helpful post
    #6 20982047
    iff7378
    Level 4  
    How does this get added to the list of devices? Does this topic need moved to the "Device Teardowns"?

    Config info below:

    Code: JSON
    Log in, to see the code


    Autoexec.bat
    
    startDriver TuyaMCU
    tuyaMcu_defWiFiState 4
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 101 2 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 102 2 2
    
  • ADVERTISEMENT
  • #7 20982173
    p.kaczmarek2
    Moderator Smart Home
    I have added some more information to the template and submitted it here:
    https://github.com/OpenBekenIOT/webapp/commit/327559d4902a47b122cb506ed11dacd9d7f00540
    The topic will be moved to "Teardowns" section a bit later. Thank you for submitting!
    Helpful post? Buy me a coffee.

Topic summary

The discussion revolves around the CB2S Frankever Smart IR FK-UFO-R6, a WiFi Smart IR blaster equipped with humidity and temperature sensors intended for controlling an AC unit. The user successfully disassembled the device and flashed it with OpenBeken firmware, utilizing the TuyaMCU driver to communicate with the onboard chip. They encountered challenges in identifying the status LED and button, as well as reading the temperature and humidity sensors. Subsequent responses provided guidance on configuring the TuyaMCU driver, querying device states, and linking sensor outputs to the appropriate channels. The configuration details, including the device's vendor, model, and communication protocols, were shared, along with a request to move the topic to the "Device Teardowns" section for better categorization.
Summary generated by the language model.
ADVERTISEMENT