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

Use JSON specs for implementing grill features. #39

Merged
merged 18 commits into from
Apr 3, 2023
Merged

Use JSON specs for implementing grill features. #39

merged 18 commits into from
Apr 3, 2023

Conversation

dknowles2
Copy link
Owner

This PR changes the implementation to use JSON specifications for grills retrieved from the Dansons API server. The JSON specs not only have metadata about each grill model, but also include the hex command codes for grill functions, and some JavaScript snippets that perform various translations. We utilize js2py to execute these JavaScript snippets so that our library executes the same code that the mobile apps do.

There are breaking changes involved here:

  1. api.PitBoss now requires a second parameter, which is the grill model being controlled. We can't ascertain this from the BLE connection, as this information is not returned from any API call or GATT characteristic.
  2. The parameter sent to the state callback has changed. It is now the same dictionary structure returned by the spec JavaScript snippet.

New JSON specs can be retrieved using the new scripts/dump_grills.py script.

@dknowles2 dknowles2 added enhancement New feature or request breaking Includes backwards-incompatible changes cleanup Code hygiene improvement labels Apr 3, 2023
@dknowles2 dknowles2 merged commit 52ded76 into main Apr 3, 2023
@dknowles2 dknowles2 deleted the grills branch April 3, 2023 02:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Includes backwards-incompatible changes cleanup Code hygiene improvement enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant