MiRo1310 / ioBroker.alexa-timer-vis

Timers that are entered into Alexa by voice input, make them visible for visualization
MIT License
5 stars 2 forks source link

Adapter funktioniert seit ein paar Tagen nicht mehr #64

Closed rtwl21 closed 1 year ago

rtwl21 commented 1 year ago

Seit ein paar Tagen funktioniert der Adapter nicht mehr. Keine Ahnung warum und weiß auch nicht wie genau ich dabei helfen kann dem Grund auf die Sprünge zu helfen. ich habe den Alexa-Timer-Vis gelöscht und neu installiert - nur um Fehler auszuschließen. Leider erfolglos.

Ich habe per Sprache und auch per "TextCommand" einen Timer gestartet - keine Änderung/Aktualisierung im Alexa-Timer-Vis Adapter.

Falls es hilft: Ich habe den Alexa2.0 Adapter sowie den Alexa-Timer-Vis Adapter auf Debug gestellt, dann einen Timer per TextCommand abgesetzt (Die Hardware-Alexa hat dies auch bestätigt). Das Kommando war "Timer 10 Minuten".

Alexa 2.0 wurde geloggt. Vom Alexa-Timer-Vis Adapter herrscht im Log gähnende Leere. Folgendes ist nun beim Debug Log:

2023-10-22 20:41:04.177 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Commands.textCommand: {"val":"timer 10 minuten","ack":false,"ts":1698000064169,"q":0,"from":"system.adapter.admin.0","user":"system.user.admin","lc":1698000064169}
2023-10-22 20:41:04.182 - debug: alexa2.0 (12912) Alexa-Remote: No authentication check needed (time elapsed 83342)
2023-10-22 20:41:04.183 - debug: alexa2.0 (12912) Alexa-Remote: Sending Request with {"host":"eu-api-alexa.amazon.de","path":"/api/behaviors/preview","method":"POST","timeout":10000,"headers":{}} and data={"behaviorId":"PREVIEW","sequenceJson":"{\"@type\":\"com.amazon.alexa.behaviors.model.Sequence\",\"startNode\":{\"@type\":\"com.amazon.alexa.behaviors.model.ParallelNode\",\"name\":null,\"nodesToExecute\":[{\"@type\":\"com.amazon.alexa.behaviors.model.OpaquePayloadOperationNode\",\"operationPayload\":{\"deviceType\":\"A7WXXXXXXXXX\",\"deviceSerialNumber\":\"G090SU0XXXXXXXX\",\"locale\":\"de-DE\",\"customerId\":\"A3VWPIXXXXXXXX\",\"text\":\"timer 10 minuten\"},\"type\":\"Alexa.TextCommand\",\"skillId\":\"amzn1.ask.1p.tellalexa\"}]}}","status":"ENABLED"}
2023-10-22 20:41:07.385 - debug: alexa2.0 (12912) Alexa-Remote HTTP2-PUSH: Command PUSH_NOTIFICATION_CHANGE: {
"dopplerId": {
"deviceSerialNumber": "G090SU0XXXXXXXX",
"deviceType": "A7WXXXXXXXXX"
},
"notificationId": "d614a2c4-08e3-36d1-8215-4d645276dxxx",
"notificationVersion": 2,
"eventType": "UPDATE",
"destinationUserId": "A3VWPIXXXXXXXX"
}
2023-10-22 20:41:07.387 - debug: alexa2.0 (12912) notification-change: {"destinationUserId":"A3VWPIXXXXXXXX","deviceSerialNumber":"G090SU0XXXXXXXX","deviceType":"A7WXXXXXXXXX","eventType":"UPDATE","notificationId":"d614a2c4-08e3-36d1-8215-4d645276dxxx","notificationVersion":2}
2023-10-22 20:41:07.674 - debug: alexa2.0 (12912) Alexa-Remote HTTP2-PUSH: Command PUSH_NOTIFICATION_CHANGE: {
"dopplerId": {
"deviceSerialNumber": "G090SU0XXXXXXXX",
"deviceType": "A7WXXXXXXXXX"
},
"notificationId": "d614a2c4-08e3-36d1-8215-4d645276dxxx",
"notificationVersion": 3,
"eventType": "UPDATE",
"destinationUserId": "A3VWPIXXXXXXXX"
}
2023-10-22 20:41:07.675 - debug: alexa2.0 (12912) notification-change: {"destinationUserId":"A3VWPIXXXXXXXX","deviceSerialNumber":"G090SU0XXXXXXXX","deviceType":"A7WXXXXXXXXX","eventType":"UPDATE","notificationId":"d614a2c4-08e3-36d1-8215-4d645276dxxx","notificationVersion":3}
2023-10-22 20:41:09.389 - debug: alexa2.0 (12912) Alexa-Remote: No authentication check needed (time elapsed 88549)
2023-10-22 20:41:09.390 - debug: alexa2.0 (12912) Alexa-Remote: Sending Request with {"host":"eu-api-alexa.amazon.de","path":"/api/notifications?cached=true&_=1698000069390","method":"GET","timeout":10000,"headers":{}}
2023-10-22 20:41:09.747 - debug: alexa2.0 (12912) Alexa-Remote: Response: {"notifications":[{"alarmLabel":null,"alarmTime":0,"assigner":null,"automationId":null,"createdDate":1697990780728,"deferredAtTime":null,"deliveryMetadata":null,"deliveryType":null,"deviceName":null,"deviceSerialNumber":"G090SU0XXXXXXXX","deviceType":"A7WXXXXXXXXX","extensibleAttribute":null,"followUpMetadata":null,"geoLocationTriggerData":null,"id":"A7WXXXXXXXXX-G090SU0XXXXXXXX-ba2dd88d-fccb-3138-b4b9-19ce0ba65377","lastOccurrenceTimeInMilli":0,"lastTriggerTimeInUtc":null,"lastUpdatedDate":1697991415000,"loopCount":null,"mrmGroupContext":null,"musicAlarmId":null,"musicEntity":null,"notificationIndex":"ba2dd88d-fccb-3138-b4b9-19ce0ba65377","originalDate":null,"originalDurationInMillis":600000,"originalTime":null,"personProfile":null,"primaryDeviceState":null,"provider":null,"rRuleData":null,"recurrenceEligibility":false,"recurringPattern":null,"remainingTime":0,"reminderAppLabel":null,"reminderLabel":null,"reminderSubLabel":null,"showDeregisteredWarning":null,"skillInfo":null,"sleepTrackingAlarmProperties":null,"snoozedToTime":null,"sound":{"displayName":"Simple Timer","folder":null,"id":"system_alerts_melodic_02","isChildDirected":false,"numAssets":0,"pricing":null,"providerId":"ECHO","sampleUrl":"https://s3.amazonaws.com/deeappservice.prod.notificationtones/system_alerts_melodic_02.mp3","sampleVideoUrl":null,"skillUrl":null},"status":"OFF","targetPersonProfiles":null,"timeZoneId":null,"timerLabel":null,"tmwNotificationProperties":null,"triggerTime":1697991380714,"type":"Timer","version":"4"},{"alarmLabel":null,"alarmTime":0,"assigner":null,"automationId":null,"createdDate":1698000067175,"deferredAtTime":null,"deliveryMetadata":null,"deliveryType":null,"deviceName":null,"deviceSerialNumber":"G090SU0XXXXXXXX","deviceType":"A7WXXXXXXXXX","extensibleAttribute":null,"followUpMetadata":null,"geoLocationTriggerData":null,"id":"A7WXXXXXXXXX-G090SU0XXXXXXXX-d614a2c4-08e3-36d1-8215-4d645276dxxx","lastOccurrenceTimeInMilli":0,"lastTriggerTimeInUtc":null,"lastUpdatedDate":1698000067568,"loopCount":null,"mrmGroupContext":null,"musicAlarmId":null,"musicEntity":null,"notificationIndex":"d614a2c4-08e3-36d1-8215-4d645276dxxx","originalDate":null,"originalDurationInMillis":600000,"originalTime":null,"personProfile":null,"primaryDeviceState":null,"provider":null,"rRuleData":null,"recurrenceEligibility":false,"recurringPattern":null,"remainingTime":597455,"reminderAppLabel":null,"reminderLabel":null,"reminderSubLabel":null,"showDeregisteredWarning":null,"skillInfo":null,"sleepTrackingAlarmProperties":null,"snoozedToTime":null,"sound":{"displayName":"Simple Timer","folder":null,"id":"system_alerts_melodic_02","isChildDirected":false,"numAssets":0,"pricing":null,"providerId":"ECHO","sampleUrl":"https://s3.amazonaws.com/deeappservice.prod.notificationtones/system_alerts_melodic_02.mp3","sampleVideoUrl":null,"skillUrl":null},"status":"ON","targetPersonProfiles":null,"timeZoneId":null,"timerLabel":null,"tmwNotificationProperties":null,"triggerTime":1698000667162,"type":"Timer","version":"3"},{"alarmLabel":null,"alarmTime":0,"assigner":null,"automationId":null,"createdDate":1697991401684,"deferredAtTime":null,"deliveryMetadata":null,"deliveryType":null,"deviceName":null,"deviceSerialNumber":"G090SU0XXXXXXXX","deviceType":"A7WXXXXXXXXX","extensibleAttribute":null,"followUpMetadata":null,"geoLocationTriggerData":null,"id":"A7WXXXXXXXXX-G090SU0XXXXXXXX-8a66ba13-747a-3970-84ac-0de7405e98e9","lastOccurrenceTimeInMilli":0,"lastTriggerTimeInUtc":null,"lastUpdatedDate":1697992027039,"loopCount":null,"mrmGroupContext":null,"musicAlarmId":null,"musicEntity":null,"notificationIndex":"8a66ba13-747a-3970-84ac-0de7405e98e9","originalDate":null,"originalDurationInMillis":600000,"originalTime":null,"personProfile":null,"primaryDeviceState":null,"provider":null,"rRuleData":null,"recurrenceEligibility":false,"recurringPattern":null,"remainingTime":0,"reminderAppLabel":null,"reminderLabel":null,"reminderSubLabel":null,"showDeregisteredWarning":null,"skillInfo":null,"sleepTrackingAlarmProperties":null,"snoozedToTime":null,"sound":{"displayName":"Simple Timer","folder":null,"id":"system_alerts_melodic_02","isChildDirected":false,"numAssets":0,"pricing":null,"providerId":"ECHO","sampleUrl":"https://s3.amazonaws.com/deeappservice.prod.notificationtones/system_alerts_melodic_02.mp3","sampleVideoUrl":null,"skillUrl":null},"status":"OFF","targetPersonProfiles":null,"timeZoneId":null,"timerLabel":null,"tmwNotificationProperties":null,"triggerTime":1697992001672,"type":"Timer","version":"4"}]}
2023-10-22 20:41:09.749 - debug: alexa2.0 (12912) Timer A7WXXXXXXXXX-G090SU0XXXXXXXX-d614a2c4-08e3-36d1-8215-4d645276dxxx triggered in 597s
2023-10-22 20:41:09.760 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Reminder.New: {"val":"","ack":true,"ts":1698000069756,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1646423009754}
2023-10-22 20:41:09.768 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Alarm.New: {"val":"","ack":true,"ts":1698000069764,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1646423009754}
2023-10-22 20:41:09.776 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Alarm.triggered: {"val":null,"ack":true,"ts":1698000069772,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1663698831202}
2023-10-22 20:41:09.783 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Reminder.triggered: {"val":null,"ack":true,"ts":1698000069780,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1696860058606}
2023-10-22 20:41:09.791 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.triggered: {"val":false,"ack":true,"ts":1698000069787,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1697992029881}
2023-10-22 20:41:09.802 - debug: alexa2.0 (12912) Object changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.nextTimerDate: {"common":{"type":"number","role":"date","name":"Unix epoch timestamp for next timer","read":true,"write":true},"type":"state","native":{},"from":"system.adapter.alexa2.0","user":"system.user.admin","ts":1698000069795,"_id":"alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.nextTimerDate","acl":{"object":1636,"state":1636,"owner":"system.user.admin","ownerGroup":"system.group.administrator"}}
2023-10-22 20:41:09.811 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.nextTimerDate: {"val":1698000667162,"ack":true,"ts":1698000069806,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1698000069806}
2023-10-22 20:41:09.819 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.activeTimerList: {"val":"[{\"id\":\"d614a2c4-08e3-36d1-8215-4d645276dxxx\",\"triggerTime\":1698000667162,\"label\":null}]","ack":true,"ts":1698000069814,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1698000069814}
2023-10-22 20:41:09.828 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.nextTimerId: {"val":"d614a2c4-08e3-36d1-8215-4d645276dxxx","ack":true,"ts":1698000069823,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1698000069823}
2023-10-22 20:41:09.836 - debug: alexa2.0 (12912) State changed alexa2.0.Echo-Devices.G090SU0XXXXXXXX.Timer.stopTimerId: {"val":"","ack":true,"ts":1698000069832,"q":0,"from":"system.adapter.alexa2.0","user":"system.user.admin","lc":1697999703607}
MiRo1310 commented 1 year ago

