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

SPM-4 Relays don't show accurate state #1161

Open EscapeRush opened 1 year ago

EscapeRush commented 1 year ago

Hi,

I integrated my SPM 4 relay properly but when I turn off a switch, it automatically switches back to ON state. So it doesn't show the actual state of the relays.

Here's the diagnostic :

{
  "home_assistant": {
    "installation_type": "Home Assistant OS",
    "version": "2023.3.6",
    "dev": false,
    "hassio": true,
    "virtualenv": false,
    "python_version": "3.10.10",
    "docker": true,
    "arch": "aarch64",
    "timezone": "Europe/Brussels",
    "os_name": "Linux",
    "os_version": "5.15.84-v8",
    "supervisor": "2023.04.0",
    "host_os": "Home Assistant OS 9.5",
    "docker_version": "20.10.22",
    "chassis": "embedded",
    "run_as_root": true
  },
  "custom_components": {
    "hacs": {
      "version": "1.31.0",
      "requirements": [
        "aiogithubapi>=22.10.1"
      ]
    },
    "sonoff": {
      "version": "3.5.1",
      "requirements": [
        "pycryptodome>=3.6.6"
      ]
    },
    "linkplay": {
      "version": "3.1.8",
      "requirements": [
        "async-upnp-client>=0.27",
        "validators~=0.12",
        "chardet>=4.0.0"
      ]
    }
  },
  "integration_manifest": {
    "domain": "sonoff",
    "name": "Sonoff",
    "config_flow": true,
    "documentation": "https://github.com/AlexxIT/SonoffLAN",
    "issue_tracker": "/api/sonoff/f6fcf76b-14b4-4fdd-8f5f-d84aa3854401",
    "codeowners": [
      "@AlexxIT"
    ],
    "dependencies": [
      "http",
      "zeroconf"
    ],
    "requirements": [
      "pycryptodome>=3.6.6"
    ],
    "version": "3.5.1",
    "iot_class": "local_push",
    "is_built_in": false
  },
  "data": {
    "version": "122751c",
    "cloud_auth": true,
    "config": null,
    "options": {
      "mode": "auto",
      "debug": true
    },
    "errors": [
      {
        "name": "custom_components.sonoff.core.ewelink.cloud",
        "message": [
          "Cloud WS Connection error: Cannot connect to host eu-dispa.coolkit.cc:443 ssl:default [Try again]"
        ],
        "level": "WARNING",
        "source": [
          "custom_components/sonoff/core/ewelink/cloud.py",
          272
        ],
        "timestamp": 1680633940.1796143,
        "exception": "",
        "count": 10,
        "first_occurred": 1680627033.4742436
      }
    ],
    "device": {
      "uiid": 128,
      "params": {
        "bindInfos": "***",
        "version": 8,
        "rssi": -37,
        "sledOnline": "on",
        "fwVersion": "1.2.0",
        "subChipFwVer": "1.2.0",
        "subDevices": [
          {
            "subDevId": "7f64474c3831300e35363734",
            "deviceid": "ab300005b3",
            "uiid": "130",
            "index": 0
          },
          {
            "subDevId": "6857474c3831300e35363734",
            "deviceid": "ab300005b4",
            "uiid": "130",
            "index": 0
          },
          {
            "subDevId": "443e474c3831300e35363734",
            "deviceid": "ab300005b5",
            "uiid": "130",
            "index": 0
          },
          {
            "subDevId": "5b2d474c3831311947313130",
            "deviceid": "ab300005b6",
            "uiid": "130",
            "index": 0
          }
        ],
        "timeZone": 2,
        "only_device": {
          "ota": "success"
        }
      },
      "model": "SPM-Main",
      "online": true,
      "local": null,
      "localtype": null,
      "host": null,
      "deviceid": "10014a70eb"
    }
  }
}

I already checked some similar issues with the SPM here but it said that it's been fixed in 3.5.1 but on my side it still doesn't work. Could you help?

Thank you so much :)

AlexxIT commented 1 year ago

You need to collect integration debug logs

EscapeRush commented 1 year ago

Hi,

Thanks for the fast answer and sorry for not sending it right away.

Here is the debug log : f6fcf76b-14b4-4fdd-8f5f-d84aa3854401.txt

Hope you'll find something.

Thank you

EscapeRush commented 10 months ago

Hi there,

Any news on that?

We would really appreciate if you could look it up when you have time, we can also send you the devices if you want to make some testings.

Thanks a lot

EscapeRush commented 8 months ago

Hi,

Any news on that subject ? We are willing to work closely and supply you all the necessary infos. Would be greatly appreciated.

Thank you

AlexxIT commented 5 months ago

Yes. I can confirm problem. It's similar like for zigbee devices. Cloud doesn't return new devices state...

AlexxIT commented 5 months ago

If you share this device with my account sonofflan@gmail.com and allow me to switch on/off one of channels - I can try to fix this.