logo elektroda
logo elektroda
X
logo elektroda

LN882H Smart Plug Network Issue: Wi-Fi Reinit Script, Boot vs. Connection Diagnosis

blacksun2 159 2
ADVERTISEMENT
  • #1 21643163
    blacksun2
    Level 8  
    Hello,
    I have a problem with my two smart plugs, which have an LN882HKI chip, where I have to plug and unplug them countless times after a reboot until the devices are reachable on the network.
    This behavior seems to be related to the chipset, as the same OBK version on devices with a Beken chipset or BL chipset does not exhibit this issue.

    The configuration looks like this:
    //clearIO
    PowerSave 0
    Flags 134743044
    SetupEnergyStats 1 60 1440 1
    startDriver NTP
    ntp_setServer 192.168.1.103
    ntp_timeZoneOfs 2
    waitFor NTPState 1
    //startDriver TuyaMCU
    //startDriver tmSensor
    mqtt_broadcastInterval 30
    mqtt_broadcastItemsPerSec 30
    waitFor MQTTState 1
    //tuyaMcu_defWiFiState 4
    //tuyaMcu_sendQueryState
    delay_s 1
    startDriver BL0937
    
    delay_s 5
    setPinRole 6 LED_n
    setPinChannel 6 0
    setPinRole 7 Btn
    setPinChannel 7 0
    setPinRole 19 Rel
    setPinChannel 19 0
    setPinRole 20 BL0937CF
    setPinChannel 20 0
    setPinRole 21 BL0937CF1
    setPinChannel 21 0
    setPinRole 22 BL0937SEL
    setPinChannel 22 0
    setStartValue 0 1
    //setStartValue 1 1
    
    delay_s 5
    DeviceName "OpenBKsteckdoseWaschAEG"
    DeviceShortName "OpenBKsteckdoseWaschAEG"
    MqttHost 192.168.1.97
    MqttPort 1883
    MqttUser MQTT
    //MqttPassword 
    MqttClient OpenBKsteckdoseWaschAEG
    MqttGroup LN882H
    WiFiSsid Polizei
    //WiFiPass DeinWlanPasswort
    
    delay_s 5
    setChannelLabel 0 SchalterOBKwaschAEG
    delay_s 5
    scheduleHADiscovery
    


    Does anyone know what the cause is and how to fix it?
    How do I determine if the device isn't booting or if it's just a Wi-Fi connection issue?
    Can I reinitialize or restart the Wi-Fi using script commands without rebooting the device? When rebooting, the devices always briefly turn off the power. If the Wi-Fi could be restarted separately, this could implement a ping watchdog that doesn't cause a power interruption.

    EDIT:
    I also tried "PowerSave 1", but this makes no difference.
  • ADVERTISEMENT
  • #2 21643192
    p.kaczmarek2
    Moderator Smart Home
    First of all, can you check with empty autoexec.bat?
    Helpful post? Buy me a coffee.
  • #3 21643286
    blacksun2
    Level 8  
    p.kaczmarek2 wrote:
    First of all, can you check with empty autoexec.bat?


    I deleted PIN-Settings with clearIO, reseted Flags with Flags 0 and deleted autoexec.bat
    The situation is still the same.

    The devices do not boot reliably or do not connect reliably to the Wifi.

    //EDIT:
    Today, I also converted to an AP. Each time when device is powered, Device is sending out a SSID immeditately. I can connect to this AP without any problems.
    I tested the device at different places at home. At all places, plugs with metering with Beken-Chip or BL602-Chip have not these problems. They connect immediately to home-wifi.
    It is not a problem with a weak wifi-signal.

    My home network is provided by an AVM Fritzbox. Several AVM repeaters are also operated in the network. As you probably know, AVM offers the option of setting up a MESH Wi-Fi network using the Fritzbox and the repeaters.
    SSID = one Word no special signs, WPA2

    It's just a guess. Could it be that the Wi-Fi drivers for the Lightning chips have a problem with the SSID being broadcast across multiple devices?

    It can't be a fundamental issue with OBK, because the devices only differ in the chip, and the BL602 and the Beken chips don't have these problems.
ADVERTISEMENT