StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
621 stars 112 forks source link

[BUG] Old configuration retained #450

Closed wsw70 closed 4 years ago

wsw70 commented 4 years ago

Environment

Describe the bug

I installed my first three Shelly 2.5 devices in roller shutter mode, one of them got recognized as such by ShellyForHASS and the two others behave weirdly.

They were first seen as switches (which is possible, the shutter mode needs to be manually switched from the default and they may have got recognized during this time) and then after some time and HA and devices reboots they now display the shutter behaviour AND the switches in an unavailable state

image

The one other device is displayed correctly (it is unavailable because it is not installed for good yet)

image

Steps to Reproduce

It happened twice when installing new devices

Expected behavior

The current setup of the device should be reflected in HA

Screenshots

(see above)

Traceback/Error logs

Additional context

Status of the "faulty" Shelly device

{
  "wifi_sta": {
    "connected": true,
    "ssid": "MYSSID",
    "ip": "192.168.10.254",
    "rssi": -65
  },
  "cloud": {
    "enabled": false,
    "connected": false
  },
  "mqtt": {
    "connected": false
  },
  "time": "18:47",
  "unixtime": 1600627648,
  "serial": 5,
  "has_update": false,
  "mac": "105XXXXXXXXX",
  "cfg_changed_cnt": 0,
  "actions_stats": {
    "skipped": 0
  },
  "rollers": [
    {
      "state": "stop",
      "power": 0,
      "is_valid": true,
      "safety_switch": false,
      "overtemperature": false,
      "stop_reason": "normal",
      "last_direction": "close",
      "current_pos": 101,
      "calibrating": false,
      "positioning": true
    }
  ],
  "meters": [
    {
      "power": 0,
      "overpower": 0,
      "is_valid": true,
      "timestamp": 1600627648,
      "counters": [
        0,
        0,
        0
      ],
      "total": 0
    },
    {
      "power": 0,
      "overpower": 0,
      "is_valid": true,
      "timestamp": 1600627648,
      "counters": [
        0,
        0,
        0
      ],
      "total": 0
    }
  ],
  "inputs": [
    {
      "input": 0,
      "event": "",
      "event_cnt": 0
    },
    {
      "input": 0,
      "event": "",
      "event_cnt": 0
    }
  ],
  "temperature": 42.65,
  "overtemperature": false,
  "tmp": {
    "tC": 42.65,
    "tF": 108.77,
    "is_valid": true
  },
  "update": {
    "status": "idle",
    "has_update": false,
    "new_version": "20200827-065456/v1.8.3@4a8bc427",
    "old_version": "20200827-065456/v1.8.3@4a8bc427"
  },
  "ram_total": 49504,
  "ram_free": 37212,
  "fs_size": 233681,
  "fs_free": 147588,
  "voltage": 233.58,
  "uptime": 140
}
wsw70 commented 4 years ago

I forcefully removed the old entities and so far they did not reappear - so maybe this is the way to go?

hakana commented 4 years ago

Ok, I close this issue for now. Please reopen it if this is a problem more than once.