Code Monkey home page Code Monkey logo

Comments (5)

felix-pilgram avatar felix-pilgram commented on July 17, 2024

Maybe you forgot to call the quickstart() function. See the talk2solmatelocally example:

client.quickstart()

from solmate-sdk.

Diapolo avatar Diapolo commented on July 17, 2024

I also cannot get a connection via LocalSolMateAPIClient, I'm sure it has to do with a missing auth_token which gets saved for the online-version in .conf/solmate-sdk/authstore.json. But I have no idea, how this has to be done for a local connection. Running the sample in the readme in this repo asked for my SolMate password, which is not asked for the local connection...

Doing this seems to work:

client = LocalSolMateAPIClient("SERIALNO")
client.quickstart()
print(client.get_live_values())

But this does NOT:

client = LocalSolMateAPIClient("SERIALNO")
client.uri = "ws://192.168.X.Y:9124/"
client.quickstart()
print(client.get_live_values())

Leads to:

{'id': 1, 'data': {'success': False}}
{'id': 2, 'error': {'type': 'BadRequest', 'message': 'Not authenticated.'}}
{'id': 3, 'error': {'type': 'BadRequest', 'message': 'Not authenticated.'}}

from solmate-sdk.

felix-pilgram avatar felix-pilgram commented on July 17, 2024

Yes, that is an issue. At the moment if you use the SolMateAPIClient or LocalSolMateAPIClient with different uris, this won't work. We will fix this. At the moment the workaround is to delete the .conf/solmate-sdk/authstore.json file if you use another uri as before.

from solmate-sdk.

Diapolo avatar Diapolo commented on July 17, 2024

@felix-pilgram When will the API updated to fix this? It would also be nice to finally deliver changelogs for SolMate software versions btw. 🥇.

from solmate-sdk.

felix-pilgram avatar felix-pilgram commented on July 17, 2024

When will the API updated to fix this?

Version 0.1.6 includes a fix for this issue. Do get it working properly, please delete the .conf/solmate-sdk/authstore.json config file before you use it.

from solmate-sdk.

Related Issues (8)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.