Cannot get Guest Wifi state - Empty Dict as a response
See original GitHub issueI am using a custom component for Home Assistant called ha-fritzbox-tools. Unfortunately, it cannot get the state of my guest wifi. See this issue for more information.
Ticked the necessary checkboxes in Access Settings in the Home Network
Occurred after upgrading to version: 0.8.4
Surprisingly this has worked before with 0.6.5
, however I cannot seem to replicate it anymore.
Requests version: 2.22.0
Fritzbox model: FritzBox 7560
After entering this:
import fritzconnection as fc
c = fc.FritzConnection(
address='yourhost',
port= 49000,
user='yourusername',
password='yourpassword'
)
print(c.call_action('WLANConfiguration:3', 'GetInfo'))
the last line returns an empty dict {}
which is needed for getting the guest wifi state.
However, the connection is established successfully, since this:
print(c.call_action('Layer3Forwarding:1','GetDefaultConnectionService')['NewDefaultConnectionService'])
returns 1.WANPPPConnection.1
Hope you guys can help me out 😃
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
Python dictionary is empty while imported to another module
When you run the test.py file, anything within the if __name__ == "__main__". of the server.py isn't being run, since it isn't the...
Read more >Create a Dictionary in Python – Python Dict Methods
Define an empty dictionary; Define a dictionary with items. An overview of keys and values 1.Find the number of key-value pairs contained in ......
Read more >Python Hash Tables: Understanding Dictionaries
Hi guys, have you ever wondered how can Python dictionaries be so fast and reliable? The answer is that they are built on...
Read more >Unable to guess signature of empty list/dict · Issue #17 - GitHub
I'm trying to execute AddAndActiveConnection, but I can't pass input parameters that are/contain an empty list/dict, because of the a{sv} ...
Read more >Using the Python defaultdict Type for Handling Missing Keys
Free Bonus: Click here to get a Python Cheat Sheet and learn the basics of Python 3, ... value for missing_key , but...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m suppose the box reports some error, because neither a ServiceError nor an ActionError gets raised but an empty dict returns. May be the upcoming 1.0 version will report the failure in full detail, as the parser has been rewritten and error handling is vastly enhanced.
During some debugging, @springstan and @AaronDavidSchneider found out that it’s possible to set the state of the guest wifi on the affected setup:
c.call_action('WLANConfiguration:3', 'SetEnable', NewEnable=1)
So setting the state works for him, but calling the
GetInfo
action doesn’t work as expected. Just for the record 😊