405 Client Error

I’m converting some data from my FitBit Aria to Wyze. I’ve got the data from fitbit download as JSON and I just need to rip through it and upload to Wyze. The SDK seems okay, but it’s throwing and error and I can’t find any info on it.

Here’s the code that’s failing
client.scales.add_weight_record(device_mac="Fitbit_Aria", mac="Aria", user_id=user_id, measure_ts=measure_ts, weight=weight)

This is the error thrown:
405 Client Error: for url: https://wyze-scale-service.wyzecam.com/plugin/scale/get_latest_record

Any idea what this error means or how to get past it?

Wyze does not have any officially supported SDKs, there are a few community projects like the one your using, and you may have better luck asking in the GitHub issues or other channels related to those projects.

At first glance it looks like you may have the wrong value in the mac fields. That should probably be the MAC address of your Wyze device. You may be able to find more info on the documentation for that SDK.

The 405 error usually means the URL is wrong, but unless there’s an error in the SDK then that’s probably not anything you’re doing wrong. Check if any related issues exist in GitHub for that SDK.

I hope you’re able to get it working. If so, please post your fix here to help future users.

Thanks for the info! Too bad I didn’t realize this. This could be a deal-breaker on using Wyze. I thought they were open to exposing data to the users.

1 Like

They have a portal that is used to generate API keys, and they specifically added this recently to prevent new security changes from breaking 3rd party projects. This shows that they definitely support these projects and allow them, but they just don’t want to allocate resources on creating a documented api.

1 Like

In this case, you could probably talk to shauntarves who created and runs the Wyze SDK python client project here:

2 Likes

Thanks for all the tips! I actually started digging through the wyze-sdk code and it looks like there may be some methods that are not calling the right API endpoint. I created an issue for the repo owner in GitHub, so hopefully it gets addressed.

3 Likes

I think that’s exactly the best thing to do here, and what I would’ve done. :+1:

2 Likes