Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[opensprinkler] Opensprinkler currentDraw channel not appearing for "device" thing in OH3 despite being available in OH2 #9664

Closed
lukiep opened this issue Jan 3, 2021 · 5 comments · Fixed by #9869
Labels
bug An unexpected problem or unintended behavior of an add-on

Comments

@lukiep
Copy link

lukiep commented Jan 3, 2021

Expected Behavior

In OH3, the channel 'currentDraw' should be available for the 'device' thing just as it is in OH2 and as documented.

Current Behavior

There is no 'currentDraw' channel as an option in the GUI for the 'device' thing (however rainsensor and waterlevel are present). This can't be due to device capability because it is available in OH2 and works as anticipated.

Possible Solution

Confirm currentDraw channel is correctly coded?
I note the docs say "If the device does not have sensors for this metric, the channel will not be available." Has this changed for this binding?
I use text-based setup in OH2 - could this make a difference?

Steps to Reproduce (for Bugs)

  1. Install opensprinkler binding
  2. Add opensprinkler http thing
  3. Add opensprinkler device thing linked to opensprinkler http thing
  4. Check the available channels in the device thing

Context

Due to previous experience with valves not being switched off correctly, I have a rule that monitors the currentDraw channel and checks the currentDraw channel to confirm all valves are off - not entirely fool-proof, but an added measure of peace-of-mind.

Your Environment

  • Version used: OH3 release build (but also occurred with M3, default opensprinkler binding, OH2 version is 2.5.10 but has worked correctly in all builds since the feature was introduced. I note that thing and item configuration in OH2 is text-based.
  • Environment name and version (e.g. Chrome 76, Java 8, Node.js 12.9, ...): Default as per OpenHABian 1.6, OpenJDK 11.0.9
  • Operating System and version (desktop or mobile, Windows 10, Raspbian Buster, ...): As per OpenHABian
@lukiep lukiep added the bug An unexpected problem or unintended behavior of an add-on label Jan 3, 2021
@lukiep lukiep changed the title Opensprinkler currentDraw channel not appearing for "device" thing in OH3 despite being available in OH2 [opensprinkler] Opensprinkler currentDraw channel not appearing for "device" thing in OH3 despite being available in OH2 Jan 3, 2021
@Skinah
Copy link
Contributor

Skinah commented Jan 12, 2021

I can confirm this is happening and my device reports via the API the current so this means my device supports the measurement. I suspect this is because the binding starts with no channel and only adds it after it detects that the device supports current. I could be wrong but with OH3 it should be there by default and removed if the thing does not support the channel. To reword, OH3 does not like adding channels, only removing them, so I will need to confirm that is the case unless someone can reply if that statement is right or wrong.

@Skinah
Copy link
Contributor

Skinah commented Jan 15, 2021

I have this fixed but wont do a build or PR until I at least sort out the ONLINE/OFFLINE detection. If your interested in testing it just reply here as I should have that sorted in a few days. I found the channel was actually getting added, it just could not be seen in the UI and I believe there is a PR to fix a bug in the core that may address this, but I have changed it to add the channel by default and remove it if the sensor does not exist.

@lukiep
Copy link
Author

lukiep commented Jan 15, 2021

Yes, I'd be very happy to test it and I can let you know how I go.

@Skinah
Copy link
Contributor

Skinah commented Jan 16, 2021

Try this build
http://www.pcmus.com/openhab/opensprinkler/

@lukiep
Copy link
Author

lukiep commented Jan 17, 2021

I can confirm that your fix was successful and the currentDraw channel is now visible. I'll add further comments to your post in the forum.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants