Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for retrieving module ids from device #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

scottmckenzie
Copy link
Contributor

Inspired by PR#20 I found that the module ids can be retrieved from the device by calling GetModuleProfile. This means they don't have to be hard-coded.

The SOAPAction method was originally written to return a text value from the SOAP response. I have modified this to return the raw SOAP response. I have then added two new methods:

  • get_soap_value - returns a text value from the SOAP response as SOAPAction used to
  • get_soap_element - returns an xml element from the SOAP response

Default module ids are configured in init before reading the actual values from the device. I have test this on two AU devices one with v1.13 A1 firmware and one with 1.23 A2 firmware.

I don't have any B series firmware devices to test against. As long as the module subtypes (on lines 225 & 227) match it should work. This needs to be tested though.

@LinuxChristian
Copy link
Owner

Hi @scottmckenzie. Thanks for the PR. Everything looks fine. I will just test it out on my plugs and if everything checks out we can merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants