Git Product home page Git Product logo

Comments (9)

TorreJoJo avatar TorreJoJo commented on May 18, 2024 1

One last question if I tried to make http://example.com/setup/bluetooth/scan_results it returns [] even if my phone is connected to Google Home. About 2FA enabled now it works
Thank You

from ghlocalapi.

rithvikvibhu avatar rithvikvibhu commented on May 18, 2024

What do you get with | jq ".home.devices"? How many objects are listed?

If there aren't any, then no devices are registered with this account. Maybe it's a different Google account.

from ghlocalapi.

TorreJoJo avatar TorreJoJo commented on May 18, 2024

If I don't put | jq ".home.devices" I get a list with

{
  "timestamp1": "1607076292371",
  "home": {
    "homeId": "74bad409-86c8-463f-9368-***********",
    "homeName": "Giovanni",
    "location": {

    }

Where homeName it's actually my name of google home. But I don't have local auth token.
If I put | jq ".home.devices" it returns null.

"linkedUsers": [
      {
        "emailAddress": "_myemail_"
      },
      {
        "emailAddress": "_mysecondemail_"
      }
    ],

I had also my email displayed when I don't put | jq ".home.devices" on script command line.
Thanks

from ghlocalapi.

rithvikvibhu avatar rithvikvibhu commented on May 18, 2024

The whole structure is like this:

{
    home: {
        homeId: 'xyz',
        homeName: '<HomeName>',
        location: {},
        linkedUsers: [{}, ...{}],
        devices: [
            {
                deviceName: '<Name>',
                localAuthToken: '<Token>',
                linkedUsers: [{}, ...{}],
            }
        ]
    }
}

Where homeName it's actually my name of google home

What's shown in your first code block is the name of the Home (like a bunch of devices together), not the Device's name. Multiple devices can be assigned to a Home. And if it doesn't list any devices, then the device isn't registered to this home.

Since | jq ".home.devices" is null, it means that there are no devices in this home. You mention using multiple emails. It's possible that the device is in a different Home on the other account.

from ghlocalapi.

TorreJoJo avatar TorreJoJo commented on May 18, 2024

Ok but I did it with my second account because with the first account the file get_tokens.py doesn't work because it gives me null fields on access token and master token. The result is " Could not get access token"

from ghlocalapi.

rithvikvibhu avatar rithvikvibhu commented on May 18, 2024

Do you have 2FA enabled? If so, then create an app password and use that instead.
Make sure the USERNAME variable is just the username, not the complete email address (@gmail.com).
Are the overrides unchanged? (all of them as None are fine).

from ghlocalapi.

rithvikvibhu avatar rithvikvibhu commented on May 18, 2024

/scan_results/ is only populated after scan is called.

from ghlocalapi.

TorreJoJo avatar TorreJoJo commented on May 18, 2024

How to do a POST with curl ?
For example if we want to CURL the command http://example.com/setup/bluetooth/scan how can I pass the input data?

from ghlocalapi.

rithvikvibhu avatar rithvikvibhu commented on May 18, 2024
curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"username":"xyz","password":"xyz"}' \
  http://localhost:3000/api/login

from ghlocalapi.

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.