Add support for retrieving module ids from device
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.
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.