Avmfritz Binding: HAN FUN - Magenta Smarthome optical window sensor attached but not recognized

Hi all,

I attached today my Magenta Smarthome optical window sensor to my Fritzbox with FritzOS 7.0.1.
Pairing went fine and device is recognized by the Fritzbox:

And with email notification of each action I get alerted per email with each action “OPEN” = active and “CLOSED” = inactive

The avmfritz binding version is:

206 │ Active   │  80 │ 2.3.0                  │ AVM FRITZ! Binding

Excerpt from my FritzSH.things:

Bridge avmfritz:fritzbox:arrakis [ ipAddress="a.b.c.d", user="XXX", password="YYY" ] {
	Thing FRITZ_DECT_300 10971068XXXX "FD300_EG_WZT" [ ain="10971068XXXX" ]
	Thing FRITZ_DECT_300 11795020YYYY "FD300_EG_WZF" [ ain="11795020YYYY" ]
	Thing FRITZ_DECT_300 11795033ZZZZ "FD300_EG_K" [ ain="11795033ZZZZ" ]
	Thing FRITZ_DECT_300 11795022AAAA "FD300_DG_EZ" [ ain="11795022AAAA" ]
	Thing Comet_DECT 10971031BBBB "CD300_OG_BZ" [ ain="10971031BBBB" ]
	Thing MagSH_HanFun_FK 11934015CCCC "MagSH_FK_OG_E" [ ain="11934015CCCC" ]

Excerpt from Karaf Console:

openhab> things list | grep avmfritz
avmfritz:fritzbox:arrakis (Type=Bridge, Status=ONLINE: FRITZ!Box online, Label=FRITZ!Box, Bridge=null)
avmfritz:FRITZ_DECT_300:arrakis:10971068XXXX (Type=Thing, Status=ONLINE, Label=FD300_EG_WZT, Bridge=avmfritz:fritzbox:arrakis)
avmfritz:FRITZ_DECT_300:arrakis:11795020YYYY (Type=Thing, Status=ONLINE, Label=FD300_EG_WZF, Bridge=avmfritz:fritzbox:arrakis)
avmfritz:FRITZ_DECT_300:arrakis:11795033ZZZZ (Type=Thing, Status=ONLINE, Label=FD300_EG_K, Bridge=avmfritz:fritzbox:arrakis)
avmfritz:FRITZ_DECT_300:arrakis:11795022AAAA (Type=Thing, Status=ONLINE, Label=FD300_DG_EZ, Bridge=avmfritz:fritzbox:arrakis)
avmfritz:Comet_DECT:arrakis:10971031BBBB (Type=Thing, Status=ONLINE, Label=CD300_OG_BZ, Bridge=avmfritz:fritzbox:arrakis)


13:00:39.341 [DEBUG] [itz.handler.AVMFritzBaseBridgeHandler] - set device model: 
name=MagSH Fenster OG-E,


13:00:54.296 [DEBUG] [rnal.hardware.FritzAhaContentExchange] - response complete:
<devicelist version="1">
all other Devices
  identifier="11934 0154678"
  <name>MagSH Fenster OG-E</name>

Ich also defined an item already:

Contact  aktMShFkEZstat  "Fensterkontakt OG-E [%s]"  (gFritzSHome 

But no Thing then no Item, right?

Can anyone help?


Is there a more current version of the avmfritz binding than the V2.3.0?
Ich found a link to download the addon JAR file for 2.4.0-SNAPSHOT, but no update for the V2.3.0.
Would this be a reasonable approach?

Because I found in Karaf console with log level DEBUG for avmfritz binding that in “set device model” the SwitchModel “isAlarmSensor” or “isButton” is not included? From my understanding the window sensor is an alarm sensor …

just an idea …

Please ask your questions in english, as this is an international community.

Hi Hans-Hörg,
I hope I could show my dedication to the value of this forum by translating my posts above to English and to follow in English now …

Still you should use English. There is an open Pull Request for supporting HAN FUN devices, but it still needs a review. In the meantime, you could test a beta version, but I am afraid it might not run on openHAB 2.3
@cweitkamp will your beta version run on 2.3 ??

@hmerk Yes, the beta version is backwards compatible with OH2.3. It should run fine.

I am in contact with @ohb1138 and try to clarify his issues via PM.

1 Like

I did not mean it offensive. I will use English from now on in all my topics :slight_smile:
I received the 2.4 beta and with support of @cweitkamp I was able to activate it on OH 2.3.
Once the problem is solved, I will document it here in the topic in English.

1 Like

Maybe try in the german forum :wink:

After using the 2.4 version of the avmfritzbinding in the final OH v2.3 Version everything works so far and the sensor gets recognized by PaperUi or HABmin and I can configure it properly. Regarding the configuration via the plain text files I made a syntax mistake in the Things file giving the wrong thing type:

Instead of


I used my “own” naming convention

Thing HANFUN_MagSH_MFK ...

which is completely nonsense and wrong as it only works with the given type HAN_FUN_CONTACT of the binding … stupid reasoning error.

I have now five magnetic Telekom window contacts and have returned the optical window contact to the dealer as the transmission range of the magnetic contacts is much higher and I don’t get any wrong alerts due to stray light.

So, what I mean to say is that everything works now as expected.

Thanks to Christoph for his great support and responsiveness!!!


Another important fact to remind is that the identifier of the HANFUN device gets a “-1” added by the configuration process of the Fritzbox. This is nowhere visible as the FRITZ!OS UI shows only the 12-digit number. But when configuring HAN FUN devices through the plain text configuration files your line should look like:

Bridge avmfritz:fritzbox:arrakis [ ipAddress="a.b.c.d", user="XXX", password="YYY" ] {
	Thing HAN_FUN_CONTACT ABCDEFGHIJKL_1 "your-device-name" [ ain="ABCDEFGHIJKL-1" ]

!!! Remind adding the “_1” to the AIN_IDENTIFIER at the third position and the “-1” to the AIN number at the end of the line !!!

1 Like

Hi Justus,

Thanks for the kudos and of course for testing my stuff.

Are you sure about that? IIRC the third position in the thing definition is intended for the things id and you are nearly free to choose whatever you like for it.

Bridge avmfritz:fritzbox:arrakis [ ipAddress="a.b.c.d", user="XXX", password="YYY" ] {
	Thing HAN_FUN_CONTACT MyHAN_FUNContact "your-device-name" [ ain="ABCDEFGHIJKL-1" ]

This should work too.

Yes, I agree this is true that the third position can be named individually!!!

I was just sticking to your examples on Github where you used this the AIN + “_1” in the things definition line. And as this identifier reappears in the channel definition in the items file it is important not to forget to use the same AIN + “_1” again to have the configuration consistent!

Others who may follow your examples might - like I did in the first try :blush: - miss the “_1” in one of the definitions and overlook this small typo …

But if someone uses his individual identifier than it is true that my hint is not important :sunglasses: