FRITZ!Powerline 1260E Binding

Anyone may has a working binding for the AVM FRITZ!Powerline 1260E?
I removed the thing from my configuration for now, since it creates the following exception:

Exception occurred while calling thing handler factory 'org.openhab.binding.avmfritz.internal.AVMFritzHandlerFactory@cefc43': org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge
java.lang.ClassCastException: org.eclipse.smarthome.core.thing.internal.ThingImpl cannot be cast to org.eclipse.smarthome.core.thing.Bridge

Dear @icompas,

I would like to help you. How did you add your FRITZ!Powerline to your OH2 setup? Did you use automatic discovery? Do you think you can send me some DEBUG level log files of the binding?

Hi @cweitkamp,

the adding was fully automatic. The system tries to recognize it as Powerline 546E, which apparently is not true and does not work.

How to get the requested log?

One more question: Which OH2 version do you use?

To enable DEBUG logging do the following steps:

Ok, I removed the 1260E via karaf, since it did not work from the Paper UI.
Before this, the lsiting looked like this:

openhab> smarthome:things list
avmfritz:fritzbox:192_168_2_10 (Type=Bridge, Status=ONLINE: FRITZ!Box online, Label=AVM FRITZ!Mediaserver, Bridge=null)
astro:sun:local (Type=Thing, Status=ONLINE, Label=Local Sun, Bridge=null)
astro:moon:local (Type=Thing, Status=ONLINE, Label=Local Moon, Bridge=null)
avmfritz:FRITZ_DECT_200:192_168_2_10:087610053251 (Type=Thing, Status=ONLINE, Label=FRITZ!DECT 200 , Bridge=avmfritz:fritzbox:192_168_2_10)
ntp:ntp:local (Type=Thing, Status=ONLINE, Label=Local Time, Bridge=null)
avmfritz:FRITZ_DECT_Repeater_100:192_168_2_10:116570057984 (Type=Thing, Status=ONLINE, Label=FRITZ!DECT Rep 100, Bridge=avmfritz:fritzbox:192_168_2_10)
avmfritz:FRITZ_Powerline_546E_Solo:192_168_2_102 (Type=Thing, Status=REMOVING, Label=FRITZ!Powerline 1260E, Bridge=null)

Then, I added the 1260E via the Paper UI again. This is what the debug log tells me:

17:55:39.705 [DEBUG] [al.discovery.AVMFritzDiscoveryService] - initialize discovery service
17:55:39.710 [DEBUG] [al.discovery.AVMFritzDiscoveryService] - start background scanning job at intervall 180s
17:55:39.728 [DEBUG] [org.openhab.binding.avmfritz         ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService}={service.id=370, service.bundleid=224, service.scope=singleton} - org.openhab.binding.avmfritz
17:55:39.956 [DEBUG] [very.AVMFritzUpnpDiscoveryParticipant] - discovered on /192.168.2.100
17:55:39.961 [DEBUG] [very.AVMFritzUpnpDiscoveryParticipant] - discovered: AVM Berlin FRITZ!Box 6490 Cable avm (FRITZ!Box 6490 Cable) at 192.168.2.10
17:55:39.970 [DEBUG] [very.AVMFritzUpnpDiscoveryParticipant] - discovered on /192.168.2.100
17:55:39.977 [DEBUG] [very.AVMFritzUpnpDiscoveryParticipant] - discovered: AVM Berlin FRITZ!Powerline 1260E avm (FRITZ!Powerline 1260E) at 192.168.2.102
17:55:39.985 [DEBUG] [al.discovery.AVMFritzDiscoveryService] - stop manual scan on bridge avmfritz:FRITZ_Powerline_546E_Solo:192_168_2_102
17:55:39.989 [DEBUG] [al.discovery.AVMFritzDiscoveryService] - stop manual scan on bridge avmfritz:fritzbox:192_168_2_10
17:55:39.992 [DEBUG] [al.discovery.AVMFritzDiscoveryService] - start manual scan on bridge avmfritz:fritzbox:192_168_2_10
17:55:39.997 [DEBUG] [nternal.hardware.FritzAhaWebInterface] - GETting URL http://192.168.2.10/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=8114ff89323a6ede
17:55:40.133 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - HTTP response 200
17:55:40.137 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - HTTP response 200
17:55:40.140 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - response complete: <devicelist version="1"><device identifier="11657 0057984" id="17" functionbitmask="1280" fwversion="03.86" manufacturer="AVM" productname="FRITZ!DECT Repeater 100"><present>1</present><name>FRITZ!DECT Rep 100</name><temperature><celsius>270</celsius><offset>0</offset></temperature></device><device identifier="08761 0053251" id="18" functionbitmask="2944" fwversion="03.87" manufacturer="AVM" productname="FRITZ!DECT 200"><present>1</present><name>FRITZ!DECT 200 </name><switch><state>0</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><powermeter><power>0</power><energy>48922</energy></powermeter><temperature><celsius>405</celsius><offset>0</offset></temperature></device></devicelist>

