openSprinkler Binding: How to set nextDuration (Basic UI, sensCommand, Jython

Is there any reason in particular that you choose to map the channel in .items file rather than using PaperUI to link the items. This may be the cause of some of your problems

I use text files to create items too, but then I use paperUI to link the items to Things and Channels and I am having ZERO problems with OpenSprinkler. You might want to give it try. It can’t hurt.

Here is my items file for reference.


Switch vStation01RunStatus "Zone 1 Run Status [MAP(]"   <status>        (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation01Queued "Zone 1 Queue Status [MAP(]"  <status>        (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation01RemainingTime "Zone 1 Running Time"                               <time>          (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation01NextDuration "[%.0f s]"                                           <time>          (gSprinkler, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Number:Time vStation01NextDurationMin "[%.0f min]"                                      <time>          (gSprinkler, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Switch vStation02RunStatus "Zone 2 Run Status [MAP(]"   <status>        (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation02Queued "Zone 2 Queue Status [MAP(]"  <status>        (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation02RemainingTime "Zone 2 Running Time"                                <time>         (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation02NextDuration "[%.0f s]"                                            <time>         (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation02NextDurationMin "[%.0f min]"                                       <time>         (gSprinkler, gSprinklerDurationMin, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Switch vStation03RunStatus "Zone 3 Run Status [MAP(]"    <status>       (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation03Queued "Zone 3 Queue Status [MAP(]"   <status>       (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation03RemainingTime "Zone 3 Running Time"                                <time>         (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation03NextDuration "[%.0f s]"                                            <time>         (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation03NextDurationMin "[%.0f min]"                                       <time>         (gSprinkler, gSprinklerDurationMin, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Switch vStation04RunStatus "Zone 4 Run Status [MAP(]"    <status>       (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation04Queued "Zone 4 Queue Status [MAP(]"  <status>        (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation04RemainingTime "Zone 4 Running Time"                                <time>         (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation04NextDuration "[%.0f s]"                                           <time>          (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation04NextDurationMin "[%.0f min]"                                       <time>         (gSprinkler, gSprinklerDurationMin, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Switch vStation05RunStatus "Zone 5 Run Status [MAP(]"   <status>        (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation05Queued "Zone 5 Queue Status [MAP(]"  <status>        (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation05RemainingTime "Zone 5 Running Time"                               <time>          (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation05NextDuration "[%.0f s]"                                           <time>          (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation05NextDurationMin "[%.0f min]"                                      <time>          (gSprinkler, gSprinklerDurationMin, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Switch vStation06RunStatus "Zone 6 Run Status [MAP(]"   <status>        (gSprinkler, gSprinklerZones, Group_HabPanel_Dashboard)
Switch vStation06Queued "Zone 6 Queue Status [MAP(]"  <status>        (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation06RemainingTime "Zone 6 Running Time"                               <time>          (gSprinkler, Group_HabPanel_Dashboard) 
Number:Time vStation06NextDuration "[%.0f s]"                                           <time>          (gSprinkler, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Number:Time vStation06NextDurationMin "[%.0f min]"                                      <time>          (gSprinkler, gSprinklerDurationMin, Group_HabPanel_Dashboard) 
Number:ElectricCurrent vCurrentDraw "Sprinkler Current [%.0f mA]" <enery> (gSprinkler, Group_HabPanel_Dashboard) {channel="opensprinkler:device:http:device:currentDraw" [profile="default"] } 
Switch vSprinklerRunState "Sprinkler is [MAP(]" <status> (gSprinkler, Group_HabPanel_Dashboard)

Number vWaterLevel "Water Level is [%.0f ]" <water> (gSprinkler, gSprinklerDurationMin, Group_HabPanel_Dashboard) { http="<[openSprinkler:10000:JSONPATH($.wl)]" }    

I’ve never tried linking things to items through PaperUI - the way I showed above is how I learned to do it originally. I’ll give it a try and see if it makes a difference.


That still makes sense and is the way to go when the binding does not support discovery or a channel does not exist in the binding, such as was the case until recently for opensprinkler currentdraw(see my .items). But now in the opensprkler binding after setting the number of stations using PaperUI, all of those stations should be be available in PaperUI as things and so you should just link your items to the channels available in each station. From everything I’ve read, I’m no expert here, this the preferred/recommended method for building your OpenHAB system since OH2.4. Just some background and alternative way to get the job done.

It seems that this issue have resurfaced with 3.3.0-1…

root@crow:~# apt list --installed  | grep -i openhab
openhab-addons/stable,stable,now 3.3.0-1 all [installed]
openhab/stable,stable,now 3.3.0-1 all [installed]


Number:Time     Water_Lawn6_ReminingTime   "06 Time Remaining"             { channel="opensprinkler:station:http:06:remainingWaterTime" }
Number:Time     Water_Lawn6_nextDuration   "06 Next Duration"              { channel="opensprinkler:station:http:06:nextDuration" }```

[WARN ] [.handler.OpenSprinklerStationHandler] - Ignoring implausible non-QuantityType command for NEXT_DURATION

I tried to change it from Number:Time to just Number… also didn’t work.
The following change is listed in the change log, but the last update was too long ago…?

[opensprinkler] Add Veto and some default times to state options. #11816

It must be Number:Time and the command must be a quanity type. How are you sending the command, from a rule or using the items built in command options?

Hi OpenHAB,

Any response to this…?
NextDuration was working and now bot anymore… LOTS of water is wasted because of this issue.

Yes you got a response and you never replied. Provide information on how to reproduce and test for this and I can look at it when I start using my watering system again after winter. Knowing what the EVENT.LOG shows was sent to the channel as a command would be helpful.