I’m trying to set up a Anel Powercontrol HUT on an openhab 2.0 system.
I have trouble to even recognize the device.
While I first thought it had to do with configuration of the HUT, I’m less sure. Even asking the name of the device does not work.
In my site map I have :
Text item=anelName
Text item=anel_Test
Text item=anelTemperature
In items I have
String anelName “Anel1 [%s]” {anel=“anel_00:NAME” }
//String anelName “Anel1 network name [%s]” { anel=“anel1:NAME” }
Number anelTemperature “Anel_00 temperature [%s]” { anel=“anel_00:TEMPERATURE” }
String anel_Test “test:[%s]” {anel=“anel_00.F1NAME” }
Thanks for the question. I had not found the log files in Openhab.
I tried a few more things:
I move to post above 1024, there I noticed something strange in the anel default binding file
UDP receive port (optional, defaults to 77)
UDP send port (optional, defaults to 75)
Where actually in HUT the default for receiving is 75 and sending is 77
so I fixed that to set them both the same
then I removed the _ from all my variables, as I read on another openhab2 post that the_ was bad for something (non related) yet I ask, why not…
with the logging I found that I used String anelTest “test:xx[%s]xx” {anel=“anel00.F1NAME” }
instead of String anelTest “test:xx[%s]xx” {anel=“anel00:F1NAME” }
then I removed everything else from my files to not have other logging
and then I saw nothing moving anymore in the log file.
When I made a small change to the anel.cfg file now I saw the following error on the logging
2016-07-13 01:21:39.776 [ERROR] [ab.binding.anel.internal.AnelBinding] - Could not read configuration for Anel binding: anel_00.NAME : Invalid config key
and this I don’t get, I though I did remove “_” everywhere.
so in non of the config files I have "anel_00.NAME"
I checked everywhere. I did reboot the raspberry (even by turning of electricity)
and still I get this error when booting the raspberry PI.
even more troublesome, is that I seem to get remarks to
2016-07-13 01:57:38.078 [INFO ] [home.event.ItemChannelLinkAddedEvent] - Link ‘yahooweather_weather_berlin_humidity-yahooweather:weather:berlin:humidity’ has been added.
where I have de-installed the weather bindings and did remove all links to the service.
is it possible that openhab2 still safes some of the configuration somewhere else?
Ok, I must admit that the port numbers are not documented properly. The ‘send’ and ‘receive’ ports depend on the configuring device. In the Anel device, 75 is the receiving and 77 the sending port. So on the openhab system, 77 is the receiving and 75 is the sending port. Does this make sense? I’ll adjust that as soon as I find some time.
And again, I recommend using higher ports such as 7777 and 7775.
Sorry but I can’t help you with the other issues. I’ve successfully tested the Anel binding with openhab 2 several month ago but personally I’m still running openhab 1.
And I’ve not yet heard about or encountered any problems with underscores or caching problems…
when I swap send and receive back, I immediately get the following error in the log file:
could not read configuration for Anel binding: anel_00.NAME : Invalid config key
2 questions:
What config file?
where could anel_00.NAME come from:
It’s not in the anel.cfg file
it’s not in the sitemap
it’s not in the items file
nor in the rules or the things file
Yes I did use a recursive search on anything from openhab.
are you using an IP adres ofr the hostname to acces the HUT?
I’m asking as I just noticed I can ping to the IP adres, I can’t ping to the hostname.
Maybe the binding does not work with an IP adres and you are using a hostname?
'im using raspberry PI Jessie , the minimal setup, this means I had to install java myself, maybe it needs something else to get the panel binding work? (like a DNS server)
Actually I’m still on 1.8.3 but working in parallel on 2.0 with latest snapshots to learn how to configure. And today I updated to the latest nightly built and it’s not working anymore.
There should not be any other service needed. If DNS lookup is not working any longer, it may be caused by your DHCP server / router? In my config I use IP address, this should also be safer in case your device have static IPs.
The statement ‘not working anymore’ does not provide enough information so that others may help you.
Thanks Patrick for the clarity on the IP addresses.
For the no longer working, I think Michaels message that it did work before on Openhab 2 and since the latest nightly build, it no long works, might give you a lot of insights.
Michael, when was the last nightly build of Openhab 2 that you did use, that did work?
For me, there is no possibility to talk to the Anel device. When I give the right IP, and just ask the name of the device, I get NO answer. Nothing. No error message, but also no answer.
I’m working already with ip-addresses and it’s maybe 2 weeks ago. Don’t know exactly.
Update: OK, now I see this:
2016-07-18 17:23:19.665 [ERROR] [ng.anel.internal.AnelConnectorThread] - Error occured when received data from Anel device: 192.168.1.57
java.lang.Exception: java.net.SocketException: Socket closed
at org.openhab.binding.anel.internal.AnelUDPConnector.receiveDatagram(AnelUDPConnector.java:114)[214:org.openhab.binding.anel:1.9.0.201607180111]
at org.openhab.binding.anel.internal.AnelConnectorThread.run(AnelConnectorThread.java:234)[214:org.openhab.binding.anel:1.9.0.201607180111]
Caused by: java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.receive0(Native Method)[:1.8.0_65]
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:144)[:1.8.0_65]
at java.net.DatagramSocket.receive(DatagramSocket.java:812)[:1.8.0_65]
at org.openhab.binding.anel.internal.AnelUDPConnector.receiveDatagram(AnelUDPConnector.java:106)[214:org.openhab.binding.anel:1.9.0.201607180111]
… 1 more
2016-07-18 17:23:19.665 [ERROR] [ng.anel.internal.AnelConnectorThread] - Error occured when received data from Anel device: 192.168.1.65
java.lang.Exception: java.net.SocketException: Socket closed
at org.openhab.binding.anel.internal.AnelUDPConnector.receiveDatagram(AnelUDPConnector.java:114)[214:org.openhab.binding.anel:1.9.0.201607180111]
at org.openhab.binding.anel.internal.AnelConnectorThread.run(AnelConnectorThread.java:234)[214:org.openhab.binding.anel:1.9.0.201607180111]
Caused by: java.net.SocketException: Socket closed
at java.net.PlainDatagramSocketImpl.receive0(Native Method)[:1.8.0_65]
at java.net.AbstractPlainDatagramSocketImpl.receive(AbstractPlainDatagramSocketImpl.java:144)[:1.8.0_65]
at java.net.DatagramSocket.receive(DatagramSocket.java:812)[:1.8.0_65]
at org.openhab.binding.anel.internal.AnelUDPConnector.receiveDatagram(AnelUDPConnector.java:106)[214:org.openhab.binding.anel:1.9.0.201607180111]
… 1 more
How should anyone help with a ‘not working anymore’ statement? Imagine that I say ‘my car is not working since yesterday, how can I fix it?’ This is simply not enough information.
Not every developer is constantly developing for openhab and knows about all changes made in the code base. Please observe log output, maybe enable debug log for the respective binding. Maybe you can even find out yourself what the actual problem is.
Does the log file state that the Anel binding is started during startup? If connection failed, an exception should be written to the log.