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
Porting to Python #1
Comments
the request options being passed to the https module in node are
were Hope that helps |
I think my issue is more to do with the body of the message considering that all other endpoint calls do work such as login and loadMain. Do you have the same JSON for how the body of the POST request is formed? |
Actually problem solved, the body needs to be json encoded, something postman and python do not do by default. Thank you for your help! |
Get Device Status
Turn Device On
Turn Device Off
Note if you want to read the meter data you might want to look at ( math pulled directly from the Android app and ported to JS ) |
Hi @dirwin517 thanks for the work on the API. I'm working with Node-Red to query the API and I have the same problem that @keatontaylor had. I'm not sure how to work with form data, and I think my problem is related to the enconding on the body. So far I can query /loadMain and /Login endpoints with no problems but when I try devRequest I don't get any response. I'm getting these parameters from previous calls to the other endpoints. My code looks like this:
thanks for all the help |
Perhaps you can help me. I've been attempting to port this code to python and regardless what I try it fails with using the devRequest endpoint. Heck. I've even tried using the google chrome postman extension to simply get ensure I am passing the right body and headers, but that doesn't work either.
Do you happen to know what is special about the devRequest endpoint. Maybe a special encoding I am not using for the body request data that I am oblivious to.
Any direction would be extremely helpful. Thanks :)
The text was updated successfully, but these errors were encountered: