Giter Club home page Giter Club logo

Comments (23)

smarthomefamilyverrips avatar smarthomefamilyverrips commented on June 29, 2024 1

This is happening since 2024.5 already #116948

from core.

home-assistant avatar home-assistant commented on June 29, 2024

Hey there @balloob, @bieniu, @thecode, @chemelli74, @bdraco, mind taking a look at this issue as it has been labeled with an integration (shelly) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of shelly can trigger bot actions by commenting:

  • @home-assistant close Closes the issue.
  • @home-assistant rename Awesome new title Renames the issue.
  • @home-assistant reopen Reopen the issue.
  • @home-assistant unassign shelly Removes the current integration label and assignees on the issue, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information, problem in dependency, problem in custom component) to the issue.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information, problem in dependency, problem in custom component) on the issue.

(message by CodeOwnersMention)


shelly documentation
shelly source
(message by IssueLinks)

from core.

thecode avatar thecode commented on June 29, 2024

Please enable Debug for Shelly integration, wait for a device to become unavailable, disable debug and attach the log.

Note: it is better to drag the log into the comment (which will add it as an attachment) and not copy paste as it is hard to read logs in GitHub.

Thanks

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

(See the bottom most comment from me, that includes the log and what I found in it).

I am not sure if I can do that as turning on that debug logging makes my syslog go absolutelly nuts with many thousands of lines per minute (e.g., "[aioshelly.rpc_device.wsrpc]") as I have 41 WiFi shelly devices acting as passive bluetooth scanners for 11 Shelly BLU motion sensors. I will try however... (Y.I.K.E.S.)

Just as an FYI so you have the details here, I created an automation that reloads the config entries for any of my shelly motion 2 sensors when they become "unavailable" but it would run endlessly as I had it in parallel and 1000 (cuasing some kind of a race condition or loop I guess) but instead changed it to queued 30 and it works like a charm, also I can tell you that in checking traces I noticed:

@ 8:26:59pm it ran for the Bedroom 3 Shelly Motion 2 Sensor
@ 8:27:00pm - Den Shelly Motion Sensor
@ 8:27:00pm - Bathroom Shelly Motion 2 Sensor
@ 8:27:00pm - Basement Stairs Shelly Motion 2
@ 8:27:01pm - Kitchen Main Shelly Motion Sensor

  • and then not again in the next two hours -

FYI, below yaml syntax is kludgy but works fine - as I wanted to use the trigger ID in the actual command for the reload to get rid of all of those if statements at the bottom but I couldn't get the syntax right. I will post the debug data here tomorrow -

`alias: Any Shelly Motion 2 Becomes Unavailable -> Reload It's Config Entry
description: ""
trigger:

  • platform: state
    entity_id:
    • binary_sensor.basement_laundry_shelly_motion_2_motion
      to: unavailable
      id: Basement Laundry Shelly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.basement_office_shelly_motion_2_motion
      to: unavailable
      id: Basement Office Shelly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.basement_stairs_shelly_motion_2_motion
      to: unavailable
      id: Basement Stairs Shelly Motion 2
  • platform: state
    entity_id:
    • binary_sensor.bathroom_shelly_motion_2_motion
      to: unavailable
      id: Bathroom Shelly Motion 2 Sensor
  • platform: state
    entity_id:
    • binary_sensor.bedroom_3_shelly_motion_2_motion
      to: unavailable
      id: Bedroom 3 Shelly Motion 2 Sensor
  • platform: state
    entity_id:
    • binary_sensor.den_shelly_motion_2_motion
      to: unavailable
      id: Den Shelly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.dining_room_shelly_motion_2_motion
      to: unavailable
      id: Dining Rm Shelly Motion 2
  • platform: state
    entity_id:
    • binary_sensor.hallway_shelly_motion_2_motion
      to: unavailable
      id: Hallway (Upper) Shelly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.kitchen_shelly_motion_2_motion
      to: unavailable
      id: Kitchen Main Shelly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.living_room_shelly_motion_2_motion
      to: unavailable
      id: Living Room Front Shlly Motion Sensor
  • platform: state
    entity_id:
    • binary_sensor.master_bedroom_shelly_motion_2_motion
      to: unavailable
      id: Master Bedroom Shelly Motion 2 Sensor
      condition: []
      action:
  • if:
    • condition: trigger
      id:
      • Basement Laundry Shelly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.basement_laundry_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Basement Office Shelly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.basement_office_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Basement Stairs Shelly Motion 2
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.basement_stairs_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Bathroom Shelly Motion 2 Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.bathroom_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Bedroom 3 Shelly Motion 2 Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.bedroom_3_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Den Shelly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.den_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Dining Rm Shelly Motion 2
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.dining_room_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Hallway (Upper) Shelly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.hallway_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Kitchen Main Shelly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.kitchen_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Living Room Front Shlly Motion Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.living_room_shelly_motion_2_motion
  • if:
    • condition: trigger
      id:
      • Master Bedroom Shelly Motion 2 Sensor
        then:
    • service: homeassistant.reload_config_entry
      metadata: {}
      data: {}
      target:
      entity_id: binary_sensor.master_bedroom_shelly_motion_2_motion
      mode: queued
      max: 30`

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

