[37_echodevice] Amazon Echo Modul (nicht Alexa)

Begonnen von michael.winkler, 12 Januar 2018, 18:20:12

Vorheriges Thema - Nächstes Thema

Shadow3561

Wlan? Also mit der WLAN IP verbinden 192.168.178.69

Edit:
Hat der PI eine Verbindung zum internet? Wenn ja, über welches interface?

jove01

ZitatWenn ja, über welches interface?
Wie testen
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

Shadow3561


jove01



PING www.google.com(fra24s12-in-x04.1e100.net (2a00:1450:4001:831::2004)) 56 dat                                                                                                             a bytes
64 bytes from fra24s12-in-x04.1e100.net (2a00:1450:4001:831::2004): icmp_seq=1 t                                                                                                             tl=119 time=15.3 ms
64 bytes from fra24s12-in-x04.1e100.net (2a00:1450:4001:831::2004): icmp_seq=2 t                                                                                                             tl=119 time=15.5 ms
64 bytes from fra24s12-in-x04.1e100.net (2a00:1450:4001:831::2004): icmp_seq=3 t                                                                                                             tl=119 time=18.2 ms

--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 15.286/16.341/18.222/1.333 ms
pi@raspberrypi-3-usb:~ $
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

Shadow3561

kannst du jetzt mal ein NPM-Login versuchen?

jove01

#5360
Die Prox IP löschen oder auf 69 setzen?
Dann Cache lehren und neue NPM-Install?
Nur Login ergibt wieder den Fehler Proxy-Port

192.168.178.69:2003 erzeugt
http://192.168.178.107:3002/www.amazon.com/ap/signin?showRmrMe=1&openid.return_to=https%3A%2F%2Falexa.amazon.com%2F&openid.identity=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.assoc_handle=amzn_dp_project_dee&openid.mode=checkid_setup&openid.claimed_id=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0%2Fidentifier_select&openid.ns=http%3A%2F%2Fspecs.openid.net%2Fauth%2F2.0&
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

Shadow3561

die attr ip und den port löschen

den Port dann auch im terminal schliessen bevor du einen erneuten npm-login versuchst

sudo netstat -tulpen | grep -v '127.0.0.1'  | grep -v '::1:'
dann kill (PID_NR)

zur Sicherheit zeig mal ein list vom device

jove01

#5362
Sorry, ich hatte gerade ein wichtiges Telefonat

Internals:
   DEF        xxx@xxx.xx xxx
   FUUID      633e07fb-f33f-67f1-777a-c58af12abfe380a7
   FVERSION   37_echodevice.pm:v5.0.0-s25459/2022-01-12
   LOGINMODE  NPM
   NAME       Amazon_Account
   NR         229
   NTFY_ORDER 50-Amazon_Account
   STATE      INITIALIZED
   TYPE       echodevice
   eventCount 3875
   model      ACCOUNT
   OLDREADINGS:
   READINGS:
     2022-10-06 19:10:57   COOKIE_MODE     NPM
     2022-10-06 19:11:29   COOKIE_TYPE     NEW
     2022-10-06 20:18:59   amazon_refreshtoken wait for refreshtoken
     2022-10-06 19:11:29   autocreate_devices stop
     2022-10-06 19:11:29   version         0.2.15
   helper:
     RUNLOGIN   0
     SERVER     layla.amazon.de
     TWOFA     
Attributes:
   icon       echo
   room       Amazon


Port schließen und Login mach dann sofort

Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       User       Inode      PID/Program name
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      0          13584      552/sshd: /usr/sbin
tcp        0      0 0.0.0.0:15000           0.0.0.0:*               LISTEN      0          11179      579/./solarview-fb
tcp        0      0 0.0.0.0:139             0.0.0.0:*               LISTEN      0          17463      1084/smbd
tcp        0      0 192.168.178.69:3002     0.0.0.0:*               LISTEN      999        17998      1667/node
tcp        0      0 0.0.0.0:445             0.0.0.0:*               LISTEN      0          17462      1084/smbd
tcp        0      0 0.0.0.0:22422           0.0.0.0:*               LISTEN      0          11181      579/./solarview-fb
tcp        0      0 0.0.0.0:8085            0.0.0.0:*               LISTEN      999        13604      583/perl
tcp        0      0 0.0.0.0:8084            0.0.0.0:*               LISTEN      999        13603      583/perl
tcp        0      0 0.0.0.0:8083            0.0.0.0:*               LISTEN      999        13602      583/perl
tcp6       0      0 :::88                   :::*                    LISTEN      0          14633      582/./busybox
tcp6       0      0 :::22                   :::*                    LISTEN      0          13586      552/sshd: /usr/sbin
tcp6       0      0 :::139                  :::*                    LISTEN      0          17461      1084/smbd
tcp6       0      0 :::445                  :::*                    LISTEN      0          17460      1084/smbd
udp        0      0 0.0.0.0:631             0.0.0.0:*                           0          14837      661/cups-browsed
udp        0      0 192.168.178.255:137     0.0.0.0:*                           0          15294      527/nmbd
udp        0      0 192.168.178.69:137      0.0.0.0:*                           0          15293      527/nmbd
udp        0      0 0.0.0.0:137             0.0.0.0:*                           0          14621      527/nmbd
udp        0      0 192.168.178.255:138     0.0.0.0:*                           0          15296      527/nmbd
udp        0      0 192.168.178.69:138      0.0.0.0:*                           0          15295      527/nmbd
udp        0      0 0.0.0.0:138             0.0.0.0:*                           0          14622      527/nmbd
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           108        11010      389/avahi-daemon: r
udp        0      0 0.0.0.0:58128           0.0.0.0:*                           108        11012      389/avahi-daemon: r
udp        0      0 0.0.0.0:68              0.0.0.0:*                           0          11782      484/dhcpcd
udp6       0      0 :::5353                 :::*                                108        11011      389/avahi-daemon: r
udp6       0      0 :::59211                :::*                                108        11013      389/avahi-daemon: r
udp6       0      0 :::546                  :::*                                0          11818      484/dhcpcd
pi@raspberrypi-3-usb:~ $ kill (PID_NR)


Aber damit habe ich Probleme
Zitatkill (PID_NR)
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

rabehd

Zitat von: jove01 am 06 Oktober 2022, 16:55:43
Hallo rabehd

vielen Dank, bin ich zu ungeduldig: Was verstehst du unter "irgendwann".

Also bisher kein Erfolg bei mir.
Ich habe zufällig nach 4 Stunden den Anmeldedialog gesehen.
Auch funktionierende Lösungen kann man hinterfragen.

jove01

Dank Shadow3561 habe ich jetzt die Anmeldung hinbekommen. Tausend Dank für deine Geduld für einen Nichtwissenden :)
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

Shadow3561

Super, dass es geklappt hat.
Viel Spaß dann beim experimentieren mit dem Modul und Alexa.

jove01

Zitat von: Shadow3561 am 07 Oktober 2022, 05:37:08
Super, dass es geklappt hat.
Viel Spaß dann beim experimentieren mit dem Modul und Alexa.

nochmals vielen Dank für deine Geduld

Jürgen
Aktuelles FHEM auf Raspi 3 und dbLog
CUL 433
HMLan Rolladensteuerung

bart0190

Hallo,
Ich habe anscheinend ein ähnliches Problem wie
https://forum.fhem.de/index.php/topic,82631.msg1237671.html#msg1237671
Nur, dass die Echo Devices bei mir funktionieren, auch mit den Login-Fehlern.

Ich habe das Echo Modul schon seit längerem laufen, jedoch kommt nun immer der Login-error, den ich schon mal hatte (ich meine vor einem Jahr) und ich dann lösen konnte. Jetzt krieg ich es einfach nicht mehr hin. Meine Echo-Devices sind verbunden und funktionieren, jedoch scheinen diese Login-Fehler mein System immer wieder zu freezen und das Logfile wird natürlich auch zugemüllt.
Ich habe bewusst noch die Version von damals (0.2.11), mit der es eigentlich bisher klappte.
Ich habe schon lange gesucht im Forum, finde aber die Lösung nicht. Ich schließe nicht aus, dass es was Offensichtliches ist, was ich nicht sehe.  :o Bin für jede Idee dankbar.


Alexa_AmazonAccount:

Internals
DEF xxx@xxx.xx xxx

FUUID ########################
LOGINMODE NPM
NAME Alexa_AmazonAccount
NR 525
NTFY_ORDER 50-Alexa_AmazonAccount
STATE connected but loginerror
TYPE echodevice
model ACCOUNT



Modul Infos:

Beschreibung    Bereich    Wert
STATE    Reading connected but loginerror
Version    Reading 0.2.11
NPM Cookie Version    Reading 3.4.1
COOKIE_STATE    Reading OK
COOKIE_TYPE    Reading READING_NPM
COOKIE_MODE    Reading NPM
amazon_refreshtoken    Reading vorhanden
icon    Attribut echo
room    Attribut Amazon

Amazon Cookie:

Beschreibung    Bereich    Wert
.COOKIE    Reading {"loginCookie":"frc=....
COOKIE_STATE    Reading OK
COOKIE_TYPE    Reading READING_NPM
amazon_refreshtoken    Reading vorhanden
.COOKIE    Helper session-id=4....
.COMMSID    Helper ....
.CSRF    Helper 4....
.DIRECTID    Helper ....
RUNLOGIN    Helper 0
RUNNING_REQUEST Helper 0
LOGINERROR    Helper 3


Readings:
Readings
BrowserLanguage de,en-US;q=0.7,en;q=0.3 09.10.2022 10:00
BrowserUserAgent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:62.0) Gecko/20100101 Firefox/62.0 09.10.2022 10:00
COOKIE_MODE NPM 17.09.2022 11:18
COOKIE_STATE OK 29.06.2022 01:15
COOKIE_TYPE READING_NPM 17.09.2022 11:35
alarm_count 0 29.06.2022 01:15
amazon_refreshtoken vorhanden 29.06.2022 01:16
autocreate_devices stop 17.09.2022 11:35
config_address_between - 29.06.2022 01:15
config_address_from 29.06.2022 01:15
config_address_to - 29.06.2022 01:15
list_SHOPPING_ITEM 29.06.2022 01:16
list_TASK 29.06.2022 01:16
musicalarm_count 0 29.06.2022 01:15
reminder_count 0 29.06.2022 01:15
state connected but loginerror 09.10.2022 10:17
timer_count 0 29.06.2022 01:15
timer_id - 29.06.2022 01:15
timer_remainingtime 0 29.06.2022 01:15
version 0.2.11 17.09.2022 11:35


Diese Loggings habe ich, wenn die Echo-Devices ausgesteckt sind.

Logfile:

2022.10.09 10:00:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:00:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 2
2022.10.09 10:01:25 3: CUL_HM set Vorraum_Statusanzeige statusRequest noArg
2022.10.09 10:01:28 1: [Freezemon] myFreezemon: possible freeze starting at 10:01:26, delay is 2.481 possibly caused by: tmr-HMLAN_KeepAlive(HM_LAN) tmr-CUL_HM_procQs(N/A)
2022.10.09 10:01:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:01:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 3
2022.10.09 10:02:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:02:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 4
2022.10.09 10:03:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:03:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 5
2022.10.09 10:04:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:04:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / Generate new COOKIE! / set loginerror to 0
2022.10.09 10:04:48 3: [Alexa_AmazonAccount] [echodevice_setState] to disconnected
2022.10.09 10:05:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 1
2022.10.09 10:05:48 3: [Alexa_AmazonAccount] [echodevice_setState] to connected but loginerror
2022.10.09 10:06:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:06:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 2
2022.10.09 10:07:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:07:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 3
2022.10.09 10:08:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:08:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 4
2022.10.09 10:09:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:09:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 5
2022.10.09 10:10:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:10:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / Generate new COOKIE! / set loginerror to 0
2022.10.09 10:10:48 3: [Alexa_AmazonAccount] [echodevice_setState] to disconnected
2022.10.09 10:11:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 1
2022.10.09 10:11:48 3: [Alexa_AmazonAccount] [echodevice_setState] to connected but loginerror
2022.10.09 10:12:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:12:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 2
2022.10.09 10:13:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:13:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 3
2022.10.09 10:14:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:14:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 4
2022.10.09 10:15:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:15:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 5
2022.10.09 10:16:35 3: CUL_HM set Vorraum_Status_Led_05 led green
2022.10.09 10:16:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:16:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / Generate new COOKIE! / set loginerror to 0
2022.10.09 10:16:48 3: [Alexa_AmazonAccount] [echodevice_setState] to disconnected
2022.10.09 10:17:49 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 1
2022.10.09 10:17:49 3: [Alexa_AmazonAccount] [echodevice_setState] to connected but loginerror
2022.10.09 10:18:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:18:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 2
2022.10.09 10:19:37 3: CUL_HM set Stecker_Switch statusRequest noArg
2022.10.09 10:19:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:19:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 3
2022.10.09 10:20:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:20:48 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 4
2022.10.09 10:21:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:21:49 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 5
2022.10.09 10:22:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:22:49 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / Generate new COOKIE! / set loginerror to 0
2022.10.09 10:22:49 3: [Alexa_AmazonAccount] [echodevice_setState] to disconnected
2022.10.09 10:23:49 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 1
2022.10.09 10:23:49 3: [Alexa_AmazonAccount] [echodevice_setState] to connected but loginerror
2022.10.09 10:24:48 3: [Alexa_AmazonAccount] [echodevice_LoginStart] connected but loginerror
2022.10.09 10:24:49 3: [Alexa_AmazonAccount] [echodevice_LostConnect] JSON error = no content / set loginerror to 2


