upnp package

import ""

package upnp allows to query the un-authenticated UPnP fritzbox endpoints (with stats regarding the internet connection for instance).



type Client

func NewClient

NewClient creates a new UPnP client and discover the services.

Argument addr should not have a trailing slash (usually If client is nil, http.DefaultClient will be used.

func (Client) GetStrings

GetStrings retrieves the values associated with the given (service, action). Call ListServicesActionsVariables to get the list of availables services, actions and variables.

func (Client) ListServicesActionsVariables

ListServicesActionsVariables returns a list of services, with associated actions and variable names. See Example.

package main

import (


func main() {
	c, _ := upnp.NewClient("", nil)
	svc, _ := c.ListServicesActionsVariables()
	for s, actions := range svc {
		for a, vars := range actions {
			fmt.Println(" - " + a)
			for _, v := range vars {
				fmt.Println("    " + v)

Source Files

service.go upnp.go


git clone