Here is the HUGE log and I did check the automation which did show that the "Den Shelly Motion Sensor" went offline at 11:47:38pm and the automation reloaded it's config entry and it was then (and is still now) online. Also the details in home assistant about the device show this in the log as well (the red rectangle). Below that I have attached the log file:

image

The IP address for the Den Shelly Motion Sensor (which is a Shelly Motion 2) you should see in the log would be 192.168.10.53.

2024-06-06 23:47:38.589 ERROR (MainThread) [homeassistant.components.shelly] Error fetching Den Shelly Motion 2 data: Sleeping device did not update within 3600 seconds interval

...ended up triggering the automation:

homeassistant.components.automation.any_shelly_motion_2_becomes_unavailable_reload_it_s_config_entry

Pay attention to these times in the log file:

23:47:38.994
23:47:38.995
23:47:38.996
23:50:00.047

I had to remove a gazillion lines from the file so I got it from 457MB to 14MB so it now fits in 25MB upload limit):

Uploading home-assistant_shelly_2024-06-07T04-07-00.181Z.log…

Thank you for your help, I look forward to hearing back (your fix will not make me disable that automation though, it is good insurance for me :-) )

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

FYI my automation still makes things go berserk sometimes, I had to disable it. So, HALP!

from core.

rhoddan avatar rhoddan commented on June 29, 2024

I have similar problem. Almost every day the Shellies became unavailable. That also affected my energy statistic (VERY annoying). It happens exactly same time stamps. I have tested different firmwares as well
IMG_0514
IMG_0515

from core.

Eisbaer2 avatar Eisbaer2 commented on June 29, 2024

Same here with a shelly pro 3EM.
In the shelly app it is abailable all the time.

from core.

thecode avatar thecode commented on June 29, 2024

Same here with a shelly pro 3EM. In the shelly app it is abailable all the time.

Shelly Pro 3EM is using a different protocol and can't be the same, please create a new issue with logs. Thanks

from core.

chemelli74 avatar chemelli74 commented on June 29, 2024

as I have 41 WiFi shelly devices acting as passive bluetooth scanners for 11 Shelly BLU motion sensors.

Out of curiosity, do you have only motion sensors as gen1 devices ?

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

as I have 41 WiFi shelly devices acting as passive bluetooth scanners for 11 Shelly BLU motion sensors.

Out of curiosity, do you have only motion sensors as gen1 devices ?

No, I have almost 60 shelly devices, they are Gen 1 and Gen 2. The only one device type experiencing this issue is the Shelly Motion 2's (which are Gen 1: Hardware: gen1 (SHMOS-02)). There are the kinds of devices I have:

