Elektroda.com
Elektroda.com
X

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

VIDPRO 1560 12
  • About Author
    VIDPRO
    Level 1  
    Offline 
    VIDPRO wrote 1 posts with. Been with us since 2023 year.
  • #2
    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)
  • #3
    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
    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.
  • #5
    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
    sq3evp
    Level 33  
    An interesting module, the price is the same regardless of the current - I wonder if they are identical inside?
  • #7
    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
    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
    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
    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.
  • #11
    madmak76
    Level 10  
    Setting the limits in A/W in the software works because I just checked it, I have this device.
  • #12
    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
    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.