17:55:42.123 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - polling FRITZ!Box avmfritz:fritzbox:192_168_2_10
17:55:42.128 [DEBUG] [nternal.hardware.FritzAhaWebInterface] - GETting URL http://192.168.2.10/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=8114ff89323a6ede
17:55:42.273 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - HTTP response 200
17:55:42.281 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - HTTP response 200
17:55:42.288 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - response complete: <devicelist version="1"><device identifier="11657 0057984" id="17" functionbitmask="1280" fwversion="03.86" manufacturer="AVM" productname="FRITZ!DECT Repeater 100"><present>1</present><name>FRITZ!DECT Rep 100</name><temperature><celsius>270</celsius><offset>0</offset></temperature></device><device identifier="08761 0053251" id="18" functionbitmask="2944" fwversion="03.87" manufacturer="AVM" productname="FRITZ!DECT 200"><present>1</present><name>FRITZ!DECT 200 </name><switch><state>0</state><mode>manuell</mode><lock>0</lock><devicelock>0</devicelock></switch><powermeter><power>0</power><energy>48922</energy></powermeter><temperature><celsius>405</celsius><offset>0</offset></temperature></device></devicelist>

17:55:42.310 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - set device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[ain=116570057984,bitmask=1280,isDectRepeater=true,isPowermeter=false,isTempSensor=true,isSwitchableOutlet=false,isHeatingThermostat=false,id=17,manufacturer=AVM,productname=FRITZ!DECT Repeater 100,fwversion=03.86,present=1,name=FRITZ!DECT Rep 100,<null>,<null>,<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@3a8b1c[celsius=27.0,offset=0.0]]
17:55:42.319 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - update thing avmfritz:FRITZ_DECT_Repeater_100:192_168_2_10:116570057984 with device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[ain=116570057984,bitmask=1280,isDectRepeater=true,isPowermeter=false,isTempSensor=true,isSwitchableOutlet=false,isHeatingThermostat=false,id=17,manufacturer=AVM,productname=FRITZ!DECT Repeater 100,fwversion=03.86,present=1,name=FRITZ!DECT Rep 100,<null>,<null>,<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@3a8b1c[celsius=27.0,offset=0.0]]
17:55:42.330 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - no thing UID found for device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@839138[ain=116570057984,bitmask=1280,isDectRepeater=true,isPowermeter=false,isTempSensor=true,isSwitchableOutlet=false,isHeatingThermostat=false,id=17,manufacturer=AVM,productname=FRITZ!DECT Repeater 100,fwversion=03.86,present=1,name=FRITZ!DECT Rep 100,<null>,<null>,<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@3a8b1c[celsius=27.0,offset=0.0]]
17:55:42.340 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - set device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[ain=087610053251,bitmask=2944,isDectRepeater=false,isPowermeter=true,isTempSensor=true,isSwitchableOutlet=true,isHeatingThermostat=false,id=18,manufacturer=AVM,productname=FRITZ!DECT 200,fwversion=03.87,present=1,name=FRITZ!DECT 200 ,org.openhab.binding.avmfritz.internal.ahamodel.SwitchModel@1c180be[state=0,mode=MANUAL,lock=0,devicelock=0],org.openhab.binding.avmfritz.internal.ahamodel.PowerMeterModel@1a5c26f[power=0.000,energy=48922],<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@19fdf6c[celsius=40.5,offset=0.0]]
17:55:42.349 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - update thing avmfritz:FRITZ_DECT_200:192_168_2_10:087610053251 with device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[ain=087610053251,bitmask=2944,isDectRepeater=false,isPowermeter=true,isTempSensor=true,isSwitchableOutlet=true,isHeatingThermostat=false,id=18,manufacturer=AVM,productname=FRITZ!DECT 200,fwversion=03.87,present=1,name=FRITZ!DECT 200 ,org.openhab.binding.avmfritz.internal.ahamodel.SwitchModel@1c180be[state=0,mode=MANUAL,lock=0,devicelock=0],org.openhab.binding.avmfritz.internal.ahamodel.PowerMeterModel@1a5c26f[power=0.000,energy=48922],<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@19fdf6c[celsius=40.5,offset=0.0]]
17:55:42.370 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - no thing UID found for device model: org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[org.openhab.binding.avmfritz.internal.ahamodel.DeviceModel@1dc7e69[ain=087610053251,bitmask=2944,isDectRepeater=false,isPowermeter=true,isTempSensor=true,isSwitchableOutlet=true,isHeatingThermostat=false,id=18,manufacturer=AVM,productname=FRITZ!DECT 200,fwversion=03.87,present=1,name=FRITZ!DECT 200 ,org.openhab.binding.avmfritz.internal.ahamodel.SwitchModel@1c180be[state=0,mode=MANUAL,lock=0,devicelock=0],org.openhab.binding.avmfritz.internal.ahamodel.PowerMeterModel@1a5c26f[power=0.000,energy=48922],<null>],org.openhab.binding.avmfritz.internal.ahamodel.TemperatureModel@19fdf6c[celsius=40.5,offset=0.0]]

