I finally got my keba binding up and running after upgrading to OH3 and pulling the jar file from the bug report over on Github. Now, I’m facing another weird behavior: I have set up the thing and items exactly as in the example in the docs (except for the IP address of course ).
Now every time I change either the item on keba:kecontact:1:maxpresetcurrentrange or on keba:kecontact:1:maxpresetcurrent, they immediately reset to the maximum value. I know I cannot set a maximum current below 6000 mA.
I can, however, enable and disable the wallbox via keba:kecontact:1:input, so I presume it’s a logic thing on my side. Do you have any hints or clues, maybe a rule snipped where you got it working?
Here’s what’s happening in the trace:
16:48:31.553 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KebaCurrent' received command 7000
16:48:31.553 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'KebaCurrent' predicted to become 16000.0 A
16:51:37.621 [INFO ] [openhab.event.ItemCommandEvent ] - Item 'KebaCurrentRange' received command 10
16:51:37.623 [INFO ] [openhab.event.ItemStatePredictedEvent] - Item 'KebaCurrentRange' predicted to become 1.0 %
All right. This was odd. Since I was really struggling with this, I want to write down what I found out and what happened.
the 3.0.1 version of the binding produced the usual - Ping timed out after '3003' milliseconds. I’m on a Ubuntu 18.04 box.
grabbed the org.openhab.binding.keba-3.1.0-SNAPSHOT 2.jar from the discussion on GitHub, plugged it into /usr/share/openhab/addons/.
that was the state when I posted the above problem.
disabled IPv6 completely on that Ubuntu machine. That weirdly improved some things - before, I did not see any report 1, 2 or 3 coming in. Now I did. Clearly, there’s something broken on the network side of this plugin, all the rest works fine with IPv6 enabled.
However, using tcpdump, I found out that nothing was sent when any of the writable current items was changed. No single bit of traffic generated.
got ready to do some println debugging, pulled the addons and compiled them as a preparation for that. Just for the fun of it, I placed the freshly compiled jar file into the addon directory. And now it just miraculously worked:
2021-03-13 23:11:30.389 [DEBUG] [nternal.handler.KeContactTransceiver] - Sending 'curr 7000' on the channel '/192.168.254.51:53287'->'/192.168.254.55:7090'
2021-03-13 23:11:31.193 [DEBUG] [nternal.handler.KeContactTransceiver] - Received TCH-OK
So kids, take-home message here: don’t just pull binaries from the internet and put them to use.
Hi Joe,
i think i have the same issue.
I’m using openhabian 3.1.0.M4 and installed the keba binding via addons.cfg.
All values like power, locked and so on can be read via openhab.
Non-read-only attribute like enabled and display can be set by commandos like…
KebaCurrent.sendCommand("6 A") is simplest.
That doesn’t mean the binding will do anything with it, but at least you will be sending a valid openHAB command for that Item type, which should get you further along. KebaCurrent.sendCommand(6 | A) should be an alternative in DSL rules.
Any UI widget should be doing this for you already.
OHHHHHHHH HOLY…it seems to work…
Rossko genius! I’ve tried it out and verified it via the herkules udp tool. It seems to work fine. Now i have to verify it with my car (but this is charged ).
Sending you a virtual beer and a lot of thx.
Let me ask you another question:
Is it possible to remove the :ElectricCurrent extension in the variable to set the variable as number? Because i have to calculate the value from my smartmeter. What is the advantage of using number:ElectricCurrent istead of number?
Thank you very very mutch! I let the community now if it’s working with my car, too.
Because it comes with units. No more “i’m not sure if it is in A oder mA”, it tells you.
Have you tried sending a command KebaCurrent.sendCommand(6000 | mA) or KebaCurrent.sendCommand(0.006 | kA) ?
I’d expect those to work.
You can calculate with Quantity types. Don’t throw away information because it seems ‘easier’.
You can make a string, that is acceptable to command
KE_KebaCurrent.sendCommand( (OH_PVUeberschuss.state as DecimalType / 610).toString + "A"))
this is just a rework of example tempItemC.postUpdate("25°C")
Or you can calculate and post in QuantityTypes to begin with.
Sometimes you might need to convert a plain numeric variable to a Quantity using a unit designated by you, it’s a bit fiddly
var Number someNumeric = 22.7
var myQuantity = new QuantityType<ElectricalCurrent>(someNumeric, AMPERE)
currentItem.sendCommand(myQuantity)
result
2021-05-13 11:29:01.512 [ome.event.ItemCommandEvent] - Item 'currentItem' received command 22.7 A
is this issue really solved for OH 3.1.0? I installed binding via MainUI. Sending events.sendCommand('Keba1_PresetCurrent', "7 A") leads to log message
2021-12-19 19:36:46.265 [DEBUG] [nternal.handler.KeContactTransceiver] - Sending 'curr 0' on the channel '/192.168.0.207:52740'->'/192.168.0.246:7090'
which in turn leads to 6 A for maxpresetcurrent, which is minimum for that value. Setting the value directly using UDP works fine. If there is an updated version for OH 3.1.0 please let me know. Thank you.