Giter VIP home page Giter VIP logo

Comments (14)

anthonylavado avatar anthonylavado commented on August 28, 2024 1

@arigit Thanks for the logs. I figured it out!

The Smart Home API in HA is not returning values in all scenarios for the thermostat/climate components. This was recently fixed and merged, but it won’t be available until a future release.

See the commit here: home-assistant/core#15352

Keep any eye on the blog to see when it gets included. Since the release notes always reference the commit number, you can search that when a new post goes up.

Blog (Release Notes): https://www.home-assistant.io/blog/categories/release-notes/

from haaska.

arigit avatar arigit commented on August 28, 2024 1

I could reproduce the same problem with HA's own Cloud integration

home-assistant/core#15580

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@arigit Hey Ari,

While I haven't tested this with a thermostat myself, I do know that the Alexa Voice Service does require a response back in a certain time frame in order to acknowledge the status of the request. It is possible that this is why you are getting the errors about the thermostat not responding.

We haven't really changed the code lately to my knowledge - even the last commit on June 21st was solely to provide a fix when building on non-root on Debian systems. The code itself for the relay has not been modified since February 5th or so. Could you point me to the commit you're looking at?

Regarding what could be happening, there should be logging in Debug as per this line:

logger.debug('request for %s sent without waiting for response',

You'll have to forgive me for details on how to access it, I'm more of a "documentation" maintainer here.

Perhaps @mike-grant can comment?

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

Aha! I see now. If you set your config to Debug, you can get some more details from the function:

"debug": false,

from haaska.

arigit avatar arigit commented on August 28, 2024

Thanks! will test this. Where do I collect the debug logs? a debug file is created as part of the lambda files? (sorry I'm a newbie with lambdas)

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@arigit I'm a newbie too unfortunately - I believe you should get data somewhere in AWS, I just don't remember where.

I also now see the commit you're pointing to. It was June 24th of 2017, technically for the v2 version of Haaska (we should probably clean out that changelog). The code now is completely different from what existed then.

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@arigit I believe this should get you some info:

  • Sign in to the Lambda console
  • Click on the haaska function
  • Change from the Configuration tab to the Monitoring tab
  • Click "View logs in CloudWatch" at the top right

from haaska.

arigit avatar arigit commented on August 28, 2024

Thanks! here's an extract of a sample transaction. I don't see any error.
Also the thermostat gets set to the requested temperature, HA's logs are empty, no issue there.

It's like the skill is expecting something different from what is being sent to it.

[DEBUG] 2018-07-19T21:46:52.64Z 3f28ba61-8b9d-11e8-ace2-b1572c30f59a calling alexa/smart_home with {'directive': {'header': {'namespace': 'Alexa', 'name': 'ReportState', 'payloadVersion': '3', 'messageId': 'a8b1a57f-4321-4289-a59c-9295c7c724f6', 'correlationToken':

[DEBUG] 2018-07-19T21:46:52.65Z 3f28ba61-8b9d-11e8-ace2-b1572c30f59a Starting new HTTPS connection (1): blah.blah:443

2018-07-19T21:46:52.260Z 3f28ba61-8b9d-11e8-ace2-b1572c30f59a https://blah.blah:443 "POST /api/alexa/smart_home HTTP/1.1" 200 1928

END RequestId: 3f28ba61-8b9d-11e8-ace2-b1572c30f59a

[DEBUG] 2018-07-19T21:52:40.636Z 0ee78ee2-8b9e-11e8-accd-4fc1cddd38fa calling alexa/smart_home with {'directive': {'header': {'namespace': 'Alexa', 'name': 'ReportState', 'payloadVersion': '3', 'messageId': '030e7921-a2e1-456f-a00f-780a2ecac05c', 'correlationToken':

[DEBUG] 2018-07-19T21:52:40.637Z 0ee78ee2-8b9e-11e8-accd-4fc1cddd38fa Starting new HTTPS connection (1): blah.blah:443

[DEBUG] 2018-07-19T21:52:40.978Z 0ee78ee2-8b9e-11e8-accd-4fc1cddd38fa https://blah.blah:443 "POST /api/alexa/smart_home HTTP/1.1" 200 1928

[DEBUG] 2018-07-19T21:53:06.677Z 1e715f0e-8b9e-11e8-bba9-6b1efd2a8cdc calling alexa/smart_home with {'directive': {'header': {'namespace': 'Alexa.ThermostatController', 'name': 'SetTargetTemperature', 'payloadVersion': '3', 'messageId': '8512432c-6f39-45db-b0b3-ff83695bd8bd', 'correlationToken':
...
'endpointId': 'climate#thermostat', 'cookie': {}}, 'payload': {'targetSetpoint': {'value': 25.0, 'scale': 'CELSIUS'}}}}

[DEBUG] 2018-07-19T21:53:06.684Z 1e715f0e-8b9e-11e8-bba9-6b1efd2a8cdc Starting new HTTPS connection (1): blah.blah:443

[DEBUG] 2018-07-19T21:53:07.10Z 1e715f0e-8b9e-11e8-bba9-6b1efd2a8cdc https://blah.blah:443 "POST /api/alexa/smart_home HTTP/1.1" 200 1580

from haaska.

arigit avatar arigit commented on August 28, 2024

I'm activating debug logs in the skill to see if anything strange there

from haaska.

arigit avatar arigit commented on August 28, 2024

Debug logs from HA

2018-07-19 18:17:10 DEBUG (MainThread) [homeassistant.components.alexa.smart_home] Received Alexa Smart Home request: {'directive': {'header': {'payloadVersion': '3', 'name': 'SetTargetTemperature', 'correlationToken': 'AAAAAAAAAAAGp......==', 'namespace': 'Alexa.ThermostatController', 'messageId': '7ece5a60-3f0f-4e24-99c7-0fcad8e8c955'}, 'payload': {'targetSetpoint': {'value': 25.0, 'scale': 'CELSIUS'}}, 'endpoint': {'scope': {'type': 'BearerToken', 'token': 'Atza|IwEBIP.....-LwVwz'}, 'endpointId': 'climate#thermostat', 'cookie': {}}}}

2018-07-19 18:17:10 DEBUG (MainThread) [homeassistant.components.alexa.smart_home] Sending Alexa Smart Home response: {'event': {'header': {'payloadVersion': '3', 'name': 'Response', 'correlationToken': 'AAAAAAAAAAAGpY/eKqGi....4cZWgg==', 'namespace': 'Alexa', 'messageId': '6394bf62-1a85-4fb9-b400-35aa4098f0ba'}, 'payload': {}, 'endpoint': {'scope': {'type': 'BearerToken', 'token': 'Atza|IwEBIP...sxq-LwVwz'}, 'endpointId': 'climate#thermostat', 'cookie': {}}}}

2018-07-19 18:17:10 INFO (Thread-2) [homeassistant.components.ecobee] Ecobee data updated successfully

HA looks all good. it receives the command, and it changes de thermostat, and sends a response

Now on the Lambda logs, I don't see any response going back to the Skill at all
These are the cloudwatch events for the same test:

CLOUDWATCH LOGS

(the request arrives from the Echo)

[DEBUG] 2018-07-19T22:17:09.956Z 7aaca408-8ba1-11e8-94eb-2f2df855d16e calling alexa/smart_home with {'directive': {'header': {'namespace': 'Alexa.ThermostatController', 'name': 'SetTargetTemperature', 'payloadVersion': '3', 'messageId': '7ece5a60-3f0f-4e24-99c7-0fcad8e8c955', 'correlationToken': 'AAAAAAAAAAAGpY/eKq...M1SdNgYfSvkfQ9dA4cZWgg=='}, 'endpoint': {'scope': {'type': 'BearerToken', 'token': 'Atza|IwEBIPpyjEpL1o...GCsxq-LwVwz'}, 'endpointId': 'climate#thermostat', 'cookie': {}}, 'payload': {'targetSetpoint': {'value': 25.0, 'scale': 'CELSIUS'}}}}

(coonects and posts to my HA)

[DEBUG] 2018-07-19T22:17:09.957Z 7aaca408-8ba1-11e8-94eb-2f2df855d16e Starting new HTTPS connection (1): blah.blah:443

[DEBUG] 2018-07-19T22:17:10.269Z 7aaca408-8ba1-11e8-94eb-2f2df855d16e https://blah:blah:443 "POST /api/alexa/smart_home HTTP/1.1" 200 1580

END RequestId: 7aaca408-8ba1-11e8-94eb-2f2df855d16e

REPORT RequestId: 7aaca408-8ba1-11e8-94eb-2f2df855d16e Duration: 335.12 ms Billed Duration: 400 ms Memory Size: 128 MB Max Memory Used: 31 MB

And there is nothing else! no response sent back to amazon.

from haaska.

arigit avatar arigit commented on August 28, 2024

@anthonylavado Thanks for following up! I will give this another shot when they release HA 0.74, I see it's in beta. For now it's usable, the control part works, and it's a net-benefit over the older haaska with v2 payloads.

from haaska.

arigit avatar arigit commented on August 28, 2024

well they released 0.74 today :) - just updated, tested, bummer: issue still there :(. Thermostat changes still succeeded from HA's point of view but always ending on an Alexa error condition "I'm not sure what went wrong". Nothing in HA logs, even in debug mode, same as above.

Next test I can think of is to try HA's own cloud integration instead of Haaska and compare results. That will help isolate whether this is a haaska issue or HA issue - will try that late today

from haaska.

anthonylavado avatar anthonylavado commented on August 28, 2024

@arigit Thank you for testing. Let us know.

I’d be curious to see if it happens with my Nest. Up to this point I’ve been using the official skill for it.

What make/model thermostat do you have?

from haaska.

arigit avatar arigit commented on August 28, 2024

This is with an ecobee v3. It never had issues with the old haaska. In the many tests I tried, I created new api keys etc but no change.

from haaska.

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.