Hi,
my problem looks like it’s being similar to this one: [SOLVED] Update slider from MQTT feedback
but I can’t figure out howto translate the solution into my configuration.
I control my rollershutters via http-requests sent to my Rademacher Homepilot (433 Mhz technology) and I can receive the status via another http-request. Therefore I implemented two items. One controls the rollershuter via a slider and a rule:
Number rolloSetPosWohnLinks1 "Rollo links 1 [%s %%]" <rollershutter> (gRolloWohnLinks)
rule "rollo_set_SetPos_WohnLinks1"
when
Item rolloSetPosWohnLinks1 received update
then
SetPos = rolloSetPosWohnLinks1.state as DecimalType
rolloUrl = String::format("http://xxx.xxx.xxx.xxx/deviceajax.do?cid=9&did=10002&goto=" + "%s" + "&command=1", SetPos)
sendHttpGetRequest(rolloUrl)
end
My sitemap only contains:
Slider item=rolloSetPosWohnLinks1
Text item=aktPosWohn1
The second item displays the actual position of the rollershutter:
Sorry, but that doesn’t work. The rollershutter can be controlled by the Rolladen item, but the slider jumps back to 0 immediately after usage. Also the slider isn’t updated by the position of the rollershutter.
what is the state of the aktPosWohn1 String Item now?
A Dimmer Item accepts percentage values (0 to 100)
Maybe you need to cast the result of the http call to a PercentType? (not sure)
This works fine for me: http="<[http://homepilot.local/deviceajax.do?device=10004:60000:JSONPATH($.device.position)]"
My Problem is, when I used the same item for target and current position, the rollershutter stops, when current position is refreshed during movement.
Regards,
Reik.