openhab / openhab-addons

Add-ons for openHAB
https://www.openhab.org/
Eclipse Public License 2.0
1.88k stars 3.59k forks source link

[keba] Not a valid firmware #3328

Closed erik73 closed 5 years ago

erik73 commented 6 years ago

Hi! I am running the snapshot 2.3.0 Build #1225. I have a KeContact P30x wallbox, and it runs firmware 3.08.7 I get the following exeption:

21:06:40.390 [WARN ] [ommon.WrappedScheduledExecutorService] - Scheduled runnable ended with an exception
java.lang.IllegalArgumentException: Not a valid firmware
    at org.openhab.binding.keba.KebaBindingConstants$KebaFirmware.getFirmware(KebaBindingConstants.java:127) [195:org.openhab.binding.keba:2.3.0.201803101457]
    at org.openhab.binding.keba.handler.KeContactHandler.onData(KeContactHandler.java:223) [195:org.openhab.binding.keba:2.3.0.201803101457]
    at org.openhab.binding.keba.handler.KeContactHandler$1.run(KeContactHandler.java:158) [195:org.openhab.binding.keba:2.3.0.201803101457]
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
    at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:?]
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:?]
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
    at java.lang.Thread.run(Thread.java:748) [?:?]

I guess that is what makes non of the fields in the gui show correct data? Is it possible to add 3.08.7 as a valid firmware?

elmario55 commented 6 years ago

The same problem with firmware P30 v 3.9.10 (171113-103030) ! What to do?

wborn commented 6 years ago

You can add missing firmwares to the KebaFirmware enum and test if all works well:

https://github.com/openhab/openhab2-addons/blob/8988ed72415209c1514bc32c9dc4ad8ffe05db99/addons/binding/org.openhab.binding.keba/src/main/java/org/openhab/binding/keba/KebaBindingConstants.java#L100-L109

Maybe @kgoderis already has some plans to do this?

kgoderis commented 6 years ago

@wborn I am not up to speed with the latest firmwares and I have to go through the release notes to see what has changed.

elmario55 commented 6 years ago

Yesterday i tried to add Firmware V3.09.10 to the list of puplic enum. But by compiling the .java to .class i got 5 errors and no *.class file. I have not really knowledge about programming with java, so may be i made one (ore moore) mistakes.

elmario55 commented 6 years ago

@kgoderis I got a Mail from KEBA, there are no changes on UDP with the new Firmware, so changing "puplic enum" could work? I also got "old" firmware 3.08.4, so i can rollback firmware till binding is working with new firmware

Ollipu commented 6 years ago

Is there already an update / snapshot available for this issue or does somebody managed to compile the file? @elmario55 How you manage the rollback to 3.08.4? Keba told me it is not possible.

elmario55 commented 6 years ago

@ Ollipu
Rollback works in the same way as firmwareupdate. See the procedure in your manual. The file to rollback to 3.08.4 is here: https://github.com/openhab/openhab2-addons/files/206611/KEBA_P30_USB_3.08.4_.170307-132509.zip I rolled back with this file and it worked.

elmario55 commented 6 years ago

Sorry, the link is not working, try this one: KEBA_P30_USB3.08.4(170307-132509).zip

Andeicon commented 6 years ago

Hi all,

we have a Keba P30x with newest availible Firmware, reported in UDP Message as "Firmware":"P30 v 3.9.10 (171113-103030)". I can also see the the error Message in Openhab What consequence does the error have for the functinality in openhab? Is this just to show the firmware Version? Or are there values that will not be availible in Openhab? I am asking, because I get some values like PlugStates and Session Energy. Other values like Operation State are without values.

paalrune commented 5 years ago

Can sombody please update the firmware suport? I runing: P30 v 3.9.19 (180828-145556) : 54520 : 318.0 : 2040003 and can not use the addons...

Or can any please tell me how i compile it self, i got 7 errors when i try: "javac KebaBindingConstants.java"


KebaBindingConstants.java:14: error: package org.apache.commons.lang does not exist import org.apache.commons.lang.ArrayUtils; ^ KebaBindingConstants.java:15: error: package org.eclipse.jdt.annotation does not exist import org.eclipse.jdt.annotation.NonNullByDefault; ^ KebaBindingConstants.java:16: error: package org.eclipse.smarthome.core.thing does not exist import org.eclipse.smarthome.core.thing.ThingTypeUID; ^ KebaBindingConstants.java:24: error: cannot find symbol @NonNullByDefault ^ symbol: class NonNullByDefault KebaBindingConstants.java:30: error: cannot find symbol public static final ThingTypeUID THING_TYPE_KECONTACTP20 = new ThingTypeUID(BINDING_ID, "kecontact"); ^ symbol: class ThingTypeUID location: class KebaBindingConstants KebaBindingConstants.java:30: error: cannot find symbol public static final ThingTypeUID THING_TYPE_KECONTACTP20 = new ThingTypeUID(BINDING_ID, "kecontact"); ^ symbol: class ThingTypeUID location: class KebaBindingConstants KebaBindingConstants.java:79: error: cannot find symbol Character[] cArray = ArrayUtils.toObject(e); ^ symbol: variable ArrayUtils location: class KebaSeries 7 errors


Runing Zulu java.

elmario55 commented 5 years ago

Seems to be, that KEBA-Binding is not working with KEBA-Firmware later than 3.08.4!! See posts upon. As i was unable to change the Binding, i rolled back the firmware to 3.08.4 and had no Problems with Binding on openhabianpi with openhab 2.3.0.-1

paalrune commented 5 years ago

i have seen that the "trick" are to use the older firmware, but i think it will be a better sulution to fix the binding?

elmario55 commented 5 years ago

