Comments (2)
Thanks for the detailed response, I hadn't realised quite how complicated this was!
I'm currently working on a library for accessing a GivEnergy battery as control of that is of more use to me initially than this gateway. Once that's done I'll get back to working on this library and can then share it with you when complete to see if you want to include it or not.
Keep up the good work.
from enphase-api.
Apologies for the delay in reply, I found a few vulnerabilities in the IQ Gateway that I have been responsibly disclosing to Enphase.
To answer your question, a lot of the information has been found from either looking inside the client side JavaScript (https://envoy.local/backbone/application.js) and running it through a JavaScript prettifier to unminify it.
Some further information was obtained from decompilation of the Android Enphase Installer ToolKit.
The documentation is produced by gateway_generate_docs.py which is undergoing continuous improvements. The program has a metadata file (API_Details.json) where I teach it the URLs / JSON response and it fetches the JSON response and then derives the schema.. I then fill in the blanks from either my own knowledge "v" being "230" in the UK means V = "Voltage" or from the JavaScript/tookit code.
Through my research I've accidentally stumbled across the firmware and also the source code that runs on the IQ Gateway - it's written in lua and Ruby.. but I am unsure of the legality of sharing that and in all honesty most of the API end-point functionality can (and was) mostly be derived from the above - the JSON that comes back from the HTTP GET should be pretty much the same irrespective of what software we're running. Obtaining the public key for the JWT was a nice touch however - haven't seen that information anywhere else! Also a lot of the APIs actually behind the scenes themselves make further HTTP API requests - so I'll definitely include in the documentation where is the best to get which bits of data (briefly, the /stream/meter is just /ivp/meters/reports behind the scenes with some JSON key/value re-mapping and on a timer!).
If you create a C# wrapper and it follows the same lean principles (not too many third party dependencies etc) as the rest of the project I'd love to include it in this project. I put some of the code inside the "Python" folder in the hope that there could later be a "C#" folder etc for clients in other languages.
One thing I hadn't realised when I started this project was just how massive it would be - which is why I invested time in writing a script to automatically produce the documentation and to infer JSON schema etc.. I plan to always be improving the documentation. Some of the "examples" are in-use in my house (gateway_amqp_meters.py, amqp_database_meters.py and amqp_unicorn_hat_hd.py) so while the documentation and the library was the primary focus, the examples actually are written to be production ready.
Hope you enjoy this project as much as I have :). If you have any pull requests I'll happily add stuff in - just might tweak it to be in keeping with the simplicity of the project (no dependency hell).
from enphase-api.
Related Issues (20)
- Documentation for fresh solar install on how to begin leveraging this repo HOT 3
- Non-metered Envoys return empty responses from /ivp/meters HOT 1
- Getting inverter-level power, current, voltage and temperature from the local API? HOT 6
- inv.adoc suggestion
- Response - /ivp/ensemble/device_list
- Response /ivp/ensemble/device_list
- Response /ivp/ensemble/ec1_wiring_test
- Response /ivp/ensemble/gen_wiring_test` & /ivp/ensemble/generator
- Response /ivp/ensemble/profile_status
- Response /ivp/ensemble/sleep
- Response /ivp/ensemble/submod
- Response /ivp/meters/storage_setting
- storage ct can be reported in /ivp/meters measurementtype
- POST request to force discharge of battery HOT 1
- JWT without parsing HOT 2
- Handle updated self-signed cert HOT 3
- stream/meter sever HOT 6
- Get Current Profile does not work with Bearer Auth HOT 3
- Accessing IQ Gateway's internal DB from the local API?
- Looking for an battery energy endpoint
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from enphase-api.