-
Notifications
You must be signed in to change notification settings - Fork 24
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
Update REST API to latest OT-BR-POSIX (TZ-217) #27
Comments
@FutureCow Thanks for reporting, we will check and add the missing APIs. |
Updating to the latest REST API will enable adding an ESP thread border router to Home Assistant; see this discussion for details https://community.home-assistant.io/t/openthread-border-router-support/540715/33 |
I've done some exploratory research on this, and it appears that the missing APIs in the discussion https://community.home-assistant.io/t/openthread-border-router-support/540715/33 are not the cause for the Home Assistant rejection. The key API mentioned in that thread is /node/dataset/active which is the same endpoint as /node/active-dataset-tlvs which according to this post https://community.home-assistant.io/t/openthread-border-router-support/540715/16 the /node/dataset/active was changed to /node/active-dataset-tlvs. Are there any other endpoints that are not implemented that Home Assistant is looking for? |
In fact, in the latest ot-br-posix REST API, It is normal for the current ESP Thread Border Router to not recognize If you change However, if you only change the URL definition in esp_br_web_base.h, then data that BR actually returns is |
I built the latest Posix and tested the REST API So for testing purposes (of trying to get Home Assistant to adopt the thread border router), I added a return of the identical information. Home assistant still did not detect the Thread border router, without any logs. Maybe the pending needs to be added as well? |
If you want to have a look at the information exchanged between Home Assistant and ot-br-posix, best would probably be to connect over http, and have a look at the traffic using Wireshark or tcpdump. Alternatively, you can use ncat as a logging proxy. |
Awesome thanks for the stackoverflow. I was able to get tcpflow to work properly I got the following:
I'll keep digging, but it does look like the issue is probably the allowed methods of DELETE, GET, Options, And Put |
Finally! While I've had to hack and hardcode the string currently, because I'm not great at C I got the thread border router added to homeassistant. The key is that the |
PR for the specific |
@FutureCow @laptopfreek0 The active/pending dataset REST APIs have been added in this commit: 0b08a3a. The current supported REST APIs are listed here: https://docs.espressif.com/projects/esp-thread-br/en/latest/codelab/web-gui.html#thread-rest-apis Thanks for your support, let us know if any further question or issues. |
In the latest release the webui and REST API was added to the ESP-OTBR, but not all of the components are added to this API. Would it be possible to update the API with the latest upstream from OTBR?
https://github.com/openthread/ot-br-posix/pulls?q=is%3Apr+rest+is%3Aclosed+author%3Aagners
The text was updated successfully, but these errors were encountered: