Hi,
As stated by @rlkoshak, the loop is obvious!
To conclude: [quote=“Nishit, post:1, topic:30678”]
Rule “RED LED”
when
Item Led_R received command
[/quote]
and then changing the Led_R state in the same rule
George,
I read that thread, and understood the example of dimmer, but how should I send that value of variable via http binding?
Are my item setting for it OK??(Just the binding part, as I would add a proxy item with it)
You said at one point, if I remember correctly, that you have been using OH 1 for some time. Your questions make we wonder if you do not have as much experience as needed.
I recommend reading the Beginner’s Tutorial, if you truely have experience with Oh 1, the Migration Tutorial, and the Introduction and Concepts sections of the Manual. You might also get some benefit by activating the demo and looking at the demo configs.
There is clearly a disconnect between your experience and knowledge of how OH works and my expectations of what you should know as someone who has used OH 1 for some time.
Now, if I’m wrong and it was someone else who said that then I apologize. Regardless you should read the above resources.
Yes,
I have used OH1 in past, but then due to hardware failure I had to concentrate on learning linux and python so I lost the command over OH, but I will read your suggestions, thanks for the help.
Rich,
I tried some rules,
but with my current settings of rules and items, the http binding sends the whole link like this ‘192.168.0.108:5000/red3/?d=%2$s’
where as it should send the value sent by the rule/ the python script returns: 'could not convert string to float’
Here are my rules settings:
rule "blue led"
when
Item Led_B received command
then
if (receivedCommand == DECERASE){
Led_B.sendCommand((Led_B.state as DecimalType) - 5)
}
else if (receivedCommand == INCREASE){
Led_B.sendCommand((Led_B.state as DecimalType) + 5)
}
end
Rossoko,
I also tried udo’s suggestion, but I only get the value update in the sitemap(in UI app), but the same value is not transmitted to my http server.
What binding version are you using? Dimmer type support in the binding only appeared in Nov 2016. I do not know which OH versions that will have got into.