Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[shelly] RGBW2 : Exception with when setting brightness to 0 [solved] #6962

Closed
hpd96 opened this issue Feb 5, 2020 · 5 comments
Closed

[shelly] RGBW2 : Exception with when setting brightness to 0 [solved] #6962

hpd96 opened this issue Feb 5, 2020 · 5 comments
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@hpd96
Copy link

hpd96 commented Feb 5, 2020

shelly binding is sending "OFF" to shellyrgbw2 when brighness is set to "0"
URL:
http://192.168.42.254/relay/0?turn=off
answer of shelly is "not found" as API not supporting this

bundle:list | grep Shelly -> 2.5.0 | Shelly Binding

Expected Behavior

no exception
set state to OFF

Current Behavior

when sending "0%" to brightness channel there will be exception [NOK]. brightness will be set to 0% [OK]

2020-02-04 22:49:37.735 [INFO ] [e.model.script.terraSSE dimmer links] - 20
2020-02-04 22:49:38.301 [INFO ] [e.model.script.terraSSE dimmer links] - 10
2020-02-04 22:49:52.755 [INFO ] [e.model.script.terraSSE dimmer links] - 0
2020-02-04 22:49:52.806 [WARN ] [y.internal.handler.ShellyBaseHandler] - shellyrgbw2-66260d ERROR: Unable to process command for channel shelly:shellyrgbw2-white:66260d:channel1#brightness: Shelly API call failed: Unexpected http response: Not Found, url=http://192.168.42.254/relay/0?turn=off (class java.io.IOException)
Stack Trace: [org.openhab.binding.shelly.internal.api.ShellyHttpApi.request(ShellyHttpApi.java:494), org.openhab.binding.shelly.internal.api.ShellyHttpApi.setRelayTurn(ShellyHttpApi.java:134), org.openhab.binding.shelly.internal.handler.ShellyLightHandler.handleDeviceCommand(ShellyLightHandler.java:155), org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.handleCommand(ShellyBaseHandler.java:287), sun.reflect.GeneratedMethodAccessor780.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152), org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59), com.sun.proxy.$Proxy4565.handleCommand(Unknown Source), org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74), org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48), sun.reflect.GeneratedMethodAccessor779.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152), org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52), java.util.concurrent.FutureTask.run(FutureTask.java:266), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)]
2020-02-04 22:49:52.845 [WARN ] [y.internal.handler.ShellyBaseHandler] - shellyrgbw2-66260d ERROR: Unable to process command for channel shelly:shellyrgbw2-white:66260d:channel2#brightness: Shelly API call failed: Unexpected http response: Not Found, url=http://192.168.42.254/relay/1?turn=off (class java.io.IOException)
Stack Trace: [org.openhab.binding.shelly.internal.api.ShellyHttpApi.request(ShellyHttpApi.java:494), org.openhab.binding.shelly.internal.api.ShellyHttpApi.setRelayTurn(ShellyHttpApi.java:134), org.openhab.binding.shelly.internal.handler.ShellyLightHandler.handleDeviceCommand(ShellyLightHandler.java:155), org.openhab.binding.shelly.internal.handler.ShellyBaseHandler.handleCommand(ShellyBaseHandler.java:287), sun.reflect.GeneratedMethodAccessor780.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152), org.eclipse.smarthome.core.internal.common.InvocationHandlerSync.invoke(InvocationHandlerSync.java:59), com.sun.proxy.$Proxy4569.handleCommand(Unknown Source), org.eclipse.smarthome.core.thing.internal.profiles.ProfileCallbackImpl.handleCommand(ProfileCallbackImpl.java:74), org.eclipse.smarthome.core.thing.internal.profiles.SystemDefaultProfile.onCommandFromItem(SystemDefaultProfile.java:48), sun.reflect.GeneratedMethodAccessor779.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43), java.lang.reflect.Method.invoke(Method.java:498), org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:152), org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:52), java.util.concurrent.FutureTask.run(FutureTask.java:266), java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149), java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624), java.lang.Thread.run(Thread.java:748)]

Possible Solution

Steps to Reproduce (for Bugs)

shelly RGBW2 is set to WHITE mode (in my case)

items:
Dimmer Lampe_Dimmer_Terrasse_westen_helligkeit -> shelly:shellyrgbw2-white:66260d:channel1#brightness:
Dimmer Lampe_Dimmer_Terrasse_osten_helligkeit -> shelly:shellyrgbw2-white:66260d:channel2#brightness:

rules:

  1. sendCommand( Lampe_Dimmer_Terrasse_westen_helligkeit, 10 ) [OK]
  2. sendCommand( Lampe_Dimmer_Terrasse_westen_helligkeit, 0 ) [NOK]
  3. sendCommand( Lampe_Dimmer_Terrasse_osten_helligkeit, 0 ) [NOK]

Context

Your Environment

  • OH 2.5.0 final
  • ubuntu 16 LTS intel atom
  • oracle java 1.8
@hpd96 hpd96 added the bug An unexpected problem or unintended behavior of an add-on label Feb 5, 2020
@hpd96 hpd96 changed the title [shelly] shellyrgbw2 - white mode : set brightness to 0 leads to exception [shelly] Bug: Exception with RGBW2 when setting brightness to 0 Feb 5, 2020
@markus7017 markus7017 added the work in progress A PR that is not yet ready to be merged label Feb 8, 2020
@markus7017
Copy link
Contributor

@hpd96
Copy link
Author

hpd96 commented Feb 8, 2020

Hello Markus,

276 x Active x 80 x 2.5.2.202002081026 x openHAB Add-ons :: Bundles :: Shelly Binding

looking good: no exception

however noting now a flashing while going to OFF:

auto-off mode (default) is ON
after going to brightness 0 there is sequence
OFF - ON (0.4 sec) - OFF
on shelly dimmer lights visible for 400ms again

in the openhab logs is nothing to see about flashing

now i set thing shellyrgbw2 Helligkeit-Auto-EIN to OFF and added
if (bright == 0) { Lampe_Dimmer_Terrasse_westen.sendCommand(OFF) }
--> flashing disappeared

--

2020-02-08 16:36:39.908 [vent.ChannelTriggeredEvent] - deconz:switch:homeserver:d0cf5efffecb75d6011000:buttonevent triggered 3002

==> /opt/openhab/userdata/logs/openhab.log <==

2020-02-08 16:36:39.914 [INFO ] [e.model.script.terraSSE dimmer links] - 0

==> /opt/openhab/userdata/logs/events.log <==

2020-02-08 16:36:39.927 [ome.event.ItemCommandEvent] - Item 'Lampe_Dimmer_Terrasse_westen_helligkeit' received command 0

2020-02-08 16:36:39.938 [ome.event.ItemCommandEvent] - Item 'Lampe_Dimmer_Terrasse_osten_helligkeit' received command 0

2020-02-08 16:36:39.948 [ome.event.ItemCommandEvent] - Item 'Lampe_Dimmer_Terrasse_westen' received command OFF

2020-02-08 16:36:39.963 [ome.event.ItemCommandEvent] - Item 'Lampe_Dimmer_Terrasse_osten' received command OFF

--

markus7017 added a commit to markus7017/openhab-addons that referenced this issue Feb 9, 2020
…BW2 Exception on

brightness=0; openhab#6981 Initial implementation of Door/Window; openhab#6879 FTR
Ext. Sensors for Shelly 1/1PM;openhab#6950-WIP Fix mapping of input channels
via Coap; openhab#6886 API retry on ExecutionException; Implementation of
TranslationProvider (allows loading messages from properties)

Signed-off-by: Markus Michels <markus7017@gmail.com>
@markus7017
Copy link
Contributor

will be included in PR #6985

@hpd96
Copy link
Author

hpd96 commented Feb 10, 2020

276 x Active x 80 x 2.5.2.202002081026 x openHAB Add-ons :: Bundles :: Shelly Binding

looking good: no exception

@hpd96 hpd96 closed this as completed Feb 10, 2020
@markus7017 markus7017 added about to close Issue potentially resolved and no feedback received and removed awaiting feedback work in progress A PR that is not yet ready to be merged labels Apr 18, 2020
@markus7017 markus7017 changed the title [shelly] Bug: Exception with RGBW2 when setting brightness to 0 [shelly] RGBW2 : Exception with when setting brightness to 0 [solved] Apr 18, 2020
@markus7017 markus7017 reopened this Apr 18, 2020
@markus7017 markus7017 removed the about to close Issue potentially resolved and no feedback received label Apr 22, 2020
@markus7017
Copy link
Contributor

included in version 2.5.4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

No branches or pull requests

2 participants