Closed GoogleCodeExporter closed 9 years ago
Hi again, I've corrected the last line before end so now my rules file look
like this:
var Number percent = 0
rule "Dimmed Light"
when
Item licht_schrank received command
then
if(licht_schrank.state instanceof DecimalType) percent = licht_schrank.state as DecimalType
if(receivedCommand==ON) percent = 100
if(receivedCommand==OFF) percent = 0
if(receivedCommand==INCREASE) percent = percent + 5
if(receivedCommand==DECREASE) percent = percent - 5
if(percent<0) percent = 0
if(percent>100) percent = 100
postUpdate(licht_schrank, percent);
sendHttpPostRequest("http://10.1.2.38/analogWrite?pin=3&value=" + percent);
end
The classicUI is still working while the problems with greent are unchanged.
The webserver logs tell me greent is always sending the old value. For example
if the dimmer is switched off and I move the slider to the right, the webserver
logs the following request from openhab: "POST /analogWrite?pin=3&value=0
HTTP/1.1"
Original comment by stefanm4...@googlemail.com
on 12 Jul 2013 at 6:57
I figured out I need another rule for greent:
rule "Dimmed Light2"
when
Item licht_schrank received update
then
sendHttpPostRequest("http://192.168.178.1/analogWrite?pin=3&value=" + licht_schrank.state.format("%d"));
end
Now it is working. Sorry for issuing a bug report. Please close this issue.
Stefan
Original comment by stefanm4...@googlemail.com
on 12 Jul 2013 at 8:48
Does this mean that the GreenT UI sends a status update and not a command? If
this is the case, I would consider it as a bug of the GreenT UI.
Original comment by kai.openhab
on 12 Jul 2013 at 8:51
@Stefan could you please confirm (or reject) Kai's statement?
@Mihail if that's the case it appears to be your turn ;-)
Original comment by teichsta
on 13 Aug 2013 at 8:07
Hi guys, sorry for the late response. I think this is an issue with how openHAB
deals with this kind of items.
If you make a POST HTTP request to e.g. the Volume demo item
(http://localhost:8080/rest/items/Volume/) with body payload "57", openHAB logs
shows this:
14:06:57.204 INFO runtime.busevents[:42] - Volume received command 57
14:06:57.240 INFO runtime.busevents[:46] - Volume state updated to 57.000076
If you click on some of the UP/DOWN buttons of the same item in the Classic UI,
this is what openHAB logs:
14:16:02.280 INFO runtime.busevents[:42] - Volume received command INCREASE
14:16:02.296 INFO runtime.busevents[:46] - Volume state updated to 82.0798
So, I think there is some kind of a logic behind this item type that updates
the state on receiving a command, but doesn't fire a "command event".
Original comment by mishoboss
on 20 Sep 2013 at 11:23
Original comment by kai.openhab
on 6 Nov 2013 at 8:34
This issue has been migrated to Github. If this issue id is greater than103 its
id has been preserved on Github. You can open your issue by calling the URL
https://github.com/openhab/openhab/issues/<issueid>. Issues with ids less or
equal 103 new ids were created.
Original comment by teichsta
on 17 Nov 2013 at 8:08
see above!
Issue has been migrated to Github and should be discussed there.
Original comment by teichsta
on 21 Nov 2013 at 1:51
Original issue reported on code.google.com by
stefanm4...@googlemail.com
on 12 Jul 2013 at 6:41