Shelly Motion 2 (12)
Shelly Plus Plug (8)
Shelly +1 (11)
Shelly 1L (7)
Shelly Pro 3EM (1)
Shelly +2PM (1)
Shelly BLU Motion (14)
Shelly Dimmer 2 (3)

So in fact, every Shelly Motion device I have is Gen 2 - and FYI they are updated with latest released production (non-beta) firmware.

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

This is happening since 2024.5 already #116948

This might not be the same issue that I am having however, as I did in this thread post the list of my devices and counts for them, and of that list of device types this issue is only happening with the Shelly Motion 2's (it may include affecting one of your device types that I do not have however of course).

from core.

smarthomefamilyverrips avatar smarthomefamilyverrips commented on June 29, 2024

This is happening since 2024.5 already #116948

Tuis might bot be the same issue that I am having however, as I did in this thread post the list of my devices and counts for them, and of that list of device types this issue is only happening with the Shelly Motion 2's (it may include one of your device types that I do not have however of course).

I only have Shelly Motions

from core.

Eisbaer2 avatar Eisbaer2 commented on June 29, 2024

My Shelly Pro 3EM becomes available and unavailable without any manual actions of me. "It just happens"
But it is available all the time in the shelly app with fresh data.

from core.

chemelli74 avatar chemelli74 commented on June 29, 2024

No, I have almost 60 shelly devices, they are Gen 1 and Gen 2. The only one device type experiencing this issue is the Shelly Motion 2's (which are Gen 2).

image

Shelly Motion 2 (12) Shelly Plus Plug (8) Shelly +1 (11) Shelly 1L (7) Shelly Pro 3EM (1) Shelly +2PM (1) Shelly BLU Motion (14) Shelly Dimmer 2 (3)

so you have 3 types of gen1 devices:

  • Shelly Motion 2
  • Shelly 1L
  • Shelly Dimmer 2

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

Yes @chemelli74 I stand corrected, all of my Shelly Motion 2's ARE Gen 1:

Hardware: gen1 (SHMOS-02)

from core.

bieniu avatar bieniu commented on June 29, 2024

We suspect that the problem may be caused by blocking the event loop by another integration (probably custom one). The CoIoT packet with status reaches the HA server but cannot be processed correctly.
To check this, please enable HA built-in debug mode, restart HA and attach here the log file after few hours.

from core.

mstefany avatar mstefany commented on June 29, 2024

I am having the same issue, since upgrading to 2024.6.x all my Shelly Motion devices go regularly offline, only reloading them helps. Also, Shelly Smoke devices constantly report expired credentials, which is probably another issue with Shelly integration. 😭

from core.

KruseLuds avatar KruseLuds commented on June 29, 2024

@bieniu I already attached the log, what is the status?

from core.

bieniu avatar bieniu commented on June 29, 2024

Where is the log?

from core.

tbclark3 avatar tbclark3 commented on June 29, 2024

I also have multiple Shelly devices, and I have (I think) the same issue with the motion 2 but not with the others. In my case, the motion 2 starts going offline shortly after restarting HA and remains unstable for several hours, requiring multiple integration reloads. However, after a few hours, the motion 2 stabilizes and remains reliable until the next restart of HA.

from core.

rhoddan avatar rhoddan commented on June 29, 2024

home-assistant 5.log

I also have multiple Shelly devices, and I have (I think) the same issue with the motion 2 but not with the others. In my case, the motion 2 starts going offline shortly after restarting HA and remains unstable for several hours, requiring multiple integration reloads. However, after a few hours, the motion 2 stabilizes and remains reliable until the next restart of HA.

Yes this drives me crazy. I have similar with Shelly 3EM. Do you have Unifi wifi?

from core.

tbclark3 avatar tbclark3 commented on June 29, 2024

Yes, I have Unifi WiFi, but that hasn't changed recently. Like the OP, my issue with the Shelly integration started in May, although I think it was earlier than 2024.5.5.

from core.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.