Skip to content

Conversation

@MartySkinner
Copy link

To use the XML RESTful API on an Indigo 5 system or for testing on any Indigo 6 system, add this line to ~/.homebridge/config.json in the middle of the "platforms" section:

"version": "5",

The version of xml2json I used as a dependency is https://github.com/buglabs/node-xml2json#readme, and also can be installed via

npm install [-g] xml2json

/Marty

@webdeck
Copy link
Owner

webdeck commented Jan 24, 2016

Hi Marty. Thank you for submitting this pull request. Sorry for the delay in my response - work has been very busy.

Could you please make the following changes:

  • Update the comment at the top of index.js to document the new version configuration item.
  • Update README.md and sampleconfig.json to show the new configuration item (show value as "6" here as the default)
  • Move lines 307-330 into a helper function to make it cleaner
  • For lines 157-166, this would be cleaner if you defined a variable for the proper extension ("json" or "xml") based on the version config, and then you wouldn't have redundant code to set requestURLs.

Thanks,
-Mike

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