This shows the initialization and some activities right after.

In the PaperUI it is still shown as uninitialized.

grafik

Thank you very much. Once again I have to ask:

I assume OH2.3. And you have upgraded your system recently? The FRITZ_Powerline_546E_Solo thing not a Thing anymore. It now is a Bridge. That was the reason for the exception you have mentioned in your initial post. I will add a note in the official release notes since it was an API breaking change.

Currently any FRITZ!Power line device will be discovered automatically as “FRITZ!Powerline 546E”. That is a bug.

Please have a look into the configuration details of the recently added “FRITZ!Powerline 1260E” bridge. Its status is UNINITIALIZED because it requires a password to be set.

Correct, I updated to 2.3 just recently. In 2.2 it was never recognized and configured.
I will check out the password issue and report back.

Password set in the configration, status now as follows

grafik

and

<title>FRITZ!Powerline-Adapter</title>
</head>
<body>
<div id="main_page_all">
<header class="" name="" id="blueBarBox">
<div class="blue_bar_titel" name="" id="blueBarTitel">FRITZ!Box</div>
</header>
<div id="page_content_no_menu_box">
<div class="area_box">
<div class="blue_bar_back" >
<div><h2>FRITZ!Powerline-Adapter</h2></div>
</div>
<div class="page_content">
<p>Die angegebene URL wurde nicht gefunden. Sie werden auf die Startseite des FRITZ!Powerline weitergeleitet.</p>
<p>Falls Sie nicht automatisch auf die Startseite des FRITZ!Powerline weitergeleitet werden, klicken Sie <a href="/">hier</a>.</p>
<br>
</div>
</div>
</div>
</div>
<script>
window.setTimeout(function () {
window.location.href = "/";
}, 10000);
</script>
</body>
</html>

