logo elektroda
logo elektroda
X
logo elektroda

The socket switches to the off state when the power is applied

biznessdronss88 816 8
ADVERTISEMENT
  • #1 20993572
    biznessdronss88
    Level 2  

    good afternoon. I flashed the CBE (tuya) socket. Everything turned out to be configured, except when power is applied (if you insert the outlet into the outlet), the outlet automatically switches to the on state, how to configure that when the outlet is turned on, it is in the off state? (please help, as this is my first experience with device firmware)
    
    {
      "vendor": "Tuya",
      "bDetailed": "0",
      "name": "Full Device Name Here",
      "model": "enter short model name here",
      "chip": "BK7231T",
      "board": "TODO",
      "flags": "2622464",
      "keywords": [
        "TODO",
        "TODO",
        "TODO"
      ],
      "pins": {
        "6": "WifiLED_n;0",
        "7": "BL0937CF;0",
        "8": "BL0937CF1;0",
        "10": "Btn;1",
        "23": "LED;1",
        "24": "BL0937SEL;0",
        "26": "Rel;1"
      },
      "command": "",
      "image": "https://obrazki.elektroda.pl/YOUR_IMAGE.jpg",
      "wiki": "https://www.elektroda.com/rtvforum/topic_YOUR_TOPIC.html"
    }

  • ADVERTISEMENT
  • #2 20993724
    p.kaczmarek2
    Moderator Smart Home
    In order to configure the startup state in OBK, go to "Config":
    User interface displaying information and configuration options for BK7231T_WB3S_WhiteStripWindows device.
    Then to "Configure startup":
    Screenshot of configuration panel with Configure Startup option highlighted.
    Then find the channel you've used for relay:
    Screenshot of startup configuration settings in the BK7231T interface.
    And enter 0 or 1 or -1 (-1 is remember last state).

    Alternatively you can just use Short Startup Command or autoexec.bat to put a command there, like:
    
    // setChannel index value
    setChannel 1 0
    


    Keep in mind that there may be other reasons for the relay turning on, like MQTT configuration (so first try without MQTT on), or you may already have some script in the startup, etc.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #3 20998976
    biznessdronss88
    Level 2  
    @p.kaczmarek2 yes, indeed, the problem is with MQTT. I looked at everything and couldn't understand why MQTT has such an effect


    Added after 51 [minutes]:

    @p.kaczmarek2 here is a part of the log file, these events occur when I plug an outlet into an outlet
    mqtt_host 192.168.1.35:1883
    Info:MAIN:Time 13, idle 215504/s, free 83520, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to tasmota/discovery/cbe/+/set
    Info:MQTT:mqtt_subscribed to tasmota/Group/+/set
    Info:MQTT:mqtt_subscribed to cmnd/tasmota/discovery/cbe/+
    Info:MQTT:mqtt_subscribed to cmnd/tasmota/Group/+
    Info:MQTT:mqtt_subscribed to tasmota/discovery/cbe/+/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/1/set
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/current/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power_apparent/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power_reactive/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power_factor/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/voltage/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_last_hour/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_today/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_yesterday/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_2_days_ago/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_3_days_ago/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/energycounter_clear_date/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/63/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/62/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/54/get
    Info:MQTT:MQTT client in mqtt_incoming_data_cb data is 1 for ch 1
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:MQTT:Publishing val 1 to tasmota/discovery/cbe/1/get retain=1
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/1/get
    Info:MQTT:Publishing val Cbe to tasmota/discovery/cbe/host retain=1
    Info:MQTT:Publishing val 4.50 to tasmota/discovery/cbe/power/get retain=1
    Info:MQTT:Publishing val 0.31 to tasmota/discovery/cbe/power_factor/get retain=1
    Info:MAIN:Time 14, idle 190904/s, free 83520, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tasmota/discovery/cbe/power_factor/get
    Info:MQTT:Publishing val OpenBK7231T 1.17.494 Mar  5 2024 14:56:04 to tasmota/discovery/cbe/build retain=1
    Info:MAIN:Drv DGR not running.
    Info:DGR:DRV_DGR_CreateSocket_Receive: Socket created, waiting for packets
    Info:DGR:DRV_DGR_CreateSocket_Send: socket created
    Info:MAIN:Started DGR.
    Info:MAIN:Time 15, idle 210376/s, free 71008, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 5/38
  • ADVERTISEMENT
  • #5 20999193
    biznessdronss88
    Level 2  
    @p.kaczmarek2 List of configuration options and flags for an LED controller displayed on a dark background.
    The flag is not worth it, ((((((
  • #6 20999195
    p.kaczmarek2
    Moderator Smart Home
    You can also try flag 10, broadcast self state on MQTT connect.
    Helpful post? Buy me a coffee.
  • #7 20999281
    biznessdronss88
    Level 2  
    @p.kaczmarek2 I got out of the situation
     "pins": {
        "6": "WifiLED_n;0",
        "7": "BL0937CF;0",
        "8": "BL0937CF1;0",
        "10": "Btn;0",
        "23": "LED;0",
        "24": "BL0937SEL;0",
        "26": "Rel;0"
      }, 

    I changed it
    
     "pins": {
        "6": "WifiLED_n;0",
        "7": "BL0937CF;0",
        "8": "BL0937CF1;0",
        "10": "Btn;3",
        "23": "LED;3",
        "24": "BL0937SEL;0",
        "26": "Rel;3"
      },
  • ADVERTISEMENT
  • #8 20999331
    p.kaczmarek2
    Moderator Smart Home
    I don't think it's a viable solution. I think it only seem to work because you did HA discovery when relay was on channel 0 and now relay is on channel 3 so HA can't change it. Can you verify whether the device still works when controlled via HA?
    Helpful post? Buy me a coffee.
  • #9 21000328
    biznessdronss88
    Level 2  

    @p.kaczmarek2 Screenshot of the Home Assistant interface with BK7231T device data.
    yes, after changing the channel to 3, everything works during the day!

    Added after 3 [minutes]:

    @p.kaczmarek2 Screenshot of a device control panel showing an internal temperature of 132.8°C
    I also paid attention to the temperature of the device. there are two devices that are stitched and on both devices the temperature is more than 100, is this normal? It looks kind of scary. the chip itself, if you touch it with your finger, is very hot

Topic summary

The discussion revolves around configuring a Tuya CBE socket to ensure it remains in the off state when power is applied. Users suggest accessing the OBK configuration settings to adjust the startup state by setting the relay channel to 0, 1, or -1 (where -1 remembers the last state). Issues related to MQTT configurations are highlighted, as they may inadvertently cause the relay to turn on. Suggestions include using the retain flag in MQTT settings and modifying pin configurations to achieve the desired behavior. One user successfully resolved the issue by changing the relay channel, but concerns about device temperature were also raised, indicating potential overheating.
Summary generated by the language model.
ADVERTISEMENT