hardillb / node-red-alexa-home-skill-web

Apache License 2.0
45 stars 28 forks source link

not find my device #98

Closed neodevit closed 4 years ago

neodevit commented 4 years ago

i have an account and i have 2 device : lampadina and led i have deleted the device and add ALARM but when i discovery from alexa i find the first 2 device : lampadina and led and not view my only last one device ALARM

I have this problem 1 years past and contact hardillb via mail resolve a problem but i think have this problem because have a incorrect relation on db from my user : neodev

hardillb commented 4 years ago

Nope, just checked the Database, your username only has 2 devices.

1 called LED and 1 called VALORE.

neodevit commented 4 years ago

if you go in https://alexa-node-red.bm.hardill.me.uk/ login neodev show only one : ALARM if you discovery alexa show 2 VALORE - LED

you show db if you show from website not show this have a relation between USER and DEVICE not correct

hardillb commented 4 years ago

What you are describing just isn't possible.

The device to user relationship is defined by including the username in the device record. So if I search the devices collection for your username I get the following:

> db.devices.find({username: "neodev"})
{ "_id" : ObjectId("5c28ceed0818bb2cb6a1657e"), "applianceId" : 44007, "friendlyName" : "LED", "friendlyDescription" : "lampadina1", "username" : "neodev", "isReachable" : true, "applianceTypes" : [ ], "actions" : [ "turnOn", "turnOff" ], "__v" : 0 }
{ "_id" : ObjectId("5c2a6b5a0818bb2cb6a16771"), "applianceId" : 44269, "friendlyName" : "VALORE", "friendlyDescription" : "valore da 1 a 100", "username" : "neodev", "isReachable" : true, "applianceTypes" : [ "LIGHT" ], "actions" : [ "turnOn", "turnOff", "setPercentage", "incrementPercentage", "decrementPercentage" ], "__v" : 3 }
> 

If you look at the code that renders the devices page for a user on the website it does the exact same query.

When Alexa queries for new devices it hits a slightly different endpoint, here but it does the same query.

The only explanation that is possible is that you have 2 usernames and the one you have linked to your Alexa account is different to the one you are logging into the website with.

You could post a screen shot of your devices page on the website so I can see your username and devices, but as I've said, it's just not possible to get what you have said so far with the neodev user.

hardillb commented 4 years ago

Yes, I've just checked. You have 2 accounts

neodev and neodev@gmail.com

neodevit commented 4 years ago

is possible delete NEODEV account for not have other problem in the feature thanks :)