openhab / openhab1-addons

Add-ons for openHAB 1.x
Eclipse Public License 2.0
3.43k stars 1.71k forks source link

[Comfoair] Expanded binding with new commands #5773

Closed gieemek closed 5 years ago

gieemek commented 5 years ago

Expended comfoair binding (originaly written by Holger Hees). Contains many new read and write commands, and gives full control as the original control panels (CC Ease or CC Luxe).

gieemek commented 5 years ago

All requested changes are done. I introduced a new code to some files after comments from other comfoair users. README.md file was moved from main directory to binding one.

9037568 commented 5 years ago

Still need to run the Eclipse formatter and delete the JPEG file comfoair-sitemap.jpg.

gieemek commented 5 years ago

Still need to run the Eclipse formatter and delete the JPEG file comfoair-sitemap.jpg.

I removed comfoair-sitemap.jpg file from repository. I don't know what you mean by "run the Eclipse formatter". I formated code in each code file, clean all projects, and add the licence header by mvn license:format. What should I do more ?

9037568 commented 5 years ago

Like so:

image

gieemek commented 5 years ago

I formatted org.openhab.binding.comfoair as you show above.

openhab-bot commented 5 years ago

This pull request has been mentioned on openHAB Community. There might be relevant details there:

https://community.openhab.org/t/solved-comfoair-add-filter-reset-in-binding/25337/21

9037568 commented 5 years ago

All the calls to logger.warn in the file ComfoAirConnector.java need to be converted to logger.debug. The last call to logger.warn in the file ComfoAirBinding.java needs to be converted to logger.debug.

All calls to logger.error need to be examined and converted to another type. Use the lowest appropriate one.

gieemek commented 5 years ago

Done. I changed some logger.debug to logger.trace too.

9037568 commented 5 years ago

One last item. Need to fix the null pointer exception defect reported in this community thread.

I'd recommend also reviewing Eclipse warnings to see if it's flagging any other possible occurrences...

2019-01-24 16:34:51.992 [vent.ItemStateChangedEvent] - comfoairFilterPeriod changed from 16 to 15
2019-01-24 16:34:51.979 [WARN ] [org.apache.karaf.services.eventadmin] - EventAdmin: Exception during event dispatch [org.osgi.service.event.Event [topic=openhab/command/comfoairFilterPeriod] {item=comfoairFilterPeriod, bridgemarker=true, command=15, timestamp=1548344091974} | {org.osgi.service.cm.ManagedService, org.osgi.service.event.EventHandler}={service.id=367, service.bundleid=227, service.scope=bundle, event.topics=openhab/*, service.pid=org.openhab.comfoair, component.name=org.openhab.binding.comfoair, component.id=224} | Bundle(org.openhab.binding.comfoair_1.13.0 [227])]
java.lang.NullPointerException: null
    at org.openhab.binding.comfoair.handling.ComfoAirCommandType.getChangeCommand(ComfoAirCommandType.java:393) ~[?:?]
gieemek commented 5 years ago

Need to fix the null pointer exception defect reported in this community thread.

Done.

I'd recommend also reviewing Eclipse warnings to see if it's flagging any other possible occurrences...

I checked the Eclipse warnings and the only ones reported were for the MANIFEST.MF file. But warnings are reported to such files (MANIFEST.MF) in all bindings.

9037568 commented 5 years ago

Thanks, @gieemek !