logo elektroda
logo elektroda
X
logo elektroda

Flashing New Tongou TO-Q-SY1-JWT Device: DIN Rail Switch and Meter, BK7231 template script

VIDPRO 19410 82
ADVERTISEMENT
  • About Author
    VIDPRO
    Level 1  
    Offline 
    VIDPRO wrote 1 posts with rating 4. Been with us since 2023 year.
  • ADVERTISEMENT
  • #2 20663290
    p.kaczmarek2
    Moderator Smart Home
    Thank you, just for the clarity, I will add here some screenshot from device seller's page:
    Flashing New Tongou TO-Q-SY1-JWT Device: DIN Rail Switch and Meter, BK7231 template script
    Here is template within post:
    Code: JSON
    Log in, to see the code

    And here's device manual:
    TO-Q-SY1-M..ual.pdf Download (1.55 MB)
    Helpful post? Buy me a coffee.
  • #3 20671634
    przemsi_ele
    Level 11  
    użyłem do tego modelu
    "24": "BridgeFWD;1",
    "26": "BridgeREV;1"

    nie tak jak w powyższym template
    ustawiłem ze po zaniku zasilania przekaźnik ma się wyłączyć SetStartValue 1 0
    przekaźnik włączony, po odłączeniu zasilania i ponownym podłączeniu w interfejsie webowym pokazuje się off , jednak obk nie przerzuca przekaźnika tak aby wyłączyć odbiór ?
    ktoś coś może podpowiedzieć lub sprawdzić u siebie, soft z dzisiaj 1.17.203
  • #4 20671638
    p.kaczmarek2
    Moderator Smart Home
    I don't know if the bridge driver author added support for initial state.

    Maybe we can try to make some kind of work around...

    Create autoexec.bat with the following script:
    
    // turn off power after 4 secs (repeating event with 1 repeat)
    addRepeatingEvent 4 1 setChannel 1 0
    

    I have assumed that bridge relay is configured to be on channel 1.
    Helpful post? Buy me a coffee.
  • #5 20672260
    przemsi_ele
    Level 11  
    p.kaczmarek2 wrote:
    I don't know if the bridge driver author added support for initial state.

    Maybe we can try to make some kind of work around...

    Create autoexec.bat with the following script:
    
    // turn off power after 4 secs (repeating event with 1 repeat)
    addRepeatingEvent 4 1 setChannel 1 0
    

    I have assumed that bridge relay is configured to be on channel 1.


    Yes, brigde is setup on channel 1
    manualy "save and run as script" working properly, but after disconnect and connect AC, state of switch and LED is off, but bridge doesn't react, and relay remain closed.

    It's the same situation like "SetStartValue 1 0"

    update:
    hmmm ?
    first i remove autexec.bat then check all combinations:
    H bridge on channel 1
    set SetStartValue 1 0 ; then AC off/on; then Led_n 1 - off , bridge not react - issue ?
    set SetStartValue 1 1 ; then AC off/on; then Led_n 1 - on , bridge set on - ok !
    set SetStartValue 1 -1 ; then AC off/on; then Led_n 1 and brigde work properly ( remeber last state ) - ok !
  • #6 20675853
    sq3evp
    Level 37  
    An interesting module, the price is the same regardless of the current - I wonder if they are identical inside?
  • ADVERTISEMENT
  • #7 20677316
    przemsi_ele
    Level 11  
    sq3evp wrote:
    An interesting module, the price is the same regardless of the current - I wonder if they are identical inside?

    There is a minimum two hw version, with green paint of solder mask, and the second one with red. I saw pictures with 12V and 5V DC coil
  • #8 20700999
    przemsi_ele
    Level 11  
    przemsi_ele wrote:
    p.kaczmarek2 wrote:
    I don't know if the bridge driver author added support for initial state.

    Maybe we can try to make some kind of work around...

    Create autoexec.bat with the following script:
    
    // turn off power after 4 secs (repeating event with 1 repeat)
    addRepeatingEvent 4 1 setChannel 1 0
    

    I have assumed that bridge relay is configured to be on channel 1.


    Yes, brigde is setup on channel 1
    manualy "save and run as script" working properly, but after disconnect and connect AC, state of switch and LED is off, but bridge doesn't react, and relay remain closed.

    It's the same situation like "SetStartValue 1 0"

    update:
    hmmm ?
    first i remove autexec.bat then check all combinations:
    H bridge on channel 1
    set SetStartValue 1 0 ; then AC off/on; then Led_n 1 - off , bridge not react - issue ?
    set SetStartValue 1 1 ; then AC off/on; then Led_n 1 - on , bridge set on - ok !
    set SetStartValue 1 -1 ; then AC off/on; then Led_n 1 and brigde work properly ( remeber last state ) - ok !


    new software Build on Aug 20 2023 06:10:59 version 1.17.223 - the same issue
    i play with commands:
    
    SetStartValue 1 0
    setchannel 1 1 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0) 
    Info:DRV:Bridge Driver: 90915 : FORWARD PULSE 

    relay is on

    relay is on
    setchannel 1 0
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    

    obk "thinks" that channel 1 is set to 0, first command (SetStartValue 1 0) works fine
    after reboot it set flag to 0, but doesn't send msg to bridge

    i modyfied autoexec.bat
    
    addRepeatingEvent 1 1 setChannel 1 1
    addRepeatingEvent 2 1 setChannel 1 0
    


    works fine for me, but if relay is off before reboot or AC lost, relay will toggle on/off
  • #9 20712391
    madmak76
    Level 10  
    >>20663233
    I understand that this device has a relay/contactor inside, a current measurement module and a Bekken circuit in a housing with dimensions that fit the Din rail and looks like an overcurrent switch, but the structure inside has nothing to do with it?

    I would be grateful for a hint because I am looking for someone who has it all together.
  • #10 20714066
    przemsi_ele
    Level 11  
    this is not a circuit breaker

    Quote:
    I understand that this device has a relay/contactor inside, a current measurement module and a Bekken circuit in a housing with dimensions that fit the Din rail and looks like an overcurrent switch, but the structure inside has nothing to do with it?


    that's right, the only thing that can be done is to set an alarm for exceeding the current threshold in Tuya with a resolution of 1A, but I have not checked whether it disconnects the relay after exceeding the defined threshold.
  • ADVERTISEMENT
  • #11 20714219
    madmak76
    Level 10  
    Setting the limits in A/W in the software works because I just checked it, I have this device.
  • #12 20714628
    przemsi_ele
    Level 11  
    I have erau and tongou models , in one the green plate and in the other the red plate.
    I import them from Tuya to HA but it does not show me in HA the measurement entity, only the switch, the sockets of Tuya have measurement entities, how is it with you ? Maybe you also have them paired with HA ?
  • #13 20714654
    madmak76
    Level 10  
    I launched this device only to check its correct operation after receiving the shipment from the Chinese. I checked how it worked through the tuya app. I guess it was automatically detected in ha through tuya local or local tuya because I have both add-ons installed.
    I'll check when I'm home if I didn't remove it from HA.

    I'm going to sell it because then I found with the same functionality devices with ewelink software and such I already have a dozen at my place and they automatically add themselves correctly to ha with full functionality and not like those with tuya.
  • #14 20770269
    sotossw
    Level 2  
    Just wondering have anyone successfully flashed it through tuya-cloudcutter OTA? I tried mine (I have the non-metering version btw) but I get an exploit not successful message.
  • #15 20770288
    p.kaczmarek2
    Moderator Smart Home
    Which firmware version is shown by Tuya app?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #18 20775534
    p.kaczmarek2
    Moderator Smart Home
    The support for your device has been added to the cloudcutter. Thank your for submitting the flash dump.
    Helpful post? Buy me a coffee.
  • #19 20807093
    ruhalajm
    Level 3  
    Hi i tryed to flash the openbeken it worked fine, but now i cant write the configuration on it throws an error.
    and same thing if i try to read it gives an error.
    what difference is the rx1 tx1 and rx2 tx2 pins i used the rx1 and tx1 for the flashing.
  • #20 20807122
    p.kaczmarek2
    Moderator Smart Home
    TX2 is a debug log output, it is not used for flashing.

    Can you configure device via OBK page?
    Helpful post? Buy me a coffee.
  • #21 20807199
    ruhalajm
    Level 3  
    Kind of stupid question how do i get to web page because i havent got any information on the device yet, so no wifi connection.
    or does it connect trough serial somehow?
  • #22 20807258
    p.kaczmarek2
    Moderator Smart Home
    after repowering it should create an open access point, just like Tasmota does
    Helpful post? Buy me a coffee.
  • #23 20813578
    holydiver1983
    Level 1  
    Hi, I have 3 of these devices,
    1 metering with firmware 1.0.18
    and 2 non-metering with firmware 1.0.2
    I was able to successfully flash the 2 non metering ones with tuya-cloudcutter
    but with the metering one it wasn't successful, the one device profile with 1.0.18 doesn't work.
    Do you guys have any suggestions?
  • #24 20813646
    ruhalajm
    Level 3  
    I'm also interested to know is there anyway to restore the original firmware, i wasn't able to flash working firmware, even tough the flasher reported that is was succesfull doing so and now it doesn't find the din rail switch at all.
  • #25 20813668
    p.kaczmarek2
    Moderator Smart Home
    So it's not creating AP? What does the debug log output on TX2 pin says?
    Helpful post? Buy me a coffee.
  • #26 20813696
    ruhalajm
    Level 3  
    haven't tested the tx2 yet, i'll try that but for now it doesn't regognize the board, and it makes no difference if i power the device off.
    at first try i did managed to read the original firmware, the flasher software finds the configuration on that read, so it worked one time atleast.

    Serial port open!
    Getting bus... (now, please do reboot by CEN or by power off/on)
    Getting bus failed, will try again - 0/100!

    Added after 4 [minutes]:

    and it's not creating the AP and only way i got it flashing was use the 1500000 baud rate on com port other speeds did throw an error.
  • #27 20813717
    p.kaczmarek2
    Moderator Smart Home
    What is your flashing circuit?

    I have flashed more than hundred BK7231 devices (also for users) and it all worked reliably, so there must be some configuration issue on your side.

    Please provide more information and I will try my best to help you resolve the problem.
    Helpful post? Buy me a coffee.
  • #28 20813742
    ruhalajm
    Level 3  
    I have an generic chinese clone siliconlabs CP210x usb uart bridge and this has worked until now i have flashed succesfully 11pcs
    BK7231 devices with it, does it make any difference what firmware was on the device before trying to flash openbk on it?
    Well if it doesnt work i'll use tuya intergration with HASS for time being, but i would be nice to get working that wrong fashed one .
  • #29 20973495
    yorainoy
    Level 1  
    Does anyone have the technical data of the product, it need to write the frequency inside
  • #30 20974133
    Spag
    Level 3  
    >>20813578

    Same here, not able to flash the version with power metering V1.0.18 (via CloudCutter).

    Any idea?
    Thanks!

    Added after 2 [hours] 41 [minutes]:

    OK so I destroyed the rivets, took my solder iron and after a very dirty job, I was able to flash it using BK7231 GUI Flash Tool. Yay!

Topic summary

The discussion revolves around flashing the Tongou TO-Q-SY1-JWT device, a DIN rail switch and meter utilizing the BK7231N chip. Users share their experiences with flashing the device using various methods, including serial flashing and Tuya CloudCutter, while addressing issues related to relay functionality, power state retention, and configuration challenges. Several users report successful flashing and integration with Home Assistant (HA), while others encounter difficulties with firmware versions and device behavior post-flashing. The conversation also touches on calibration data, pin configurations, and the differences between hardware versions. Users provide insights into troubleshooting, including the importance of correct wiring and the potential for overheating in flashed devices.
Summary generated by the language model.
ADVERTISEMENT