Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update via Response node not possible #19

Open
scobby opened this issue Jan 31, 2023 · 0 comments
Open

Update via Response node not possible #19

scobby opened this issue Jan 31, 2023 · 0 comments

Comments

@scobby
Copy link

scobby commented Jan 31, 2023

Hello @coldfire84 ,
i have a question regarding the code, my problem is that i cant update the state of the triggered device.
I have an echo show and that always showing the wrong state of the entity.
I know there is the "State Node" but that way i cant implement this. i have many devices with different functions. With that way i would need endless time to define that for every single device.

My assumption:

Here is my question:
i see in the code (alexa.js starting line 648) that you ignore any state parameter and only send the acknowledge from the msg.

`// Think this is OK for v3 API
function alexaHomeResponse(n) {
RED.nodes.createNode(this, n);

var node = this;

node.on("input", function (msg) {
  if (msg._messageId && msg._endpointId && msg._confId) {
    var conf = RED.nodes.getNode(msg._confId);
    if (typeof msg.acknowledge == "boolean" && msg.acknowledge) {
      conf.acknowledge(msg._messageId, msg._endpointId, true);
    } else {
      conf.acknowledge(msg._messageId, msg._endpointId, false);
    }
  }
});

}`

could you implement a similar logic what is used in the "State Node" for the response node? i would like to set the power status, color, etc. when sending the command to alexa and responding with a "generic" response node.

other possibiliy would be to hand over the device to the "State Node". But i think this would generate more traffic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant