michbeck100/pimatic-echo

Cant add more devices from tradfri

Closed this issue · 33 comments

Hey,

I added 2 new tradfi groups and set dem to active for echo. Then i rebooted pimatic and let alexa search for it but alexa do not find them. I also tied over "search devices" im pimatic and a alexa search. My other tradfi groups will be fund and workfine.

I use lastest version of pimatic, echo etc. Alexa found 26 devices only the two new ones are missing. Any ideas? 🤔

What if you remove 2 old devices from your config and search again? Maybe there’s a new limit that we don’t know of.

Hey i disabled a old one for Alexa and reboot pimatic but still "no new devices". Now one of my devices with the same old name is now the new device but the switching over the Alexa works not well. The Alexa app says everytime "this device do not support the value"

If you look at alexa.amazon.com, what types do your devices have? Do you have Royal Philips...?

Jop after i updated to the new echo plugin version there are Royal Phillips... I think it is a limit because the Alexa app say 25 device on the Alexa website i got 29 but there are also the echo dots etc listed

Please ask on the pimatic forum, if other people also see this limitation. As I don’t have so many devices I can’t tell.

Mhh okay. You can just create dummy switches and set them up for alexa for testing bytheway i also use 5 dummys to let alexa override my automatic rules.

Could you post the part of your config.json containing one of these devices that aren’t found?

Sure... I tested it with and without additional name... After i disabled my milight device "Schrankwand" and seached again i can control this device but it name in alexa wars still "schrankwand".

{
"class": "TradfriGroup",
"name": "Schlafzimmer",
"id": "tradfri_131084",
"address": 131084,
"echo": {
"additionalNames": [
"Schlafzimmer Deckenlampe"
],
"active": true
}

You could try to remove all devices from Alexa, then delete the echo-database directory from your pimatic directory and then restart pimatic. After that try to discover your devices again. This will create a new user for your echo devices to connect to pimatic.

I will test it tomorrow.

Hey ...
Sorry the delay i will do now the Test... i found bytheway a Error .. this happens randomly just by scrolling around in Pimatic. After the Error will be shown over the little overlay Messages on the Bottom the Tab "Messages" says "6" Errors but is complet Empty. So you have to look in the Logfile to found it.

20:55:37.084 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.084 [pimatic] error:> at Function.from (native)
20:55:37.084 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.084 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.084 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.084 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.084 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.084 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.089 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
20:55:37.096 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.096 [pimatic] error:> at Function.from (native)
20:55:37.096 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.096 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.096 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.096 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.096 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.096 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.099 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
20:55:37.104 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.104 [pimatic] error:> at Function.from (native)
20:55:37.104 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.104 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.104 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.104 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.104 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.104 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.106 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
20:55:37.112 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.112 [pimatic] error:> at Function.from (native)
20:55:37.112 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.112 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.112 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.112 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.112 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.112 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.114 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
20:55:37.120 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.120 [pimatic] error:> at Function.from (native)
20:55:37.120 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.120 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.120 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.120 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.120 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.120 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.122 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!
20:55:37.127 [pimatic] error: An uncaught exception occurred: TypeError: this is not a typed array.
20:55:37.127 [pimatic] error:> at Function.from (native)
20:55:37.127 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)
20:55:37.127 [pimatic] error:> at Socket. (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:22:14)
20:55:37.127 [pimatic] error:> at emitTwo (events.js:87:13)
20:55:37.127 [pimatic] error:> at Socket.emit (events.js:172:7)
20:55:37.127 [pimatic] error:> at UDP.onMessage (dgram.js:480:8)
20:55:37.127 [pimatic] error:> This is most probably a bug in pimatic or in a module, please report it!
20:55:37.130 [pimatic] warn: Keeping pimatic alive, but could be in an undefined state, please restart pimatic as soon as possible!

I deleted all devices from alexa.amazon.com, deleted the "echo-Database" folder and start over "Devices" -> "Device Discovery" (and over the echo) the Search .. this Errormessages (see above) popup agian. Alexa found 26 Devices again.

A second thing that it new Alexa seems now to have Problems with "Ä", "Ü" etc .. because now my Devices look like this "Trigger Alexa Force KÃ�¼che" in the Alexa App and Website .. before the Update it wars like it should be "Trigger Alexa Force Küche".

i will rename everything with "Ä", "Ü" (etc) and try it agian .. maybe thats the Problem

Its the same 26 devices and the Error popup. And the Devices have still "K�¼che" where is this saved? I renamed it, Rebooted Pimatic and deleted "echo-Database" so its should not happen, right?

Please try to delete a single device from alexa.amazon.com. I’ve seen that deleting all devices at once didn’t work. They seemed to be cached. the umlauts are a different problem which I couldn’t look into, yet.

i will try it .. any idear about the Errormessages that i get Random and by every Devices Discovery?

i deleted one of my Devices over Alexa.amazon.com .. and search again ... 0 new devices found, i started the Devices Discovery over Pimatic and Sreach again ... 0 new devices found. I restart Pimatic and searched over alexa.amazon.com .. 0 new Devices found ... i started the Device Discovery get the Errormessages (see above) ... 0 new Devices found.. now the Devices is gone competly =(

Since the current release is already out for quite some time, there must be something changed on your echos. Probably Amazon rolled out a new firmware which works different than before. I have to test myself, but i can’t guarantee that I will find the time soon.
It would definitely help if you could investigate further, maybe with the help of the community in the forum.

I installed the update for the echo plugin just the day i opened the issue before i dont have for example the errors by the device discovery

Damn you have not tagged since version 4.11 otherwise i just downgraded ... but i have a complet Image of my Raspberry from 20.10 maybe i rollit back and check it again.

I extract Pimaitc-echo (5.3) from my Backup Image... and everthing works fine .. i got now 32 Devices after the Search (inlc the 2 new devices) .. no Errors in the Log, also the Devices that i renamed are now add with the new Names. So i dont know what the other Users have tested but it seems something is broken in 5.4. I have still my old echos that i used since i use this plugin .. so Gen1? I dont now the frist ones that amazon sells in Germany.

I just have the 2nd and 3rd generation. I’ll check the changes to 0.5.4, maybe there was something crucial removed.

That said, it could be that you have to stick to 0.5.3, as the 1st generation echos might not have been updated by Amazon. Since the current version was released one month ago and did solve the issues at that time, I don’t think there’s something wrong with it.

Hey i checked my boxes of the alexa devices i got 3 echo dots - gen 2 and one of the alexa echos (the big speaker thing)... But kli know one of the dots is from time where you get s invate mail from Amazon so maybe there only gen2 in Germany?

Could be. I also have a 2nd gen echo dot, which is working perfectly fine. BTW: I also had the issues that led to the changes from 0.5.4 from one day to the other. As I don't see the problems, that you have, on my devices, it's hard to tell, what the problem is. I'll try to review the changes, but I can't promise that I'll find something

Needs the Plugin any connection to the Internet? Because i use Pihole and block some Domains inlc all this some of the Amazon AWS, Amazon Tracking etc Domains. But the Alexas work fine and all the Suff thats "new" works every time by me.

I dont think Pihole is the Problem because i got also this Error Messages in the Log .. i checked also your Code at "20:55:37.084 [pimatic] error:> at UpnpServer._getDiscoveryResponses (/home/pi/pimatic-app/node_modules/pimatic-echo/lib/upnp.coffee:54:29)" but im have only some little Skills in PHP and Powershell so i dont understand everything .. but i think the follow happend if i understand this Part you create some kind of Device for the "UPNP"-Connection and this fails by my installation.

Also i think hes grabing the devices of somekind of cache from Amazon because as switched to the 5.3 all look good .. i got my devices as Dimmable Light but 2-3 Seks later also the Devices as "Royal..." pops up (exlude the 2 new ones :) ) ... i had to delete all devices again and then i had all and only the 5.3 devices. And also that i cant find a Device after i delete just one from Alexa would be support this theroy.

if you need something just tell me (SSH Access, complet Pimatic Config etc). You dont have to stress yourself at moment all works fine with 5.3 for me but i also want to help to find som bugs etc.

PS: The 5.3 has not created a folder "Echo-Database" and in the 5.4 Folder is only a "EchoUsers" with one line is this normal?

But the Alexas work fine and all the Suff thats "new" works every time by me.

@tehmilcho A lot of the new stuff runs just inside the cloud, and doesn't need a firmware update.

Just make sure that you don't block any firmware updates for your echo. These are the current versions: https://www.amazon.de/gp/help/customer/display.html?nodeId=201602210

PS: The 5.3 has not created a folder "Echo-Database" and in the 5.4 Folder is only a "EchoUsers" with one line is this normal?

This file contains the hash code for the api "users" that are registered during device discovery. If the directory isn't created then your echo shouldn't be able to connect. This is a little security feature of the communication between echo and the original Philips Hue hub.

Hey
i think the Version infos on this Amazon Site are old because my versions are newer.

Echo Dot(all): 647591020
Alexa Echo: 647588720

When i ask Alexa to search for Updates she says "up to date". And "Softwareupdates.amazon.com" is not blocked.

PS i also Disabled Pihole and Rebooted my Echo Dot and let it search again .. its the same "Up to date"

Hey,
I moved now from a Raspberry to a LattePanda and installed pimatic new with the old config and the plugin in version 5.4 works fine. So i close this. Thx for your help

MMore commented

@michbeck100 Actually I have the same issue. Also with those random error messages. That happened after installing the last updates and cleaning up some devices on my pimatic. So I wanted to setup devices from Scratch in Alexa, but now I can't. :( Any ideas in the meantime?

Please create a new issue describing the problem and please include your setup (node version, config of the echo plugin etc.)

@MMore hey mabye you try also a reinstall of pimatic but with your old-pimatic config.. Its a littlebit work but you not loss anything.

Thats worked for me but i have still a strange behavior that alexa found every devices as "dimmable light" and as "philips hue light". But it seems to work anyway i had only onetime that alexa sad she cant switch because the devices have the same Name.

Device names must be unique obviously. The different device types might be because of multiple echoes. I have old echo dot, a new one and a normal echo. With this setup I don’t have any duplicates.