Giter Site home page Giter Site logo

Comments (6)

delian avatar delian commented on July 29, 2024

from node-unifiapi.

seanmavley avatar seanmavley commented on July 29, 2024

My unifi controller is 5.4.15
I'm using Node 7 (I don't know if that matters)
And using the latest of node-unifiapi

This is what I did, by attempting to login each time, however it still brings up the same error: seanmavley/unifi-guest-bundle-check@5f27aa9#diff-bb503f3d9047bcd4a5730559f1e16560R59

I could make it if it see loginrequired to
automatically try to repeat the last login and then to repeat the call?

I don't know if that'll fix it, but if so, that'll be great.

from node-unifiapi.

delian avatar delian commented on July 29, 2024

from node-unifiapi.

seanmavley avatar seanmavley commented on July 29, 2024

Thanks for getting in touch.

  1. Here's my node-unifiapi version:
khophi:UnifiGuest$ npm ls node-unifiapi
[email protected] /home/khophi/Developments/Express/UnifiGuest
└── [email protected] 

The only available versions in npm for node-unifapi is 0.0.45, 0.0.44, 0.0.40, 0.0.39, 0.0.38, 0.0.37, 0.0.36, thus I think I have the latest which is 0.0.45.

  1. This is what is Use to connect:
    https://github.com/seanmavley/unifi-guest-bundle-check/blob/master/routes/index.js#L59-L76

And this my credentials:
https://github.com/seanmavley/unifi-guest-bundle-check/blob/master/routes/index.js#L59-L76

  1. Sorry, when I enable debug, I don't see any log messages anywhere, no error logs in console, except the Error { data: [], meta: { msg: 'api.err.LoginRequired', rc: 'error' } }

When I enable the debug where should I see the logs?

from node-unifiapi.

seanmavley avatar seanmavley commented on July 29, 2024

So it seems to be working. Per each transaction, I logout at the end. Thus, any next transaction needs to reauthenticate. Which seems to be working pretty as expected.

I do not know the down side to doing it that way, but at least it gets it working for now.

from node-unifiapi.

seanmavley avatar seanmavley commented on July 29, 2024

Could you look into this? Explicitly logging out per each transaction doesn't solve the problem in the long run. Still throws the error:

Error { data: [],
  meta: { msg: 'api.err.LoginRequired', rc: 'error' } }

from node-unifiapi.

Related Issues (20)

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.