lg
Bart
Raspberry Pi 4 - FHEM, Homematic HM-CFG-LAN, ESP32 mit ePaper Display, Raspberry Pi 3 - BT Lokalisierung, PC - Squeezebox Server, Raspberry Pi 2 +HifiBerry - SB Player1, Raspberry Pi 2 +AVReceiver - SB Player2, nVidia Shield TV +AVReceiver - SB Player3, 2x Logitech Harmony Hub, echo dot Gen3

MadMax-FHEM

D.h. du bist weder mit dem Modul noch mit dem npm-Login aktuell?
(das ist wie der Name anzeigt npm/nodejs, muss also extra geupdated werden)

Eventuell mal beides einem Update unterziehen (vorher halt Backup) evtl. hilft das, es hat sich seitens Amazon ja immer wieder mal was geändert...

Hast du eine spezielle Einstellung für das Login-Interval?

Zitat
FUUID      ########################
ist im Übrigen kompletter Schwachsinn. Das ist eine UIID für das Device in GENAU DEINEM fhem, um auch nach z.B. Umbenennen etc. das Device Eindeutig identifizieren zu können...
Damit kann NIEMAND ausser deinem fhem etwas anfangen...

Und ob die Echos ein- oder ausgesteckt sind ist irrelevant.
Sie sind dann Amazon-seitig halt offline. Aber dein Account und die Webseite/App ist ja noch "online" und dort werden ja die Echo-Geräte "verwaltet". Das echodevice-Modul/Device loggt sich ja bei Amazon ein und nicht bei jedem einzelnen Echo-Gerät... ;)

Gruß, Joachim
FHEM PI3B+ Bullseye: HM-CFG-USB, 40x HM, ZWave-USB, 13x ZWave, EnOcean-PI, 15x EnOcean, HUE/deCONZ, CO2, ESP-Multisensor, Shelly, alexa-fhem, ...
FHEM PI2 Buster: HM-CFG-USB, 25x HM, ZWave-USB, 4x ZWave, EnOcean-PI, 3x EnOcean, Shelly, ha-bridge, ...
FHEM PI3 Buster (Test)

bart0190

Hallo Joachim,
Danke für die schnelle Antwort.
Meine nodejs am Raspi war v10.21.0 und ist nach jetztigem Update V10.24.0

Hab

sudo apt-get update
sudo apt-get install nodejs npm

gemacht.

Ist eher zu empfehlen das aktuelle Modul einfach ins FHEM Verzeichnis zu den anderen pm dazuzukopieren (überschreiben) oder ein ganzes FHEM-Update?

Login-Einstellungen hab ich keine extra vorgenommen, guter Hinweis. Damit wird es wahrscheinlich auf 60 Sekunden sein, stelle ich gleich mal auf 7200 (alle 2h).
attr Alexa_AmazonAccount intervallogin 7200

FUUID - verstanden.  ;D

lg
Bart
Raspberry Pi 4 - FHEM, Homematic HM-CFG-LAN, ESP32 mit ePaper Display, Raspberry Pi 3 - BT Lokalisierung, PC - Squeezebox Server, Raspberry Pi 2 +HifiBerry - SB Player1, Raspberry Pi 2 +AVReceiver - SB Player2, nVidia Shield TV +AVReceiver - SB Player3, 2x Logitech Harmony Hub, echo dot Gen3