Das Problem wird sein das der Alexa2 Adapter den summary datenpunkt nicht aktualisiert. Ich meine da wird bereits dran gearbeitet.

rtwl21 commented 1 year ago

Holt sich also der Adapter auch über den summary die Information? Dachte das geht irgendwie anders. Aber danke für die Info 👍

MiRo1310 commented 1 year ago

Ja macht er!

MiRo1310 commented 1 year ago

@rtwl21 Dieses Skript kann die Zeit erstmal überbrücken

on({ id: [].concat(Array.prototype.slice.apply($('state[id=alexa2.0.Echo-Devices..Timer.activeTimerList]'))), change: 'ne' }, async (obj) => {setState('alexa2.0.History.#trigger' / Trigger/Rescan */, true); });

Heinz2100 commented 10 months ago

Danke für das Skript, aber bei mir kommt dann der Fehler "javascript.0 (231) script.js.common.AlexaTimer compile failed: at script.js.common.AlexaTimer:1"

Wo liegt mein Fehler? Danke

MiRo1310 commented 10 months ago

on({ id: [].concat(Array.prototype.slice.apply($('state[id=alexa2.0.Echo-Devices.*.Timer.activeTimerList]'))), change: 'ne' }, async (obj) => { setState('alexa2.0.History.#trigger', true);});

Da fehlte ein Sternchen warum auch immer das weg war? Aber normalerweise braucht man das nicht mehr. Also bei mir ist es auf jeden Fall nicht mehr aktiv '