fritzaha: Fritz Powerline 546E - issues with latest Firmware 6.20?

337 views
Skip to first unread message

ch...@losty.ch

unread,
Dec 21, 2014, 5:52:59 AM12/21/14
to ope...@googlegroups.com
Hi all,

I have a OpenHAB instance V 1.6.1 running and querying two Fritz Powerline Adapters for power voltage and temperature. I can't see any notable difference in their configuration, but interestingly one is working fine and the other one is throwing exceptions:

2014-12-21 11:10:55.235 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.ConnectException: Connection refused
2014-12-21 11:10:55.236 [ERROR] [o.b.f.i.h.FritzahaWebInterface] - FritzBox does not respond
2014-12-21 11:10:55.244 [WARN ] [ipse.jetty.client.HttpExchange] - CONNECTION FAILED FritzahaContentExchange@17501fc=GET//wohnzimmer:80/webservices/homeautoswitch.lua?switchcmd=getswitchenergy&ain=24:65:11:C3:F1:4B#CONNECTING(7ms)->EXCEPTED(0ms)
java.net.ConnectException: Connection refused
at sun.nio.ch.SocketChannelImpl.checkConnect(Native Method) ~[na:1.7.0_67]
at sun.nio.ch.SocketChannelImpl.finishConnect(SocketChannelImpl.java:739) ~[na:1.7.0_67]
at sun.nio.ch.SocketAdaptor.connect(SocketAdaptor.java:117) ~[na:1.7.0_67]
at org.eclipse.jetty.client.SelectConnector.startConnection(SelectConnector.java:74) ~[org.eclipse.jetty.client_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.client.HttpDestination.startNewConnection(HttpDestination.java:272) [org.eclipse.jetty.client_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.client.HttpDestination.doSend(HttpDestination.java:556) [org.eclipse.jetty.client_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.client.HttpDestination.send(HttpDestination.java:494) [org.eclipse.jetty.client_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.eclipse.jetty.client.HttpClient.send(HttpClient.java:160) [org.eclipse.jetty.client_8.1.3.v20120522.jar:8.1.3.v20120522]
at org.openhab.binding.fritzaha.internal.hardware.FritzahaWebInterface.asyncGet(FritzahaWebInterface.java:285) [bundlefile:na]
at org.openhab.binding.fritzaha.internal.hardware.devices.FritzahaWebserviceMeter.updateMeterValue(FritzahaWebserviceMeter.java:82) [bundlefile:na]
at org.openhab.binding.fritzaha.internal.FritzahaBinding.execute(FritzahaBinding.java:117) [bundlefile:na]
at org.openhab.core.binding.AbstractActiveBinding$BindingActiveService.execute(AbstractActiveBinding.java:156) [org.openhab.core_1.6.1.jar:na]
at org.openhab.core.service.AbstractActiveService$RefreshThread.run(AbstractActiveService.java:173) [org.openhab.core_1.6.1.jar:na]

Directly querying that URL....

...gives me an forbidden header with no content...

HTTP/1.1 403 Forbidden
Connection: Keep-Alive
Content-Length: 0
Content-Type: text/plain; charset=utf-8
Keep-Alive: timeout=60, max=300

...which is interesting because it's not "Connection refused" as stated in the log message.

The only notable difference I'm aware of is not in configuration, but in firmware version: I recently updated that exception-throwing one to latest Fritz OS 6.20, while the working one is still on 6.05. I set up the OpenHAB just now, so I don't know if it would probably have worked before.

I'm also running a Fritzbox which has V 6.20 since quite a while. Querying that works just fine (...except it's hell-slow: 4-8 secs for squeezing out just one integer value... WTF!?!)

Before you ask: the powerline feature is deactivated and both Powerline adapters are connected via ethernet. I can ping both of them just fine and access their webfrontend, etc...

Is there any known issue in the fritzaha binding with the 546E and V6.20?

Cheers,
Jochen

Dominic Spatz

unread,
Dec 26, 2014, 5:54:00 PM12/26/14
to
Hi, i have a similar Issue, but it occured with both, the old and the new Firmware.
Could also be a binding error in 1.6.1

i use two 546e devices, without fritzbox as a router.
one 546e is connected using powerline.

temperature is not implemented in those powerline devices, only in dect ones.
I dont use the AIN to connect, the internal ID (1000) worked fine for me.

2014-12-26 23:43:23.285 [WARN ] [ipse.jetty.client.HttpExchange] - EXPIRED FritzahaContentExchange@b818fd=GET//Smartmeter5:80/net/home_auto_query.lua?xhr=1&command=MultiMeterState&id=1000#CONNECTING(3931ms)->EXPIRED(0ms)
2014-12-26 23:48:35.124 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.ConnectException: Connection timed out
2014-12-26 23:48:35.124 [ERROR] [o.b.f.i.h.FritzahaWebInterface] - FritzBox does not respond
2014-12-26 23:48:38.988 [WARN ] [ipse.jetty.client.HttpExchange] - EXPIRED FritzahaContentExchange@1e43f5d=GET//Smartmeter5:80/net/home_auto_query.lua?xhr=1&command=MultiMeterState&id=1000#CONNECTING(3864ms)->EXPIRED(0ms)
2014-12-26 23:54:00.628 [ERROR] [g.openhab.io.net.http.HttpUtil] - Fatal transport error: java.net.ConnectException: Connection timed out
2014-12-26 23:54:00.628 [ERROR] [o.b.f.i.h.FritzahaWebInterface] - FritzBox does not respond
2014-12-26 23:54:04.581 [WARN ] [ipse.jetty.client.HttpExchange] - EXPIRED FritzahaContentExchange@1d19525=GET//Smartmeter5:80/net/home_auto_query.lua?xhr=1&command=MultiMeterState&id=1000#CONNECTING(3953ms)->EXPIRED(0ms)

Robert Bausdorf

unread,
Dec 28, 2014, 9:40:09 AM12/28/14
to ope...@googlegroups.com
Hi,

the query interface of Fritz devices is - as stated in the binding docs - "... not intended for use with external applications and occupies the host for a long time ...". It was invented because the webservice interface did not provide all information in prior firmware versions. 
In the newer firmware versions these information is available through the webservice interface.

To help you please do the following:

1) In the logback.xml set the bindig loglevel to debug:
<logger name="org.openhab.binding.fritzaha" level="DEBUG" additivity="false"><appender-ref ref="FILE" /></logger>

2) Configure the fritzaha binding to use the webservice (use AIN)

3) Post your log snippets here.

