Update slider from JSON feedback

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"
	Item rolloSetPosWohnLinks1 received update
    SetPos = rolloSetPosWohnLinks1.state as DecimalType
    rolloUrl = String::format("http://xxx.xxx.xxx.xxx/deviceajax.do?cid=9&did=10002&goto=" + "%s" + "&command=1", SetPos)

My sitemap only contains:

Slider item=rolloSetPosWohnLinks1
Text item=aktPosWohn1

The second item displays the actual position of the rollershutter:

String aktPosWohn1 "Akt.Pos. [%s]" {http="<[http://xxx.xxx.xxx.xxx/deviceajax.do?device=10002:30000:JS(getValue.js)]"}

getValue.js is defined as:

(function(i) {
    var json = JSON.parse(i);
    return json['device']['position'];

I should mention that my rollershutters can also be controlled via hardware wallswitches and by a 433MHz remote control.

I want to use my slider to control the shutter and also display its state for example after the shutter has beend moved by the remote control.

Can someone point me into the correct direction?

No ideas, anybody?

Hi All,

a year later, but this might help others:

Dimmer Rolladen       "Rolladen: [%d %%]"      (Test)  {http=">[*:POST:http://homepilot/deviceajax.do?cid=9&did=10123456&goto=%2$s&command=0] <[http://homepilot/deviceajax.do?devices:10000:JSONPATH($.devices[:1].statusesMap.Position)]"}

Best regards,


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)

Check: Type Conversions

Got the solution. Simply had to change the input part of the request to


Don’t know why the JSONPATH command didn’t work

so you changed the refreshintervalinmilliseconds from 30000 (30 secs) to 10000 (10 secs) and this fixed the problem? strange…

The Dimmer Item works now?

No, I didn’t change the refreshintervalinmilliseconds. I changed postcontent from




where getValue.js is defined as:

(function(i) {
    var json = JSON.parse(i);
    return json['device']['position'];

This works fine for me:
My Problem is, when I used the same item for target and current position, the rollershutter stops, when current position is refreshed during movement.