You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
Lukas S f511ecf193 change to new version (see changelog) 5 years ago
dist change to new version (see changelog) 5 years ago
fhem change to new version (see changelog) 5 years ago
.gitignore first release 5 years ago
CHANGELOG add changelog 5 years ago add 5 years ago change to new version (see changelog) 5 years ago

API for Fhem


  • HTTP GET-request based lightweight API
  • Supports SSL/TLS
  • Supports Fhem-authentication (basicAuth)
  • Works fast and stable


Useful to send commands to Fhem and handle the received answer. A own connection is created for each command which is send to the Fhem-server.


#: import needed API
from fhem import WebApi

#  creates an api class with the WebApi. WebAuth is used so username and password are given.
#  for more security we activate ssl (is on by default). We used a self-sign cert so we disable the verify.
api = WebApi('', 8083, user='admin', pwd='s3cR3t', ssl=True, verify=False)

#: send the command to toggle "MainBulb01" on. In This case None is returned.
api.send('set MainBulb01 on')

#: saved the received answer from get-command to recv. In this case may a hex color code like 2AFF0F
recv = api.send('get MainBulb01 rgb')

#: print out the received answer

TelApi (removed in 0.1.dev1)

  • Telnet based
  • Supports SSL
  • Supports password auth
  • Removed from code cause of instability and SSL conflicts