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

Echo does not detect devices if the node ID have a dot. #130

Open
atika opened this issue Mar 9, 2023 · 2 comments
Open

Echo does not detect devices if the node ID have a dot. #130

atika opened this issue Mar 9, 2023 · 2 comments

Comments

@atika
Copy link

atika commented Mar 9, 2023

1. Unique device ID is generated with a dot for some devices and Echo does not detect them:

AlexaHomeNode.prototype.generateUniqueId = function(uuid) {
let i = 9;
const base = "00:11:22:33:44:55:66:77-88";
const nodeid = uuid.split("");
const uniqueid = base.replace(
/\d/g,
() => nodeid.shift() || Math.max(--i, 0),
"g"
);
return uniqueid;
};

The . should be deleted from the node ID.

   const nodeid = uuid.replace('.', '').split("");

Or filter to be sure to only have hexadecimals characters.

PS: Should be great to add a field to set this node ID to not loose all the routines on new installation.

2. Add 3 curly braces so mustache does not encode the URL:

<URLBase>{{baseUrl}}</URLBase>

    <URLBase>{{{baseUrl}}}</URLBase>
    <device>
        <deviceType>urn:schemas-upnp-org:device:Basic:1</deviceType>
        <friendlyName>Amazon-Echo-NodeRed-Bridge {{{baseUrl}}}</friendlyName>

3. The bridge ID is not the same

In alexa-hub.js it ends with a 0 who is shown when scanning SSDP devices.

const hueuuid = node.controller.formatHueBridgeUUID(node.id);

In the setup XML displayed it ends with the controller ID.

uuid: node.formatHueBridgeUUID(node.id),

But I don't know If this could be an issue. As we can only have one on port 80, In alexa-hub.js I replaced node.id with node.controller.id

@mabunixda
Copy link
Owner

Thanks for you input - can you create a pull request for your changes that everybody is able to use these?

@mabunixda
Copy link
Owner

The nodeId is stored in a configuration file on disk, so this should not be lost anyway

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

2 participants