The adapter reads the network device list from the Fritz! Box and allows to change the device name, the assignment to an owner, whether the device should be monitored or a warning should be logged when going on- or offline. Reading out the device list should provide an overview of active / inactive, LAN / WLAN devices and registered guest devices.
For this adapter the AVM Fritzbox is used. Here you can find informations about the Fritzbox https://avm.de/produkte/fritzbox/.
The used TR-064 interface to the fritzbox is described here: https://avm.de/service/schnittstellen/. Following TR-064 functions are used:
- GetSpecificHostEntry
- X_AVM-DE_GetSpecificHostEntryByIP (supported from 2016-05-18) -> is used to read the status of a member via the IP address
- GetHostNumberOfEntries
- X_AVM-DE_GetHostListPath (support from 2017-01-09) -> is used for member configuration
- GetSecurityPort
By default, the TR-064 interface is not activated. However, this can easily be changed via the
FritzBox web interface. To do this log in into your FritzBox and ensure that the expert view is activated.
Then you will find below "Home Network »Home Network Overview» Network Settings" the point
"Allow access for applications". There you have to activate the checkbox and then restart the FritzBox once.
The configuration of ip-address, user and password is necessary to get the device data from the fritzbox. The password is encrypted and wasn't saved in clear text.
The interval can be configured from 1 to 3600 seconds. Normally a value of 67 to 187 seconds is an good interval to read the fritzbox data.
You can choose whether a message is written to the log or to the telegram when the IP address is changed.
If activated and a device is added to the Fritz!Box network list (a. e. a guest device), a warning is sent to the configured receiver (Off, Log, Telegram). This happens regardless of whether the device is being monitored or not.
ignore speed in daily changes list to detect change on an device
New or removed devices are missing or are still in the adapter device list. Therefore, after changes to the network configuration of the Fritz!Box, the adapter configuration must also be called up and saved.
The collected information is written as data points under fb-tr064-mon.n.info
The function checks the availability and version of used fritzbox features. The collected information is written as data points under fb-tr064-mon.n.info.supportedFunctions
The list of devices is only displayed if the adapter was able to start successfully after the main configuration. The list show following columns
from the Fritzbox, can be changed. If activated (see watch), the other data points of the device are created under this name.
only for your information
Is written as a data point, can be evaluated by other scripts. Used by me for presence detection. "guest" is a reserved name for devices known to guests
If activated and the device goes active, a warning is sent to the configured receiver (Off, Log, Telegram). This happens regardless of whether the device is being monitored or not. Also a warning is sent, if detected a ip address change.
If activated and the device goes inactive, a warning is sent to the configured receiver (Off, Log, Telegram). This happens regardless of whether the device is being monitored or not.
If activated, data points are created for this device and the status (active / inactive and other) is updated in the query interval.
The following data points are maintained for each device
fb-tr064-mon.n.devices..
the current ip address
ip address before last change, initially identical to IP
the current mac address
mac address before last change, initially identical to MAC change detection is currently not supported
shows whether the device is active according to Fritzbox or not
pre-filled with hostname from the Fritzbox, can be changed. The data point for the device is created with this name.
if the name of the owner of the device is "guest", the value is true
read hostname from the Fritzbox
read interfacetype from the Fritzbox
time stamp when the device was last recognized as active from the Fritzbox
time stamp when the device was last recognized as inactive from the Fritzbox
The name of the owner of the device from the configuration page
read port from the Fritzbox
read speed from the Fritzbox
the value of the setting on the configuration page for warnOn
the value of the setting on the configuration page for warnOff
the value of the setting on the configuration page for watch
The following data points are cummulated informations
fb-tr064-mon.n.devices.
Number of active devices
Number of active WLAN devices from guests
Number of active LAN devices
Number of active WLAN devices
Number of devices
JSON table, all active guests devices
JSON table, all active LAN devices
JSON table, all active WLAN devices
JSON table, all active devices
JSON table, all devices
JSON table, all inactive devices
JSON table, all new added device from Fritzbox
JSON table, all removed devices from Fritzbox network list
ip address has changed
owner name has changed
JSON table, all watched devices active state
JSON table, all watched active devices
JSON table, with device changes aggregated for every day
item count in deviceList_daily_changes_JSON
max items count should in deviceList_daily_changes_JSON (should 1.5 - 3 fold of devices count)
warn state has changed
JSON table, all watched inactive devices
watch state has changed
The following data points are cummulated informations
fb-tr064-mon.n.info.
the adapter is connected to the Fritzbox or not
the ip address of th Fritzbox
the mac address of the Fritzbox
the name of the Fritzbox
OS version for the supported functions of the Fritzbox
OS version of the Fritzbox
- (greyhound) correct warning if device goes active and warning is enabled
- (greyhound) Read-only state "fb-tr064-mon.0.devices.deviceList_active_changed" has been written without ack-flag with value "true"
- (greyhound) remove enhance device find with interface type
- (greyhound) some small fixes
- (greyhound) fix setStateChangedAsync, setStateAsync with ack = true
- (greyhound) enhance device find with interface type
- (greyhound) split warn column in warnOn and warnOf
- (greyhound) option to enable warning for new network devices in Fritz!Box network list
- (greyhound) add configuration page for known guest WLAN devices
- (greyhound) add handling for known guest WLAN devices
- (greyhound) fix ts, speed for new list items in device change list
- (greyhound) smal function call fix
- (greyhound) fix add, remove device to change device list
- (greyhound) fix suported function detection
- (greyhound) fix type conversations
- (greyhound) new state deviceList_active_changed (changed active, hostname, ip), used as subscription for update control data points
- (greyhound) initial release, partial fork from https://www.npmjs.com/package/iobroker.fb-checkpresence
MIT License
Copyright (c) 2019-2020 truegreyhound truegreyhound@gmx.net
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
v0.3.3 Anpassung readme