question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cannot get Guest Wifi state - Empty Dict as a response

See original GitHub issue

I 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:closed
  • Created 4 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
kbrcommented, Nov 13, 2019

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.

2reactions
mammuthcommented, Nov 17, 2019

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 😊

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found