if there is anybody who can fix the binding - i can't do it. I have no idea about programming, i'm still a silly user!

kaikreuzer commented 5 years ago

@kgoderis Any chance you can help out here?

erik73 commented 5 years ago

Here is a version that I compiled, including all the released firmware versions that i know of. org.openhab.binding.keba-2.4.0-SNAPSHOT.jar.zip

paalrune commented 5 years ago

First of all. THANKS

But i have still have som isues: openhab.log 2019-01-07 11:26:09.737 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'keba.items' 2019-01-07 11:26:10.552 [INFO ] [thome.model.lsp.internal.ModelServer] - Started Language Server Protocol (LSP) service on port 5007 2019-01-07 11:26:10.669 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'keba.sitemap' 2019-01-07 11:26:10.746 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'keba.things' 2019-01-07 11:26:10.841 [INFO ] [nternal.handler.KeContactTransceiver] - Listening for incoming data on /0:0:0:0:0:0:0:0:7090 2019-01-07 11:26:10.970 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at http://192.168.10.134:8080 2019-01-07 11:26:10.971 [INFO ] [.dashboard.internal.DashboardService] - Started Dashboard at https://192.168.10.134:8443 2019-01-07 11:26:11.049 [INFO ] [arthome.ui.paper.internal.PaperUIApp] - Started Paper UI at /paperui

events.log 2019-01-07 11:26:10.802 [.ItemChannelLinkAddedEvent] - Link 'KebaUptime-keba:kecontact:1:uptime' has been added. 2019-01-07 11:26:10.802 [.ItemChannelLinkAddedEvent] - Link 'KebaPower-keba:kecontact:1:power' has been added. 2019-01-07 11:26:10.803 [.ItemChannelLinkAddedEvent] - Link 'KebaOutputSwitch-keba:kecontact:1:output' has been added. 2019-01-07 11:26:10.804 [.ItemChannelLinkAddedEvent] - Link 'KebaCurrentRange-keba:kecontact:1:maxpresetcurrentrange' has been added. 2019-01-07 11:26:10.804 [.ItemChannelLinkAddedEvent] - Link 'KebaI2-keba:kecontact:1:I2' has been added. 2019-01-07 11:26:10.805 [.ItemChannelLinkAddedEvent] - Link 'KebaSessionEnergy-keba:kecontact:1:sessionconsumptio' has been added. 2019-01-07 11:26:10.805 [.ItemChannelLinkAddedEvent] - Link 'KebaVehiclePlugged-keba:kecontact:1:vehicle' has been added. 2019-01-07 11:26:10.806 [.ItemChannelLinkAddedEvent] - Link 'KebaU1-keba:kecontact:1:U1' has been added. 2019-01-07 11:26:10.806 [.ItemChannelLinkAddedEvent] - Link 'KebaWallboxPlugged-keba:kecontact:1:wallbox' has been added. 2019-01-07 11:26:10.806 [.ItemChannelLinkAddedEvent] - Link 'KebaU2-keba:kecontact:1:U2' has been added. 2019-01-07 11:26:10.807 [.ItemChannelLinkAddedEvent] - Link 'KebaPlugLocked-keba:kecontact:1:locked' has been added. 2019-01-07 11:26:10.807 [.ItemChannelLinkAddedEvent] - Link 'KebaU3-keba:kecontact:1:U3' has been added. 2019-01-07 11:26:10.807 [.ItemChannelLinkAddedEvent] - Link 'KebaSystemCurrent-keba:kecontact:1:maxsystemcurrent' has been added. 2019-01-07 11:26:10.808 [.ItemChannelLinkAddedEvent] - Link 'KebaState-keba:kecontact:1:state' has been added. 2019-01-07 11:26:10.808 [.ItemChannelLinkAddedEvent] - Link 'KebaInputSwitch-keba:kecontact:1:input' has been added. 2019-01-07 11:26:10.809 [.ItemChannelLinkAddedEvent] - Link 'KebaI1-keba:kecontact:1:I1' has been added. 2019-01-07 11:26:10.809 [.ItemChannelLinkAddedEvent] - Link 'KebaFailSafeCurrent-keba:kecontact:1:failsafecurrent' has been added. 2019-01-07 11:26:10.809 [.ItemChannelLinkAddedEvent] - Link 'KebaSwitch-keba:kecontact:1:enabled' has been added. 2019-01-07 11:26:10.810 [.ItemChannelLinkAddedEvent] - Link 'KebaTotalEnergy-keba:kecontact:1:totalconsumption' has been added. 2019-01-07 11:26:10.810 [.ItemChannelLinkAddedEvent] - Link 'KebaI3-keba:kecontact:1:I3' has been added. 2019-01-07 11:26:10.810 [.ItemChannelLinkAddedEvent] - Link 'KebaCurrent-keba:kecontact:1:maxpresetcurrent' has been added. 2019-01-07 11:26:10.811 [.ItemChannelLinkAddedEvent] - Link 'KebaTotalEnergy-keba:kecontact:1:sessionconsumption' has been added. 2019-01-07 11:26:10.838 [hingStatusInfoChangedEvent] - 'keba:kecontact:1' changed from UNINITIALIZED to INITIALIZING 2019-01-07 11:26:10.842 [hingStatusInfoChangedEvent] - 'keba:kecontact:1' changed from INITIALIZING to ONLINE

Any idea how to fix it?

paalrune commented 5 years ago

i think i have try a lot, but some funny thing even whit wrong ip i got "online status" in the GUI

kaikreuzer commented 5 years ago

FTR, https://github.com/openhab/openhab2-addons/pull/4987 works nicely for me with firmware 3.9.14 - so I hope it's gonna be merged soon!