Coder Social home page Coder Social logo

Comments (8)

tonijj avatar tonijj commented on May 29, 2024 1

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 29, 2024

That log suggests that homebridge-homeconnect has not been configured in the config.json file.

It looks like you are probably using homebridge-config-ui-x. Did you specify a Client ID in its configuration for this plugin?

If you are sure that the config.json file is correct then please provide a log with debug enabled (using -D on the homebridge command line). You can email me a copy of your configuration file if you would like me to check it.

from homebridge-homeconnect.

tonijj avatar tonijj commented on May 29, 2024

homebridge.log
Hi,

Thanks for the quick response! Yes I used config ui.

I did specify the ID, correct, see screenshots.
homeconnectclientid
Log in debug mode attached as well

Its configured, see attached file.
config in homebridge.txt

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 29, 2024

I notice in the log file that it includes:

[2020-5-29 13:08:30] [HomeConnect] Initializing HomeConnect platform...
[2020-5-29 13:08:30] [HomeConnect] new HomeConnectPlatform
[2020-5-29 13:08:30] [HomeConnect] No saved authorisation data found
[2020-5-29 13:08:30] [HomeConnect] Platform HomeConnect config.json is missing 'clientid' property

This shows that for that start-up of homebridge the plugin had been added to the platforms section of the config.json file but that the Client ID had not been set.

None of the other starts of homebridge include the Initializing HomeConnect platform... log entry which means that this plugin was not listed in the platforms section of the config.json file. None of the code in this plugin was called.

The excerpt from the config.json file that you provided is insufficient for me to check whether the platform is being configured to load. However, that file is almost certainly the cause of your problems.

Are you editing the config.json file manually, or are you using homebridge-config-ui-x to edit it? If you are doing it manually, please try using the GUI editor instead.

from homebridge-homeconnect.

tonijj avatar tonijj commented on May 29, 2024

Hi

Apologies, attaching the full config.json now, just removed my credentials for some of the plugins.

But, just so I understand, isnt HomeConnect considered a platform? Cause I copied and pasted the default config and just change to my credentials (API key).

Im editing via the GUI editor in the config.ui-x, correct. But im always validating using jsonhint editor online before deploying. But... of course, that only checks that its a valid json in terms of format..hmm.

Ps. Thanks a bunch again for the support, would really like to get your work up and running!

config.log

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 29, 2024

@tonijj, the error is obvious in your config.json file. You have embeded the HomeConnect platform configuration inside inputs list for the yamaha-avr platform's configuration.

Adding the missing comma on the "doorcode" line, and tidying up the whitespace makes this pretty obvious:

{
    "accessories": [],
    "bridge": {
        "username": "CD:22:3D:E3:CE:61",
        "name": "Homebridge",
        "pin": "031-45-518",
        "port": 51826
    },
    "platforms": [
        {
            "platform": "verisure",
            ...
        },
        {
            "platform": "SamsungTizen",
            ...
        },
        {
            "platform": "SensiboSky",
            ...
        },
        {
            "platform": "yamaha-avr",
            "name": "Yamaha",
            "ip": "192.168.1.199",
            "inputs": [
                {
                    "id": "AV4",
                    "name": "TV"
                },
                {
                    "platform": "config",
                    "name": "Config",
                    "port": 8080,
                    "sudo": true
                },
                {
                    "platform": "HomeConnect",
                    "clientid": "44E5E3E3A9C502B99566DA5A5EFB6103E927A5082236E21A6400FF78E263B88D"
                },
                {
                    "platform": "config",
                    "name": "Config",
                    "port": 8080,
                    "sudo": true
                }
            ]
        }
    ]
}

When I refer to the GUI editor in homebridge-config-ui-x, I mean going to the Plugins page, and then clicking on the SETTINGS button for the Home Connect plugin. I do not mean using the Config page which just provides a text editor. I do not see how the GUI editor could have screwed up the configuration in this way.

from homebridge-homeconnect.

tonijj avatar tonijj commented on May 29, 2024

Ha, you are so right, I see my mistake now!

Now I get an URL, and then this error message when clicking the link.

[HomeConnect] Home Connect request #14: POST https://api.home-connect.com/security/oauth/tok

Error msg: HTTP method not allowed, supported methods: POST

from homebridge-homeconnect.

thoukydides avatar thoukydides commented on May 29, 2024

Just to be clear, you saw something like this in the log:

[5/29/2020, 18:12:13] [HomeConnect] Home Connect request #1: POST https://api.home-connect.com/security/oauth/device_authorization
[5/29/2020, 18:12:13] [HomeConnect] Home Connect request #1: OK +454ms
[5/29/2020, 18:12:13] [HomeConnect] Home Connect authorisation required. Please visit:
[5/29/2020, 18:12:13] [HomeConnect]     https://verify.home-connect.com?user_code=XXXX-XXXX

You then opened that https://verify.home-connect.com?user_code=XXXX-XXXX link in a web browser, signed in with your Home Connect account details, and clicked Approve.

Meanwhile the log will have continued repeating lines like:

[5/29/2020, 18:12:18] [HomeConnect] Home Connect request #2: POST https://api.home-connect.com/security/oauth/token
[5/29/2020, 18:12:19] [HomeConnect] Home Connect request #2: Authorisation pending +1266ms
[5/29/2020, 18:12:24] [HomeConnect] Home Connect request #3: POST https://api.home-connect.com/security/oauth/token
[5/29/2020, 18:12:26] [HomeConnect] Home Connect request #3: Authorisation pending +1328ms

as the plugin waited for you to complete the authentication.

Is that correct?

Was the Error msg: HTTP method not allowed, supported methods: POST message in the homebridge log? If so, what else was around it?

from homebridge-homeconnect.

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.