nsasgroup.blogg.se

Raspberry pi auf fritz nas zugreifen
Raspberry pi auf fritz nas zugreifen






raspberry pi auf fritz nas zugreifen

This can be found after logging into the FRITZ!Box and visiting System -> FRITZ!Box Users -> Users.

raspberry pi auf fritz nas zugreifen

Starting from FRITZ!OS 7.24 the FRITZ!Box creates a random username for the admin user if you didn’t set one yourself. The configuration in the UI asks for a username. The package comes with library-modules to make some API calls easier and also demonstrates how to implement applications on top of FritzConnection.Both TR-064 and UPnP need to be enabled in the FRITZ!Box ( Home Network -> Network -> Network settings -> Access Settings in the Home Network ) for Home Assistant to login and read device info. After creating the cache FritzConnection will start up much more faster. To avoid this FritzConnection provides a cache that can get activated by the use_cache parameter: fc = FritzConnection(., use_cache=True) This causes a lot of network requests and can take some seconds. On instanciation FritzConnection has to inspect the model-specific router-API. To avoid hardcoding username and password in applications FritzConnection can read both from the environment variables FRITZ_USERNAME and FRITZ_PASSWORD. The content-type of the response-data is typical “text/plain” or “text/xml” and may need further processing.

raspberry pi auf fritz nas zugreifen

A call to the method returns a dictionary with the content-type, the encoding and the response data of the http-response. The call_action() method returns the response from the router as a dictionary with the values already converted to the matching Python datatypes.Ĭall_http() expects a command for the http-interface like “getbasicdevicestats” and, depending on the command, additional arguments like a device “ain” (identifier).

raspberry pi auf fritz nas zugreifen

this can be network settings, status informations, access to home automation devices and much more. In general FritzConnection can execute every service and action provided by the (model-specific) API as documented by AVM. Both APIs can be used on the same FritzConnection instance side by side.Ĭall_action() expects a TR-064 service- and an action-name (and optional arguments). # http interface: gets history data from a device with given 'ain'įc.call_http("getbasicdevicestats", "12345 7891011")įritzConnection provides two basic commands to communicate with the router APIs: call_action() for the TR-064-Interface and call_http() for the (AHA)-HTTP-Interface. # tr-064 interface: reconnect for a new ipįc.call_action("WANIPConn1", "ForceTermination") Print(fc) # print router model information Using fritzconnection is as easy as: from fritzconnection import FritzConnectionįc = FritzConnection(address="192.168.178.1", user="user", password="pw") The latter will install the segno package to enable QR-code creation for wifi login. Installation:įor installation use pip $ pip install fritzconnection Supports the TR-064 protocol, the (AHA-)HTTP-Interface and also allows call-monitoring. Python-Interface to communicate with the AVM Fritz!Box and connected devices.








Raspberry pi auf fritz nas zugreifen