Code Monkey home page Code Monkey logo

Comments (12)

gsenas avatar gsenas commented on July 17, 2024 1

Thank you for your help

from core.

home-assistant avatar home-assistant commented on July 17, 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.

chemelli74 avatar chemelli74 commented on July 17, 2024

@gsenas are you on latest build, 2024.6.3 ?

I so please add the following to configuration.yaml , restart HA, and post the log:

logger:
  default: warning
  logs:
    homeassistant.components.shelly: debug
    aioshelly: debug

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.

And add diagnostics (menu configuration -> integration -> shelly -> download diagnostics )

from core.

thecode avatar thecode commented on July 17, 2024

Home assistant doesn't control the physical switch, you probably have an automation or something that turn the device on/off.

from core.

gsenas avatar gsenas commented on July 17, 2024

home-assistant_shelly_2024-06-19T14-35-36.266Z.log

Please find attached the log. The snipped covers a period of time when I manually pressed the physical switch attached to a Shelly Dimmer (IP: 192.168.1.47), the light turned on, and then pressed the physical switch again with no results (except for a brief "bounce" effect).

Core: 2024.6.3
Supervisor: 2024.06.0
Operating System: 12.4
Frontend: 20240610.1

There are no automations involved with that switch. If I revert the Home Assistant Core to 2024.4.4 the physical switch works again without doing anything else.

from core.

thecode avatar thecode commented on July 17, 2024

This is from your log:

1101: output
2101: input(binary)
2102: inputEvent
2103: inputEventCnt

2024-06-19 16:35:09.721 [0, 1101, 0], [0, 2101, 1], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:24.725 [0, 1101, 0], [0, 2101, 1], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:25.428 [0, 1101, 1], [0, 2101, 0], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:26.559 [0, 1101, 1], [0, 2101, 0], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:28.560 [0, 1101, 1], [0, 2101, 0], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:29.349 [0, 1101, 0], [0, 2101, 1], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:29.362 http request: /light/0 (params={'turn': 'on', 'brightness': 90})
2024-06-19 16:35:29.635 [0, 1101, 1], [0, 2101, 1], [0, 2102, ''], [0, 2103, 37],
2024-06-19 16:35:30.147 [0, 1101, 1], [0, 2101, 1], [0, 2102, 'L'], [0, 2103, 38],
2024-06-19 16:35:30.556 [0, 1101, 1], [0, 2101, 1], [0, 2102, 'L'], [0, 2103, 38],
2024-06-19 16:35:32.556 [0, 1101, 1], [0, 2101, 1], [0, 2102, 'L'], [0, 2103, 38],

I cut down some non-important parts of the log lines since they are very long.
There are two things in this log.

  1. There is a request from HA to turn on the device, unless you started it using the UI (please confirm) there is an automation that trigger it, we don't send a light command to the device without something that trigger it.
  2. There are very close on/off input changes in the switch.

If you can create another log with the exact steps you pressed it would help understanding what is causing it.

from core.

thecode avatar thecode commented on July 17, 2024

Adding another line which I forgot:

2024-06-19 16:35:29.361 DEBUG (MainThread) [homeassistant.components.shelly] Setting state for entity Rele entrada, state: {'turn': 'on', 'brightness': 90}

This is a trigger from UI/automation

from core.

gsenas avatar gsenas commented on July 17, 2024

Thank you for you super quick response.

  • I can confirm I did not use Home Assistant at all to switch on/off any shelly during the period covered by the log.
  • To be more precise, these are specific steps:
  1. Initial state: all lights turned off, showing in HA as off. All shellys configured as edge switch.
  2. Manually pressed physical switch attached to shelly: light turns on, shows in HA "on" as well
  3. Manually pressed physical switch attached to shelly: light "bounces" (turns off only to turn on again after a fraction of a second). Show in HA "on".

Regarding the automation, actually YES, there is an automation I forgot about previously to adjust the brightness through the time of day. I attach both involved. This may be the cause, however as soon as I reverted back to 2024.4.4 everything went back to normal.

automations.zip

from core.

thecode avatar thecode commented on July 17, 2024

What happen if you disable this automation(s)? (one of the files you attached in the zip is empty)

from core.

gsenas avatar gsenas commented on July 17, 2024

Sorry, let me upload the file with the automations again while I upgrade the HA core again.

automations.zip

from core.

gsenas avatar gsenas commented on July 17, 2024

Good news! Upgraded again to 2024.6.3, disabled the automation (the one that sets the "default" brightness) and its working as expected.

I'll try to find a way to set the default brightness without these unintended side effect, however the integration has different behavior since 2024.4.4.

Should we close the issue?

from core.

thecode avatar thecode commented on July 17, 2024

Automations now runs faster, this is not related to Shelly but other performance improvements in HA.
Making an automation to react on the input change is very tricky, you can either make the automation run on the out state change (e.g., Light state changed to on) or configure the device as detached switch and create an automation that turns the light on (with brightness) or off according to the input (I do something similar, drawback doesn't work when HA is down).

Thanks for reporting back, I highly recommend to try our Community Forum or join our Discord chat server and get suggestions from other members.

Yes we should close this issue.

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.