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

[TRÅDFRI] Dimming not possible any more #5032

Closed
Kroki0815 opened this issue Mar 3, 2019 · 1 comment · Fixed by #5033
Closed

[TRÅDFRI] Dimming not possible any more #5032

Kroki0815 opened this issue Mar 3, 2019 · 1 comment · Fixed by #5033
Assignees
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@Kroki0815
Copy link

Since last changes is it not possible to send procentual values to the dimm-item of a bulb.
ON/OFF is working. Sending a value has no effect.

Version: 2.5.0-SNAPSHOT Build #1545

Expected Behavior

Sending values beetween 0% and 100% dimms the bulb.

Current Behavior

Sending values beetween 0% and 100% has no effect on the bulb.

2019-03-03 12:20:30.661 [ome.event.ItemCommandEvent] - Item 'iDIMM_SCHREIBTISCH' received command 50 2019-03-03 12:20:30.663 [nt.ItemStatePredictedEvent] - iDIMM_SCHREIBTISCH predicted to become 50 2019-03-03 12:20:30.663 [vent.ItemStateChangedEvent] - iDIMM_SCHREIBTISCH changed from 0 to 50 2019-03-03 12:20:30.667 [vent.ItemStateChangedEvent] - iDIMM_SCHREIBTISCH changed from 50 to 0

Debug:
2019-03-03 12:20:30.661 [DEBUG] [internal.handler.TradfriThingHandler] - Sending payload: {"3311":[{"5851":127.0,"5712":5}],"3":{}} 2019-03-03 12:20:30.662 [DEBUG] [g.tradfri.internal.TradfriCoapClient] - CoAP PUT request uri: coaps://192.168.50.84:5684/15001/65538 payload: {"3311":[{"5851":127.0,"5712":5}],"3":{}} 2019-03-03 12:20:30.664 [DEBUG] [.tradfri.internal.TradfriCoapHandler] - CoAP response options: {} payload: 2019-03-03 12:20:30.666 [DEBUG] [.tradfri.internal.TradfriCoapHandler] - CoAP response options: {"Observe":85, "Content-Format":"application/json", "Max-Age":604800} payload: {"9002":1522496553,"9001":"Schreibtisch","9020":1551610251,"9003":65538,"9054":0,"5750":2,"3":{"0":"IKEA of Sweden","1":"TRADFRI bulb E14 WS opal 400lm","2":"","3":"1.2.221","6":1},"9019":1,"3311":[{"5851":254,"5850":0,"5717":0,"5711":454,"5709":33137,"5706":"efd275","5710":27211,"9003":0}]} 2019-03-03 12:20:30.666 [DEBUG] [internal.handler.TradfriLightHandler] - Setting state to OFF

I do not know exactly since which version this behavior occurs. But for me, the last version i use without problerms ( not only with tradfri ) is Build #1502.

@cweitkamp cweitkamp self-assigned this Mar 3, 2019
@cweitkamp cweitkamp added the bug An unexpected problem or unintended behavior of an add-on label Mar 3, 2019
@cweitkamp
Copy link
Contributor

My fault. In https://github.com/openhab/openhab2-addons/pull/4895 I changed rounding from Math.round() to Math.floor(). First method returns an int, second one a double. We have to add an int cast before creating the payload. I will submit a fix for it.

@cweitkamp cweitkamp added the PR pending There is a pull request for resolving the issue label Mar 3, 2019
@wborn wborn removed PR pending There is a pull request for resolving the issue labels Mar 3, 2019
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

Successfully merging a pull request may close this issue.

3 participants