python-dlipower
python-dlipower copied to clipboard
Python modules to manage Digital Loggers Web Power Switch
This PR addresses a bug in `_block_to_list` that fails if an outlet name contains a `-`. The following changes will attempt to treat any block element that contains a `-`...
Only try to ouput the status code for request if request is not None
This line of code is causing an attibute error. ``` logger.debug('Response code: %s', request.status_code) ``` https://github.com/dwighthubbard/python-dlipower/blob/6d6c961a3da1059c42ff4abc0114b266edaf1028/dlipower/dlipower.py#L429 request is not guaranteed to have a value and so if the request fails,...
Fix for non-default Username
Hi, Just realized that non-admin users aren't able to rename outlets; spent some time wondering why set_outlet_name wasn't working though, so wanted to suggest some sort of warning when set_outlet_name...
I'm using the digitialloggers integration with Home Assistant (https://www.home-assistant.io/integrations/digitalloggers/), and it looks like it doesn't throw an exception on DNS lookup failures. The exception at the following line only catches...
This was done to prevent cases when, for one of many reasons, the device receives the OFF, but not the ON command. This has been resulting in outlets being left...
If there is a user setup on the switch with access to only 3 outlets (2,3 and 5 for example) then if you try to operate outlet 5 you get...
I was able to fix the issue by making slight modification in the file dlipower.py. I modified the line `data = {'Username': 'admin', 'Password': m.hexdigest()}` to `data = {'Username': self.userid,...
I expect `dlipower set_outlet_name 1 foo-bar` to set the outlet name to "foo-bar", but instead it throws this NameError exception: ``` $ dlipower set_outlet_name 1 "foo-bar" Traceback (most recent call...