AlexxIT / SonoffLAN

Control Sonoff Devices with eWeLink (original) firmware over LAN and/or Cloud from Home Assistant
https://github.com/AlexxIT/Blog
MIT License
2.6k stars 408 forks source link

HA not updating values from Sonoff SNZB-02via zigbee gate sonofff 3.0 #1046

Closed kozaczi closed 1 year ago

kozaczi commented 1 year ago

Hi All, Correct value from SNZB-02 temp sensor is only after rebooting HA and sometimest couple minute after this procedure. Rest time uis freezed. I tried old version of SonoffLAN, backups from HA and nothing, any solutions please? Diagnostics from sensor:

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2022.11.3",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.7",
    "docker": true,
    "arch": "armv7l",
    "timezone": "Europe/Warsaw",
    "os_name": "Linux",
    "os_version": "5.15.61-v7l",
    "supervisor": "2022.11.2",
    "host_os": "Home Assistant OS 9.3",
    "docker_version": "20.10.18",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "saj_esolar": {
      "version": "1.2.9",
      "requirements": []
    },
    "miheater": {
      "version": "1.3.0",
      "requirements": []
    },
    "sonoff": {
      "version": "3.3.1",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "bodymiscale": {
      "version": "3.0.3",
      "requirements": [
        "cachetools==5.1.0"
      ]
    },
    "hacs": {
      "version": "1.27.2",
      "requirements": [
        "aiogithubapi>=22.2.4"
      ]
    },
    "nodered": {
      "version": "1.1.2",
      "requirements": []
    },
    "xiaomi_miot": {
      "version": "0.6.13",
      "requirements": [
        "construct==2.10.56",
        "python-miio>=0.5.6",
        "micloud>=0.3"
      ]
    },
    "localtuya": {
      "version": "4.1.0",
      "requirements": []
    }
  },
  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "config_flow": true,
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "issue_tracker": "https://github.com/AlexxIT/SonoffLAN/issues",
    "codeowners": [
      "@AlexxIT"
    ],
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.3.1",
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "version": "b20e33c",
    "cloud_auth": true,
    "config": {
      "username": "***",
      "password": "***",
      "reload": "always"
    },
    "options": {
      "mode": "auto",
      "debug": false
    },
    "errors": [],
    "device": {
      "uiid": 1770,
      "params": {
        "bindInfos": "***",
        "subDevId": "4c1a6b22004b12001770",
        "parentid": "1000f61731",
        "battery": 100,
        "supportPowConfig": 1,
        "trigTime": "1669501777529",
        "ASYNC": 2,
        "temperature": "2188",
        "humidity": "6812",
        "timeZone": 1,
        "switch": "off"
      },
      "model": "ZCL_HA_DEVICEID_TEMPERATURE_SENSOR",
      "online": true,
      "localtype": null,
      "deviceid": "a48003ef60"
    }
  }
}
myrkoo commented 1 year ago

Hi, me too. I have 11 SNZB-02 with ZBBridge and after few hours no update any more and I need to reboot the integration for start working. I check on ewelink and all temperature and Humidity are present without stoping. Thanks

bubbamester commented 1 year ago

Unfortunately, same issue here too. It's quite annoying because I control our heating system with sonoff switches and SNZB-02 temp sensors. I've woken up several times in the morning to find that the switch hasn't turned on and the apartment is cold. Sometimes the heating won't turn off because of this fault and overheats the apartment. Manual (AlexxIT/SonoffLAN) configuration reload temporarily solves the problem, but after a few hours the temperature data are not updated again.

dg228822 commented 1 year ago

Same here, I have written an automation to reload the integration every 10 minutes which has temporarily solved the problem, but need a proper solution. This issue affects both this integration and zigbee integration so I think it is the ewelink api that is not working properly (ewelink app is showing accurate and recent data).

alias: 10minute reload sonoff description: >- Hopefully temporary to reboot integration every 10 mins to force update from eWeLink trigger:

Note: Reloading an entity within an integration reloads the integration

lefixx commented 1 year ago

Same problem

I have tried everything to the point of deleting all the devices from ewelink accounts and adding them back in a new HASS installation

Values wont update except if I reload the integration, then they update once and never again.

HA Core Container+ HACS + AlexxIT/SonoffLAN + Sonoff Zigbee bridge + Sonoff Temp and Hub Sensor

https://i.imgur.com/LEPNdJO.png https://i.imgur.com/rt8Inas.png

problem started 2-3 days ago

maverick62 commented 1 year ago

I just installed the addon so i cant speak about 2 or 3 days ago. But my temp sensor is not updating unless i reload the addon.

madchap commented 1 year ago

Same issue. I noticed a warning in the diagnostic, but not sure it has anything to do with it. Epoch timestamp certainly after one of the very many manual reload of the integration...

"errors": [
      {
        "name": "custom_components.sonoff.core.ewelink.cloud",
        "message": [
          "Cloud processing error"
        ],
        "level": "WARNING",
        "source": [
          "custom_components/sonoff/light.py",
          258
        ],
        "timestamp": 1673111031.9295104,
        "exception": "Traceback (most recent call last):\n  File \"/config/custom_components/sonoff/core/ewelink/cloud.py\", line 286, in run_forever\n    await self._process_ws_msg(resp)\n  File \"/config/custom_components/sonoff/core/ewelink/cloud.py\", line 346, in _process_ws_msg\n    self.dispatcher_send(SIGNAL_UPDATE, data)\n  File \"/config/custom_components/sonoff/core/ewelink/base.py\", line 59, in dispatcher_send\n    handler(*args, **kwargs)\n  File \"/config/custom_components/sonoff/core/ewelink/__init__.py\", line 188, in cloud_update\n    self.dispatcher_send(did, params)\n  File \"/config/custom_components/sonoff/core/ewelink/base.py\", line 59, in dispatcher_send\n    handler(*args, **kwargs)\n  File \"/config/custom_components/sonoff/core/entity.py\", line 108, in internal_update\n    self.set_state(params)\n  File \"/config/custom_components/sonoff/light.py\", line 258, in set_state\n    self._attr_effect = self.effect_list[mode] if mode >= 0 else None\nIndexError: list index out of range\n",
        "count": 1,
        "first_occurred": 1673111031.9295104
      }
AlexxIT commented 1 year ago

This problem can happen because some errors from any of your devices. Without error description it can't be fixed. @madchap your error fixed in latest master version and will be in next release