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

No documentation for meross_api_cli (format for __MEROSS_CREDS environment variable? #409

Open
akohlsmith opened this issue Nov 22, 2024 · 2 comments

Comments

@akohlsmith
Copy link

I'm trying to use the meross_api_cli utility and can log in without issue. It spits out a bit of JSON with token, key, user_id, user_email, domain, mqtt_domain, and issued_on keys. However if I try to set __MEROSS_CREDS to this string, then other commands such as device list say that the environment variable format is wrong.

I can't find documentation on the format for this environment variable, and the code does not appear to have much to go on either.

Can the documentation be updated to add the format that the utility expects this environment variable to have, and perhaps give an example or two of how the utility can authenticate and list/control a switch?

@donations-bot-prod
Copy link

Donation bot here. Supporters can mark their interest in this issue by adding a comment
starting with "+1" (without quotes) or adding the "#supporter_sponsor" keyword
(without quotes) in their comments.

You can become a donor by subscribing as Sponsor from the GitHub sponsorship page or from the BuyMeACoffee page.

Issues marked by donors will be labeled accordingly and handled with special care

@akohlsmith
Copy link
Author

I figured it out, but some documentation on how to do it "right" would be helpful.

export __MEROSS_CREDS=`echo '{"token": "..." ... the whole JSON blob from the `auth login` command}' | base64`

now things like meross_api_cli device list seem to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant