A lightweight, easy to use console client for the AVM FRITZ!Box Home Automation.
Go Makefile Other
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.circleci Issue #130: Upgrade to CircleCI 2 Feb 17, 2018
.github configure stale bot Jan 3, 2018
cmd Interactive config survey: mkdir parent as 0700, do not overwrite use… Aug 18, 2018
config Fix test: use an empty filename to make sure config cannot be written Aug 18, 2018
docker/build Supply --no-install-recommends when apt-installing and clean apt cach… Apr 14, 2018
fritz Interactive config survey: use default file location "~/.fritzctl/con… Aug 18, 2018
httpread Replace github.com/pkg/errors by a simplified implementation Jun 16, 2018
images Update demo gif using latest commit Mar 24, 2018
internal Move console package to internal Jun 17, 2018
logger Replace github.com/pkg/errors by a simplified implementation Jun 16, 2018
man shorten man.GenerateManPage to man.Generate Nov 18, 2017
manifest Move console package to internal Jun 17, 2018
mock Interactive config survey: use default file location "~/.fritzctl/con… Aug 18, 2018
os Replace default config file /etc/fritzctl/fritzctl.json by /etc/fritz… Aug 18, 2018
testdata Interactive config survey: mkdir parent as 0700, do not overwrite use… Aug 18, 2018
tools Move console package to internal Jun 17, 2018
vendor Upgrade of 3rd party dependencies Aug 10, 2018
.bettercodehub.yml Issue #93: exclude vendor folder from bettercodehub analysis Oct 29, 2017
.codeclimate.yml exclude vendor folder from static analysis (codeclimate) Aug 12, 2017
.gitignore Introducing "analice", a OSS license analysis tool Apr 23, 2018
.gitlab-ci.yml Upgrade to dep v0.5.0: migrate Gopkg.lock and use 'dep check' in CI Jul 28, 2018
.travis.yml Use latest go version of 1.x release train May 10, 2018
CONTRIBUTING.md Fix grammar in contribution guide Dec 27, 2017
Gopkg.lock Upgrade of 3rd party dependencies Aug 10, 2018
Gopkg.toml Define prune options in Gopkg.toml Feb 10, 2018
LICENSE Initial commit Oct 18, 2016
Makefile Replace default config file /etc/fritzctl/fritzctl.json by /etc/fritz… Aug 18, 2018
NOTICE Replace github.com/pkg/errors by a simplified implementation Jun 16, 2018
README.md Add support for Debian 10 "buster" May 9, 2018
appveyor.yml let example tests run via Makefile; Nov 5, 2017
main.go Replace github.com/pkg/errors by a simplified implementation Jun 16, 2018
main_test.go Replace github.com/pkg/errors by a simplified implementation Jun 16, 2018

README.md

fritzctl - console AVM FRITZ!Box client

fritzctl

Usage

Demo usage

About Wiki

fritzctl is a command line client for the AVM FRITZ!Box primarily focused on the AVM Home Automation HTTP Interface.

It should work out-of-the-box with most FRITZ!Boxes running a recent FRITZ!OS version. It has been explicitly tested with

FRITZ!Box FRITZ!OS
FRITZ!Box Fon WLAN 7390 06.51, 06.80, 06.83
FRITZ!Box 6490 Cable 06.63, 06.83, 06.84, 06.87
FRITZ!Box 7490 06.83, 06.90, 06.93

CI Build Status TravisCI Build Status CircleCI Build Status GitlabCI Build Status SemaphoreCI Build status AppVeyor

Code Go Report Card codecov codebeat badge Codacy Badge BCH compliance Maintainability CodeFactor

Releases

  • release downloads github release
  • Download .deb .deb packages
  • Download .rpm .rpm packages
  • Download .zip windows

Install

Debian/Ubuntu

Add the repository (replace stretch by buster, jessie, wheezy or sid depending on your distribution)

echo "deb https://dl.bintray.com/bpicode/fritzctl_deb stretch main" | sudo tee -a /etc/apt/sources.list

and its signing key

wget -qO - https://api.bintray.com/users/bpicode/keys/gpg/public.key | sudo apt-key add -

The fingerprint of the repository key 3072D/35E71039 is 93AC 2A3D 418B 9C93 2986 6463 15FC CFC9 35E7 1039. Update your local repository data and install

sudo apt update
sudo apt install fritzctl

Upgrades for fritzctl will now be detected by apt update and can be installed via apt upgrade.

openSUSE

Add the repository

wget https://bintray.com/bpicode/fritzctl_rpm/rpm -O bintray-bpicode-fritzctl_rpm.repo && sudo zypper ar -f bintray-bpicode-fritzctl_rpm.repo && rm bintray-bpicode-fritzctl_rpm.repo

Update your local repository data and install

sudo zypper refresh
sudo zypper in fritzctl

MacOS

Install using homebrew

brew install bpicode/tap/fritzctl

Windows

Windows binaries can found in the windows directory.

From Source

fritzctl is go-gettable. Set up a go environment guided by How To Write Go Code and then run

go get github.com/bpicode/fritzctl

As Library GoDoc

Example:

package main

import "github.com/bpicode/fritzctl/fritz"

func main() { 
	h := fritz.NewHomeAuto(
		fritz.SkipTLSVerify(),
		fritz.Credentials("", "password"),
	)

	err := h.Login()
	if err != nil {
		panic(err)
	}

	h.Off("Socket_Bedroom")
	h.Temp(18.5, "Heating_Bedroom")
}

Reproducing binaries

Versions >= 1.4.16 can be checked for reproducibility. There is a ready-to-go Dockerfile which prepares an appropriate environment. Of course, the setup instructions can applied to any other build platform. To reproduce a release, prepare a docker image with the help of build-args

docker build -t fritzctl/build docker/build \
   --build-arg go_version=1.9.2 \
   --build-arg fritzctl_version=1.4.16 \
   --build-arg fritzctl_revision=v1.4.16

Building the binaries is done in the container phase:

docker run --rm -v fritzctl_build_folder:/root/go/src/github.com/bpicode/fritzctl/build fritzctl/build

The above command will create a docker volume fritzctl_build_folder containing the binaries. Those can be checked for equality with the distributed ones.

License License FOSSA Status

This project is licensed under the terms of the MIT license, see LICENSE.

The fritzctl image is licensed under the Creative Commons 3.0 Attributions license. It is build upon the following work:

  • The Go gopher was designed by Renee French, licensed under the Creative Commons 3.0 Attributions license.
  • The Go gopher w/ patch cable image was created by Egon Elbre, licensed under CC0 1.0 Universal.