Comments (3)
I've tried it with a user just having homautomation-rights and it works fine. Any user can create a FritzConnection
instance (or FritzHomeAutomation
in this case), but the allowed operations are restricted to the user-rights. What you need to know is the ain
of the switch, i.e. you can get all ain
s from the command line (use the latest fritzconnection version 1.13.2):
$ fritzhomeauto -i 192.168.178.1
Then the following script will do the job:
from fritzconnection.lib.fritzhomeauto import FritzHomeAutomation
user = "test_user" # user with just homeautomation rights
password = "the cool password for the test_user"
ain = "11657 0240192" # use the ain of your device here
ip = "192.168.178.1" # normalwise the default ip
fh = FritzHomeAutomation(address=ip, use_cache=True, user=user, password=password)
fh.set_switch(identifier=ain, on=True) # or 'on=False'
from fritzconnection.
Thank you very much! It works. I really don't know what I made wrong in my first attempt. I just used from another code example some lines, maybe I messed something up there.
from fritzconnection.
Thanks for the response.
from fritzconnection.
Related Issues (20)
- GetDeviceLog always returns the same entries HOT 6
- connect from internet HOT 3
- FritzMonitor connection problems HOT 3
- Invoke the WPS button HOT 1
- UPnP Error HOT 3
- How to get VoIP data from FritzBox 7490? HOT 1
- List of active devs HOT 2
- Fritz!OS 7.51 BETA not full supported? HOT 2
- Can't accsess docsis logg? HOT 5
- Service names may have changed for later version of fritzos HOT 4
- Broken reconnect of fritzmonitor HOT 1
- Issue with Fritz OS 7.70beta HOT 15
- Install under Bockworm HOT 3
- Add url filtering configuration
- Cannot read connection speed from LAN device HOT 1
- Dial door opener HOT 4
- CLI tool not working HOT 1
- How to get advanced support information HOT 1
- CLI problem on 6.88 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fritzconnection.