During the last days I tried to connect my pimatic with some Amazon Alexa devices, an Echo Dot 2, a Fire Tab 7 with Alexa app (latest firmware update 5.6.0.0 with Alexa) and a normal smartphone with Alexa app.
It does not work as expected and I have some problems.
@michbeck100: You have written some posts above that a reusing of port 80 is possible for the echo plugin version > 0.4.7 even if pimatic is using port 80. Did I understood this right? So the problem to set different ports is no longer existing? This is very convenient for me because I have some connected display and sensor devices with ESP8266 and these devices need IP and port of the pimatic server to query or send the data. It is much work with the Arduino IDE to reprogramm them all.
For the now described tests I used echo plugin 0.4.8 with port 80 and pimatic server with port 80. So if this is not working even with echo plugin 0.4.8 please tell me and stop reading this post here.
I used all Alexa devices with one Amazon account. So all detected smart home devices can be used by all these 3 Alexa devices.
Fire Tab with Alexa app: longer pressing of home button, Alexa light at the bottom of the screen is switched on and I can speak to Alexa: “Schalter eins ein” or “Schalter eins aus”.
Echo Dot 2: “Alexa” - light comes - “Schalter eins ein” or “Schalter eins aus”.
Normal smartphone with Alexa app: no speaking - the smart home screen of the Alexa app shows the device and I can tap on the device. Now smartphone display is showing a lamp symbol and the text “Licht ist aus” and below “Helligkeit auf 0%”. Below these texts there is a slider to change the light intensity and I can slide it from left (0%) to right (100%). When I take up my finger this is sent to the controlled device i.e. to pimatic server.
On pimatic server I have defined a dummy switch
"settings": {
"locale": "de",
"debug": false,
"logLevel": "debug",
"httpServer": {
"enabled": true,
"port": 80
},
...
...
"plugins": [
{
"plugin": "echo",
"debug": true,
"active": true,
"port": 80
},
...
...
{
"id": "schalter1",
"name": "Schalter 1",
"class": "DummySwitch",
"echo": {
"additionalNames": [],
"active": true,
"name": "Schalter 1"
}
},
Speaking to Alexa on Echo Dot 2 and on Fire Tab brings an entry as the following into the pimatic log.
16:46:28.347 [pimatic-echo] debug: changing state for Schalter 1: {
16:46:28.347 [pimatic-echo] debug:> "{\"on\": false}": ""
16:46:28.347 [pimatic-echo] debug:>}
When changing brightness with the slider of the Alexa app on my smartphone the following is store in the log file.
19:23:38.655 [pimatic-echo] debug: changing state for Schalter 1: {
19:23:38.655 [pimatic-echo] debug:> "{\"on\": true,\"bri\":255}": ""
19:23:38.655 [pimatic-echo] debug:>}
Interesting is that the slider on the smartphone display jumps back to 0% after some seconds. I guess that an acknoledgement is missing.
And every 10 seconds the log is filled with these lines produced by the echo plugin.
19:23:46.890 [pimatic-echo] debug: << server got: M-SEARCH * HTTP/1.1
19:23:46.890 [pimatic-echo] debug:>Host: 239.255.255.250:1900
19:23:46.890 [pimatic-echo] debug:>Man: "ssdp:discover"
19:23:46.890 [pimatic-echo] debug:>ST: ssdp:all
19:23:46.890 [pimatic-echo] debug:>MX: 5
19:23:46.890 [pimatic-echo] debug:>
19:23:46.890 [pimatic-echo] debug:> from 192.168.99.99:56638
19:23:46.898 [pimatic-echo] debug: complete sending all responses.
IP 239.255.255.250 is not in my LAN and 192.168.99.99 is not the pimatc server in my LAN.
If I look to the pimatic web interface and display the variable connected to the state of the dummy switch “$schalter1.state” it stays always on false. And of course the display of the dummy switch on the screen does not change. Only the communication to the pimatic server is logged.
Up to this point I have come. Please help me to get it working.