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
initial contribution of IPP binding #164
Conversation
Thanks - I'll try to review it soon! |
xsi:schemaLocation="http://eclipse.org/smarthome/schemas/binding/v1.0.0 http://eclipse.org/smarthome/schemas/binding-1.0.0.xsd"> | ||
|
||
<name>Cups Binding</name> | ||
<description>This is the binding for Cups.</description> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better briefly explain what Cups is about, i.e. "for the Common Unix Printing Service (CUPS)"
However you like - we can also simply rename this PR, then we have the history in one place. |
Ok, I rebased this branch on my ipp-developemt branch, should be ready to merge now. |
Thanks! I have just released a new stable of ESH, so that the mDNS fix is now available in openHAB 2 and I was able to test this binding. One observation: From the 3 channels, only "waiting Jobs" seems to be of most interest. For the other two, I don't see too many use cases. So would it maybe make sense to mark the other two channels as "advanced", so that they do not appear in the UI by default? And I would possibly rename "Jobs" in "total jobs". Another observation: I have a Canon printer, which is discovered but cannot be accessed. This is because hostname is null as the ServiceInfo does not return any value on getServer(). Nonetheless, the ServiceInfo contains the IP address in the field ipv4Addresses. Should maybe the IP addresses by taken instead of the hostname? |
I agree with setting the channels to advanced as they aren´t really of much interest. |
openhab » openhab2 #4 SUCCESS |
Yes, correct. If you create a new discovery result for the same UID, the properties of the existing thing will be automatically updated by the framework. |
@peuter Please let me know, if you see a chance to address the problem or if there is any need to discuss on the solution! |
I thought that I solved the problem with the last commit. Have you tested the last version with your printer? |
No, as you had a question back, I thought you were not yet done. Will test it right away! |
Unfortunately, this Canon printer does not turn up during mDNS discovery at all anymore... Will have to investigate, why this is the case...
Any idea what this is about? |
|
||
private String getPrinterName(ServiceInfo service) { | ||
String rp = service.getPropertyString("rp"); | ||
if (rp==null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "rp" really a good default? In my case, "rp" is filled ("printers/HP_LaserJet_M2727nf_MFP__745B02_"), but the service name ("HP LaserJet M2727nf MFP (745B02) @ Kona") would actually be a much better label text. Did you come across situations, where there is a name given, but which is not usable as a label?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess you are right. This is just a "leftover" from the early stages of developing this binding.
openhab » openhab2 #49 FAILURE |
No, sorry. The package "ch.ethz.vppserver.schema.ippclient" does |
(renamed CUPS binding) Signed-off-by: Tobias Bräutigam <tbraeutigam@gmail.com>
openhab » openhab2 #50 SUCCESS |
I found the problem: The cups lib required javax.xml classes, but they were not importer by the bundle and thus not available on the classpath. |
Thanks for the update regarding the name, it looks good now! |
Hm, I just merged it including my changes here: 8d6318c |
@peuter: May I ask you to create a short documentation for this binding until Sunday (May 24th)? |
@kaikreuzer: As I will be "offline" later this day until next wednesday I can only provide a basic description without configuration examples, as you can see here: |
Sure, I will accept anything you can come up with in this remaining minutes ;-) |
including mDNS-based disovery service