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

Change data structure to be similar to the ABB API #15

Open
henry-spanka opened this issue Nov 16, 2019 · 4 comments
Open

Change data structure to be similar to the ABB API #15

henry-spanka opened this issue Nov 16, 2019 · 4 comments

Comments

@henry-spanka
Copy link
Owner

ABB has now documented parts of their Web API.

https://developer.eu.mybuildings.abb.com/getting-started

We should change the structure to be similar and also expose things like functionId and pairingId.

@henry-spanka
Copy link
Owner Author

functionId and pairingId added in: 194fcbd and cf6dbbe

@ZzAve
Copy link
Contributor

ZzAve commented Nov 27, 2019

Awesome! I like these. Especially functionId is cool, since this allows you to not having to know to have to know deviceId and what channels to use.

However, since the value that is returned now in /info, specifically the channel-value part
https://github.com/henry-spanka/freeathome-api/compare/feature-abb-structure#diff-c4e2cb08ac5706889f13283ada3825f2R173

is an object now (instead of a number), this is a breaking change. Is it time for a 2.0 already?

@henry-spanka
Copy link
Owner Author

👍 I think it is. That's why I pushed it to a separate branch as it would break the current API.
Either go to 2.0 or provide a separate API endpoint.

I think it would be fine if we allow a config option to be set to use the legacy API. Should be pretty simple to keep the legacy API as we just need to use the old XMLParser.

@ZzAve
Copy link
Contributor

ZzAve commented Nov 28, 2019

It's a little more maintenance you'd have to do, and I guess you need to determine where you want to do the final mapping. Maybe do it at the 'outer' edge (SystemAccesPoint.ts), so you allow your internal model to update to the new api anyway.

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

No branches or pull requests

2 participants