16:42:44.812 [DEBUG] [e.callbacks.FritzAhaUpdateXmlCallback] - request is invalid: 404
16:42:44.959 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - polling FRITZ!Box avmfritz:fritzbox:192_168_2_10
16:42:44.964 [DEBUG] [nternal.hardware.FritzAhaWebInterface] - GETting URL http://192.168.2.10/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=8114ff89323a6ede

What does the log show before that line?

What happens if you type http://fritz.powerline in your Browser?

2018-06-10 18:01:41.576 [DEBUG] [tz.handler.AVMFritzBaseBridgeHandler] - polling FRITZ!Box avmfritz:FRITZ_Powerline_546E_Solo:192_168_2_102
2018-06-10 18:01:41.582 [DEBUG] [ternal.hardware.FritzAhaWebInterface] - GETting URL http://192.168.2.102/webservices/homeautoswitch.lua?switchcmd=getdevicelistinfos&sid=bbc077821583d330
2018-06-10 18:01:41.618 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response 404
2018-06-10 18:01:41.621 [DEBUG] [nal.hardware.FritzAhaContentExchange] - HTTP response 404
2018-06-10 18:01:41.625 [DEBUG] [nal.hardware.FritzAhaContentExchange] - response complete: <!DOCTYPE html>
<html>
<head>
<meta http-equiv=content-type content="text/html; charset=utf-8" />
<meta http-equiv="Cache-Control" content="private, no-transform" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="format-detection" content="telephone=no" />
<meta http-equiv="x-rim-auto-match" content="none" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui" />
<meta name="mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<meta http-equiv="cleartype" content="on">
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
<link rel="apple-touch-icon" href="/css/default/images/kopfbalken_links.png" />
<link rel="apple-touch-startup-image" href="/css/default/images/kopfbalken_links.png">
<link rel="stylesheet" type="text/css" href="/css/rd/singleside_old.css"/>

Actually, the name fritz.powerline does not resolve in my home network. Reaching per IP is not an issue.
So, option 1 to add the hostname to the /etc/hosts, option 2?

The IP address in line 2 is correct.

Reading through the messages, it looks to me that the device is not able to fulfill the command.

switchcmd=getdevicelistinfos

This command actually returns the subsequent error message.

That won’t help. IP address is sufficient.

Yes, I agree.

One final question from my side. I will try to wrap ip my thoughts on your issue afterwards. Which FRITZ!OS versions do you use on the FRITZ!Powerline 1260E device? Are you willing to do some testing with a modified binding version?

Fritz!OS 06.87 - not able to upgrade to a later version, since I use a cable model. Although no customized box, there is no beta version for the upcoming version 7 openly available. But I guess you are aware of this. :wink:
The 1260E device is running on Fritz!OS06.92.

Sure, if you have something to test, let me know how to install.

One additional information, in the event.log I see the following message now:

'avmfritz:FRITZ_Powerline_546E_Solo:192_168_2_102' changed from OFFLINE (CONFIGURATION_ERROR): User null has no access

Dear all

I experience the same with my 546E device. As far as I can see there is no full sultion yet to resolve the underlying issue?
The Adapter is currently on FritzOS 6.92.

I didn’t have a look into debug logs, as it is not of priority for me, but it would be good to know how to fix it.

Cheers
Stefan

If you using Fritz OS 7.0 (or 6.9X) and MESH then the 546E devices uses username and password from your Fritzbox.
So the Addon will not work because you can not use a username.

You can change this devicesetting in your AVM Device.

Maybe the Addon could be updatet - with an optional username.

Cheers
Jan

using this binding for Fritzbox 7590 with Fritz OS 7.10 and MESH and Powerline 1260E with Fritz OS 07.08-67144 BETA is not possible. 7590 is recognized fine, but 1260E produces error “User null has no access to FRITZ!Box home automation functions”.
@janpopan: your error description holds. Simply inputting the password of 1260E web GUI produces above message.

Did someone try to use the Powerline 1260E with thing type FRITZ_Powerline_546E_Solo (https://www.openhab.org/addons/bindings/avmfritz/#fritz-powerline-546e-2)? That should work without a username. If it is working we can think about a renaming.