Ciao,
based on the
great work in gathering the presence from the fritzBox using the ARP/DHCP lease tabel for devices, I used to do the same but using nodered. her eis the flow:

- FritzTR64.jpg (45.25 KiB) Viewed 1687 times
- Spoiler: show
- [{"id":"e4fbaee1.690b3","type":"tab","label":"Flow 1","disabled":false,"info":""},{"id":"252c212b.e222be","type":"inject","z":"e4fbaee1.690b3","name":"injectRequest","topic":"","payload":"[{\"NewMACAddress\":\"94:FE:22:F2:D1:A2\"},{\"NewMACAddress\":\"40:9C:28:2D:BC:A3\"}]","payloadType":"json","repeat":"600","crontab":"","once":false,"onceDelay":0.1,"x":132,"y":77,"wires":[["de401f57.eb358"]]},{"id":"5b0bc536.5d486c","type":"fritzbox-in","z":"e4fbaee1.690b3","device":"","name":"TR69.presence","service":"urn:dslforum-org:service:Hosts:1","action":"GetSpecificHostEntry","arguments":"{\"NewMACAddress\":\"value\"}","x":359,"y":77,"wires":[["6764a833.1f81a8"]]},{"id":"6764a833.1f81a8","type":"json","z":"e4fbaee1.690b3","name":"","property":"payload","action":"obj","pretty":false,"x":457,"y":130,"wires":[["9a04354d.3c8888"]]},{"id":"9a04354d.3c8888","type":"function","z":"e4fbaee1.690b3","name":"FritzPresence 2 Domoticz","func":"var preMsg = {};\npreMsg.payload = {};\n\nvar preMap = {\n '<hostName as it appears in fritz>' : {\"command\": \"switchlight\", \"idx\": <DomoticzIdx>, \"switchcmd\": setOnOff(parseInt(msg.payload.NewActive),false) },\n};\n\nreturn {\"topic\": msg.payload.NewHostName , \"payload\": preMap[msg.payload.NewHostName]};\n\n\nfunction setOnOff(curValue, invert) {\n switch (curValue) {\n case 0:\n if (invert === false) {\n return \"Off\"\n } else {\n return \"On\";\n }\n break;\n case 1:\n if (invert === false) {\n return \"On\"\n } else {\n return \"Off\";\n }\n break;\n }\n}","outputs":1,"noerr":4,"x":615,"y":76,"wires":[["efa0aa25.90f2e8"]]},{"id":"efa0aa25.90f2e8","type":"rbe","z":"e4fbaee1.690b3","name":"","func":"rbe","gap":"","start":"","inout":"out","property":"payload","x":690,"y":129,"wires":[[]]},{"id":"de401f57.eb358","type":"function","z":"e4fbaee1.690b3","name":"Mac Request","func":"return [[\n { \"payload\" : {\n \"NewMACAddress\": \"AA:BB:CC:DD:EE:FF\"\n }\n },\n { \"payload\" : {\n \"NewMACAddress\": \"FF:AA:BB:CC:DD:EE\"\n }\n }\n]];","outputs":1,"noerr":0,"x":255,"y":135,"wires":[["5b0bc536.5d486c"]]}]
the flow inject a request every 10 minutes to the mac request node that contain the mac address to request, the messages goes to the Fritz.In node that returns a message for each device with the status.
Status goes to the FritzPresence 2 Domoticz that decode the hostname to a MQTT telegram with the correct IDX, a RBE node prevent multiple messages with the same payload.
To configure it you have to:
Node
MAC REQUEST: enter the Mac Address as shown.
Node
Fritz.In: configure your router connection
Node
FritzPresence 2 Domoticz : enter the Hostname as shown in the Fritz UI and the IDX of your virtual switch
deplay it and enjoy!

ciao
M