openhab-addons
openhab-addons copied to clipboard
[OpenSprinkler] station next_duration broken after upgrade
Hi OH Team,
Regarding OpenSprinkler binding..
After an upgrade to 3.3.0-1, I get the following openhab.log error when changing the next_duration channel..
2022-07-10 13:40:44.311 [WARN ] [.handler.OpenSprinklerStationHandler] - Ignoring implausible non-QuantityType command for NEXT_DURATION
.items
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" }
This worked fine before the upgrade.
Thanks Francois.
@fafter82 - which value are you trying to set? QuantityType is expected: https://github.com/openhab/openhab-addons/blob/c729b82d59473f1fac871a5b18bda35f697fcc7a/bundles/org.openhab.binding.opensprinkler/src/main/java/org/openhab/binding/opensprinkler/internal/handler/OpenSprinklerBaseHandler.java#L73-L76
Possibly related PR, but not sure: #11816
Hello @jlaur, I have followed the Add-On Docs for next duration with a slider on a basic sitemap..
sprinkler.things
Bridge opensprinkler:http:http [hostname="sprinky", port=8080, pasword="opendoor", refresh=30] { Thing station 01 [stationIndex=0] Thing station 02 [stationIndex=1] Thing station 03 [stationIndex=2] Thing station 04 [stationIndex=3] Thing station 05 [stationIndex=4] Thing station 06 [stationIndex=5] Thing station 07 [stationIndex=6] Thing station 08 [stationIndex=7] }
sprinkler.items
Number:Time Water_Garden_nextDuration "04 Next Duration" { channel="opensprinkler:station:http:04:nextDuration" }
main.sitemap
Slider icon="time" label="Duration" item=Water_Garden_nextDuration minValue=5 maxValue=30 step=5
At openhab startup, the next duration initiates with a very hight value..
events.log
2022-07-23 12:24:56.585 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Water_Garden_ReminingTime' changed from NULL to 0 min 2022-07-23 12:24:56.588 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Water_Garden_nextDuration' changed from NULL to 64800 s
When moving the slider, i get..
`==> /var/log/openhab/events.log <== 2022-07-23 12:27:29.960 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'Water_Garden_nextDuration' received command 15 2022-07-23 12:27:29.960 [INFO ] [penhab.event.ItemStatePredictedEvent] - Item 'Water_Garden_nextDuration' predicted to become 15 2022-07-23 12:27:29.963 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Water_Garden_nextDuration' changed from 64800 s to 15
==> /var/log/openhab/openhab.log <== 2022-07-23 12:27:29.963 [WARN ] [.handler.OpenSprinklerStationHandler] - Ignoring implausible non-QuantityType command for NEXT_DURATION
==> /var/log/openhab/events.log <== 2022-07-23 12:27:32.991 [INFO ] [openhab.event.ItemStateChangedEvent ] - Item 'Water_Garden_nextDuration' changed from 15 to 64800 s`
I can test and look into this shortly. Currently my system is disabled due to winter frosts, I need to dust it off soon so maybe six weeks time.
From your event.log output it shows you are not sending a command that is time. You could use a rule triggered by openHAB starting to set it to your desired value. The other work around is to use the new channels for triggering internal programs stored in the unit to do preset watering.
What do you think of accepting a percent type value from a slider that translates into MINUTES? Using a slider set to 30 would give 30 minutes of duration? This could be done.
@fafter82 What do you think of the above suggestion? Also how to control the nextDuration channel is covered in the full example given here in the docs, does this example not work on your system? If no, then we will need to change the documentation to what works.
https://github.com/openhab/openhab-addons/tree/main/bundles/org.openhab.binding.opensprinkler#textual-example
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.