Power and Temperature should be already supported - I will provide the Voltage value in addition to that. Because I do only own DECT200 devices this may be a little difficult but with your help I will do my best ... :-)

Cheers Robert

Dominic Spatz

unread,
Dec 28, 2014, 1:17:24 PM12/28/14
to ope...@googlegroups.com
Using the AIN i can get data from the Smartmeter.
But i also want to see some details. (Current, Voltage, Powerconsumption, maybe also the temperature)
I got powerline devices, so maybe the temperature won't be availible.

But, items using the webservice won't send data to the related items.

The values were read.. thats weird..

2014-12-28 19:15:32.488 DEBUG o.o.b.f.i.h.c.FritzahaQueryscriptUpdateNumberCallback[:70]- Received State response {
"DeviceConnectState": "2",
"MM_Value_Amp": 194,
"tabType": "",
"MM_Value_Volt": 235526,
"DeviceID": "1000",
"MM_Value_Power": 0,
"Value_Valid": 2,
"CurrentDateInSec": "1419790532",
"RequestResult": "1"
}
 for item Measure_Voltage_2


That happens for each item (Measure_voltage , Measure_power (if not adressed via AIN,etc)

Robert Bausdorf

unread,
Dec 28, 2014, 6:11:10 PM12/28/14
to ope...@googlegroups.com
Right - Voltage and Amps are not supported by the webservice interface ( http://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf )
You may only get the "calculated values" as the current power consumption and the energy consumption since the device was powered on.

Your logs above prove to me that a login to the device was not successful. The weired behaviour may be an overload of the device - the scripting interface may put the Fritz! devices into high load state.
So if one a connection to the device is successful, the AHA binding tries to reuse the authentication token received from the device for further connections. Therefore values may be read. If the token or connection expires, the binding tries to reauthenticate which seems to fail.

If the behaviour is due to high device load, streching the "aha.refresh" interval may help. Another hint could be to temporarily disable the number of values read from one device because a http request is made for each value - even if more than one value is received in a http respone (as you posted below in "Received state response"). In this case I could help with implementing some response caching ...

Cheers Robert

Dominic Spatz

unread,
Dec 28, 2014, 9:59:01 PM12/28/14
to ope...@googlegroups.com
Hi Robert,

some time ago i used the webservice for all electrical characteristics (U,I,P) suddenly i didnt worked for me on my new linux webserver..
It would be great if you could assist me with that problem.
(i also extracted the 1.7.0 Snapshot addon, but this didn't work either.)

even 30second delay between those polls won't work.
The problem is, openhab gets the data, as shown above, but it doesn't process it.
Reply all
Reply to author
Forward
0 new messages