Autor Thema: Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration  (Gelesen 108528 mal)

Offline Christoph Morrison

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1770
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1065 am: 23 Februar 2021, 13:46:21 »
Kurze Frage: Ist das Thema mit dem Rename des alexa-Devices schon bekannt? Ich bin da nun auch reingelaufen und frage mich, ob es eine Lösung gibt.

Ich hatte außerdem noch einen strict-subs-Fehler beim rename bekommen:
[23.2.2021, 13:30:29] [FHEM] fetching: http://127.0.0.1:40446/fhem?cmd=jsonlist2%20bridge_alexa_name=.+&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 13:30:30] [FHEM] SyntaxError: Unexpected token B in JSON at position 0
    at JSON.parse (<anonymous>)
    at FHEM.<anonymous> (/usr/local/lib/node_modules/alexa-fhem/lib/fhem.js:1345:34)
    at Request._callback (/usr/local/lib/node_modules/alexa-fhem/lib/fhem.js:1629:27)
    at Request.self.callback (/usr/local/lib/node_modules/alexa-fhem/node_modules/postman-request/request.js:268:12)
    at Request.emit (events.js:198:13)
    at Request.<anonymous> (/usr/local/lib/node_modules/alexa-fhem/node_modules/postman-request/request.js:1532:10)
    at Request.emit (events.js:198:13)
    at Gunzip.<anonymous> (/usr/local/lib/node_modules/alexa-fhem/node_modules/postman-request/request.js:1403:12)
    at Object.onceWrapper (events.js:286:20)
    at Gunzip.emit (events.js:203:15)
    at endReadableNT (_stream_readable.js:1145:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)
[23.2.2021, 13:30:30] [FHEM] failed to parse Bareword "general" not allowed while "strict subs" in use at (eval 285782) line 1.{  "Arg":"TYPE=alexa",  "Results": [  {    "Name":"general.interfaces.amazon.alexa_skill",    "PossibleSets":"add createDefaultConfig:noArg reload:noArg skillId start:noArg stop:noArg restart:noArg",    "PossibleAttrs":"alias comment:textField-long eventMap:textField-long group room suppressReading userReadings:textField-long verbose:0,1,2,3,4,5 alexaMapping:textField-long alexaTypes:textField-long fhemIntents:textField-long articles prepositions echoRooms:textField-long persons:textField-long alexaConfirmationLevel:2,1,0 alexaStatusLevel:2,1 skillId:textField alexaFHEM-cmd alexaFHEM-config alexaFHEM-home alexaFHEM-log alexaFHEM-params alexaFHEM-auth alexaFHEM-host alexaFHEM-sshUser nrarchive disable:1,0 disabledForIntervals event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading ASC:0,1,2 ASC_AutoAstroModeEvening ASC_AutoAstroModeMorning ASC_BlockingTime_afterManual ASC_Down ASC_LockOut ASC_Mode_Down ASC_Mode_Up ASC_Pos_Reading ASC_Roommate_Device ASC_Roommate_Reading ASC_Shading_Direction ASC_Shading_Mode ASC_Shading_Pos ASC_ShuttersPlace ASC_Up ASC_Ventilate_Pos ASC_Ventilate_Window_Open ASC_WindowRec ASC_WindowRec_subType DbLogExclude DbLogInclude DbLogValueFn:textField-long HmIp3D HmIpKey HmIpSGTIN alarm_system_interior alarm_system_outer_shell alarm_system_perimeter alexaName alexaProactiveEvents:1,0 alexaRoom cmdIcon devStateIcon:textField-long devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock,scene homebridgeMapping:textField-long icon installationRoom logging_bridge_Alias:textField-long logging_bridge_Defaults:textField-long logging_bridge_Disable:both,incoming,outgoing logging_bridge_Forward:all,none logging_bridge_Publish:textField-long logging_bridge_Subscribe:textField-long msgContactAudio msgContactLight msgContactMail msgContactPush msgContactScreen msgParams msgPriority msgRecipient msgRecipientAudio msgRecipientLight msgRecipientMail msgRecipientPush msgRecipientScreen msgRecipientText msgTitle msgTitleShrt msgType:text,push,mail,screen,light,audio,queue sortby webCmd webCmdLabel:textField-long widgetOverride userattr",    "Internals": {      ".FhemMetaInternals": "1",      "CFGFN": "",      "FD": "30",      "FUUID": "6034f151-f33f-a67d-4494-e141043b9e4a2680",      "FVERSION": "39_alexa.pm:0.216510/2020-04-12",      "LAST_START": "2021-02-23 13:29:04",      "LAST_STOP": "2021-02-23 13:28:56",      "NAME": "general.interfaces.amazon.alexa_skill",      "NOTIFYDEV": "global,global:npmjs.*alexa-fhem.*",      "NR": "11944",      "NTFY_ORDER": "50-general.interfaces.amazon.alexa_skill",      "PARTIAL": "",      "PID": "22746",      "STARTS": "8",      "STATE": "running /usr/local/bin/alexa-fhem",      "TYPE": "alexa",      "currentlogfile": "./log/alexa-2021-02-23.log",      "logfile": "./log/alexa-%Y-%m-%d.log"    },    "Readings": {      "alexaFHEM": { "Value":"running /usr/local/bin/alexa-fhem", "Time":"2021-02-23 13:29:04" },      "alexaFHEM.ProxyConnection": { "Value":"error; Trying to fetch alexadevice failed with SyntaxError: Unexpected token B in JSON at position 0", "Time":"2021-02-23 13:29:09" },      "alexaFHEM.bearerToken": { "Value":"crypt:200e7555550f030c7327020050705203", "Time":"2021-02-23 13:13:06" },      "alexaFHEM.skillRegKey": { "Value":"crypt:50030e255b0a0b071f25007156042202010a56270a550f05501c715d77575551540f7727570b02700455", "Time":"2021-02-23 13:13:06" }    },    "Attributes": {      "alexaFHEM-auth": "crypt:095844130b4b5c5a515b5e5d155b0a564d5d48074001431b0358460c5b134f0505555713074c1e5d5c02425e0351161a4d4f000f461d1a51135846084d4e12140d5a570d",      "alexaFHEM-config": "./alexa-fhem.cfg",      "alexaFHEM-log": "./log/alexa-%Y-%m-%d.log",      "alexaMapping": "#Characteristic=<name>=<value>,...\nOn=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um\n\nBrightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\nHue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200\nHue=verb=färbe,values=rot:0;grün:120;blau:220\n\nSaturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER\nSaturation=verb=sättige,values=AMAZON.NUMBER\n\nTargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0\nTargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\nTargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=grad\n\nVolume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\n#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr",      "alexaTypes": "#Type=<alias>[,<alias2>[,...]]\nlight=licht,lampen\nblind=rolladen,rolläden,jalousie,jalousien,rollo,rollos",      "devStateIcon": "stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop",      "echoRooms": "#<deviceId>=<room>\n",      "fhemIntents": "#IntentName=<sample utterance>\ngutenMorgen=guten morgen\nguteNacht=gute nacht",      "persons": "#<personId>=<name>\n",      "stateFormat": "alexaFHEM"    }  }  ],  "totalResultsReturned":1}Bareword "general" not allowed while "strict subs" in use at (eval 285783) line 1.
*** FHEM: connected
[23.2.2021, 13:30:31] [FHEM] got: 0 results

Offline gvzdus

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 852
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1066 am: 23 Februar 2021, 14:42:02 »
Es wäre ja spannend, was bei
http://127.0.0.1:40446/fhem?cmd=jsonlist2%20bridge_alexa_name=.+&fwcsrf=csrf_194516368220063&XHR=1zurückkommt.

Offline Christoph Morrison

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1770
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1067 am: 23 Februar 2021, 15:19:51 »
Es wäre ja spannend, was bei
http://127.0.0.1:40446/fhem?cmd=jsonlist2%20bridge_alexa_name=.+&fwcsrf=csrf_194516368220063&XHR=1zurückkommt.

Das war ein guter Hint. Erstmal ist mir aufgefallen, dass ich beim Device alexa_bridge_name statt bridge_alexa_name gesetzt habe. Zweitens wird das .+ nicht korrekt urlkodiert (sollte .%2b sein).

Ich habe nun die alexa-fhem.cfg angepasst (Hostname angepasst, nb)
{
   "connections" : [
      {
         "webname" : "fhem",
         "name" : "FHEM",
         "server" : "fornost",
         "filter" : "bridge_alexa_name=..*",
         "port" : "40446",
         "uid" : 999
      }
   ],
   "sshproxy" : {
      "ssh" : "/usr/bin/ssh",
      "description" : "FHEM Connector"
   }
}

und neu gestartet, nun wird mein Testgerät auch gefunden. Aber:

[23.2.2021, 15:11:32] Got SIGTERM, shutting down alexa-fhem...
[23.2.2021, 15:11:32] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating
[23.2.2021, 15:11:32] [FHEM]   executing: http://127.0.0.1:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20general.interfaces.amazon.alexa_skill%20alexaFHEM.ProxyConnection%20stopping%3B%3B%20alexa-fhem%20terminating%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:40] using config from ./alexa-fhem.cfg
*** CONFIG: parsed completely
[23.2.2021, 15:11:40] os.homedir()=/opt/fhem
[23.2.2021, 15:11:40] this is alexa-fhem 0.5.60
[23.2.2021, 15:11:40] connecting to FHEM ...
[23.2.2021, 15:11:40] [FHEM] defaults to: will not send proactive events
[23.2.2021, 15:11:41] [FHEM] trying longpoll to listen for fhem events
[23.2.2021, 15:11:41] [FHEM] starting longpoll: http://fornost:40446/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1614089501286
[23.2.2021, 15:11:41] [FHEM] got csrfToken: csrf_194516368220063
[23.2.2021, 15:11:41] [FHEM] Checking devices and attributes...
[23.2.2021, 15:11:41] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] [FHEM]   executing: http://fornost:40446/fhem?cmd=jsonlist2%20TYPE%3Dalexa&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] [FHEM] waiting for events ...
[23.2.2021, 15:11:41] [FHEM] Fetching FHEM devices...
[23.2.2021, 15:11:41] [FHEM] fetching: http://fornost:40446/fhem?cmd=jsonlist2%20bridge_alexa_name=..*&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] [FHEM] alexa device is general.interfaces.amazon.alexa_skill
[23.2.2021, 15:11:41] [FHEM] general.interfaces.amazon.alexa_skill will not send proactive events
[23.2.2021, 15:11:41] [FHEM] general.interfaces.amazon.alexa_skill uses ID: 6034f151-f33f-a67d-4494-e141043b9e4a2680
[23.2.2021, 15:11:41] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.60%22%7D%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bget%20general.interfaces.amazon.alexa_skill%20proxyToken%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20general.interfaces.amazon.alexa_skill%20.eventToken%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1
[23.2.2021, 15:11:41] Server listening on: http://127.0.0.1:34239 for proxy connections
[23.2.2021, 15:11:41] *** SSH: checking proxy configuration
[23.2.2021, 15:11:41] sshautoconf: home=/opt/fhem, spath=/opt/fhem/.alexa, cpath=./alexa-fhem.cfg, sshpath=/opt/fhem/.ssh
[23.2.2021, 15:11:41] Passed config: { connections:
   [ { webname: 'fhem',
       name: 'FHEM',
       server: 'fornost',
       filter: 'bridge_alexa_name=..*',
       port: '40446',
       uid: 999 } ],
  sshproxy:
   { ssh: '/usr/bin/ssh',
     description: 'FHEM Connector',
     options:
      [ '-i', '/opt/fhem/.ssh/id_rsa', '-p', 58824, 'fhem-va.fhem.de' ],
     'bind-ip': '127.0.0.1',
     server:
      Server {
        insecureHTTPParser: undefined,
        _events: [Object],
        _eventsCount: 3,
        _maxListeners: undefined,
        _connections: 0,
        _handle: [TCP],
        _usingWorkers: false,
        _workers: [],
        _unref: false,
        allowHalfOpen: true,
        pauseOnConnect: false,
        httpAllowHalfOpen: false,
        timeout: 0,
        keepAliveTimeout: 5000,
        maxHeadersCount: null,
        headersTimeout: 40000,
        _connectionKey: '4:127.0.0.1:0',
        [Symbol(IncomingMessage)]: [Function],
        [Symbol(ServerResponse)]: [Function],
        [Symbol(asyncId)]: 97 } } }
[23.2.2021, 15:11:41] sshautoconf: SSH key seems to exist
[23.2.2021, 15:11:42] sshautoconf: Our SSH key is known at the reverse proxy, good!
[23.2.2021, 15:11:42] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20general.interfaces.amazon.alexa_skill%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1
*** FHEM: connected
[23.2.2021, 15:11:42] [FHEM] got: 1 results
[23.2.2021, 15:11:42] [FHEM] house.groundfloor.office.lights.desk.0 is light
[23.2.2021, 15:11:42] [FHEM] house.groundfloor.office.lights.desk.0 has
[23.2.2021, 15:11:42] [FHEM]   On [state;on,off]
[23.2.2021, 15:11:42] [FHEM] house.groundfloor.office.lights.desk.0 will not send proactive events
[23.2.2021, 15:11:42] [FHEM] house.groundfloor.office.lights.desk.0 uses ID: 600f17af-f33f-a67d-74e4-76bb4ee7038e4978
  2021-02-23 15:11:42 caching: house.groundfloor.office.lights.desk.0-state: off
[23.2.2021, 15:11:42] BearerToken '...ne 1.' read from general.interfaces.amazon.alexa_skill
[23.2.2021, 15:11:42] sshautoconf: aborted with Trying to fetch alexadevice failed with SyntaxError: Unexpected token B in JSON at position 0
[23.2.2021, 15:11:42] *** SSH: proxy configuration failed: Trying to fetch alexadevice failed with SyntaxError: Unexpected token B in JSON at position 0
[23.2.2021, 15:11:43] Reading alexaFHEM.ProxyConnection set to error;; Trying to fetch alexadevice failed with SyntaxError: Unexpected token B in JSON at position 0
[23.2.2021, 15:11:43] [FHEM]   executing: http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20general.interfaces.amazon.alexa_skill%20alexaFHEM.ProxyConnection%20error%3B%3B%20Trying%20to%20fetch%20alexadevice%20failed%20with%20SyntaxError%3A%20Unexpected%20token%20B%20in%20JSON%20at%20position%200%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1

Da schau an, wenn ich http://fornost:40446/fhem?cmd=%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20general.interfaces.amazon.alexa_skill%3B%7B%24defs%7Bgeneral.interfaces.amazon.alexa_skill%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&fwcsrf=csrf_194516368220063&XHR=1 aufrufe:

Bareword "general" not allowed while "strict subs" in use at (eval 1689769) line 1.

{
  "Arg":"general.interfaces.amazon.alexa_skill",
  "Results": [
  {
    "Name":"general.interfaces.amazon.alexa_skill",
    "PossibleSets":"add createDefaultConfig:noArg reload:noArg skillId start:noArg stop:noArg restart:noArg",
    "PossibleAttrs":"alias comment:textField-long eventMap:textField-long group room suppressReading userReadings:textField-long verbose:0,1,2,3,4,5 alexaMapping:textField-long alexaTypes:textField-long fhemIntents:textField-long articles prepositions echoRooms:textField-long persons:textField-long alexaConfirmationLevel:2,1,0 alexaStatusLevel:2,1 skillId:textField alexaFHEM-cmd alexaFHEM-config alexaFHEM-home alexaFHEM-log alexaFHEM-params alexaFHEM-auth alexaFHEM-host alexaFHEM-sshUser nrarchive disable:1,0 disabledForIntervals event-aggregator event-min-interval event-on-change-reading event-on-update-reading oldreadings stateFormat:textField-long timestamp-on-change-reading ASC:0,1,2 ASC_AutoAstroModeEvening ASC_AutoAstroModeMorning ASC_BlockingTime_afterManual ASC_Down ASC_LockOut ASC_Mode_Down ASC_Mode_Up ASC_Pos_Reading ASC_Roommate_Device ASC_Roommate_Reading ASC_Shading_Direction ASC_Shading_Mode ASC_Shading_Pos ASC_ShuttersPlace ASC_Up ASC_Ventilate_Pos ASC_Ventilate_Window_Open ASC_WindowRec ASC_WindowRec_subType DbLogExclude DbLogInclude DbLogValueFn:textField-long HmIp3D HmIpKey HmIpSGTIN alarm_system_interior alarm_system_outer_shell alarm_system_perimeter alexaName alexaProactiveEvents:1,0 alexaRoom cmdIcon devStateIcon:textField-long devStateStyle genericDeviceType:security,ignore,switch,outlet,light,blind,thermometer,thermostat,contact,garage,window,lock,scene homebridgeMapping:textField-long icon installationRoom logging_bridge_Alias:textField-long logging_bridge_Defaults:textField-long logging_bridge_Disable:both,incoming,outgoing logging_bridge_Forward:all,none logging_bridge_Publish:textField-long logging_bridge_Subscribe:textField-long msgContactAudio msgContactLight msgContactMail msgContactPush msgContactScreen msgParams msgPriority msgRecipient msgRecipientAudio msgRecipientLight msgRecipientMail msgRecipientPush msgRecipientScreen msgRecipientText msgTitle msgTitleShrt msgType:text,push,mail,screen,light,audio,queue sortby webCmd webCmdLabel:textField-long widgetOverride alexa_bridge_name userattr",
    "Internals": {
      ".FhemMetaInternals": "1",
      "CFGFN": "",
      "FD": "17",
      "FUUID": "6034f151-f33f-a67d-4494-e141043b9e4a2680",
      "FVERSION": "39_alexa.pm:0.216510/2020-04-12",
      "LAST_START": "2021-02-23 15:11:38",
      "LAST_STOP": "2021-02-23 15:11:38",
      "NAME": "general.interfaces.amazon.alexa_skill",
      "NOTIFYDEV": "global,global:npmjs.*alexa-fhem.*",
      "NR": "11944",
      "NTFY_ORDER": "50-general.interfaces.amazon.alexa_skill",
      "PARTIAL": "",
      "PID": "26797",
      "STARTS": "12",
      "STATE": "running /usr/local/bin/alexa-fhem",
      "TYPE": "alexa",
      "active": "0",
      "currentlogfile": "./log/alexa-2021-02-23.log",
      "logfile": "./log/alexa-%Y-%m-%d.log"
    },
    "Readings": {
      "alexaFHEM": { "Value":"running /usr/local/bin/alexa-fhem", "Time":"2021-02-23 15:11:38" },
      "alexaFHEM.ProxyConnection": { "Value":"error; Trying to fetch alexadevice failed with SyntaxError: Unexpected token B in JSON at position 0", "Time":"2021-02-23 15:11:43" },
      "alexaFHEM.bearerToken": { [...REDACTED...] },
      "alexaFHEM.skillRegKey": { "[...REDACTED...] }
    },
    "Attributes": {
      "alexaFHEM-config": "./alexa-fhem.cfg",
      "alexaFHEM-log": "./log/alexa-%Y-%m-%d.log",
      "alexaMapping": "#Characteristic=<name>=<value>,...\nOn=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um\n\nBrightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\nHue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200\nHue=verb=färbe,values=rot:0;grün:120;blau:220\n\nSaturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER\nSaturation=verb=sättige,values=AMAZON.NUMBER\n\nTargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0\nTargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\nTargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=grad\n\nVolume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent\n\n#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr",
      "alexaTypes": "#Type=<alias>[,<alias2>[,...]]\nlight=licht,lampen\nblind=rolladen,rolläden,jalousie,jalousien,rollo,rollos",
      "devStateIcon": "stopped:control_home@red:start stopping:control_on_off@orange running.*:control_on_off@green:stop",
      "echoRooms": "#<deviceId>=<room>\n",
      "fhemIntents": "#IntentName=<sample utterance>\ngutenMorgen=guten morgen\nguteNacht=gute nacht",
      "persons": "#<personId>=<name>\n",
      "stateFormat": "alexaFHEM"
    }
  }  ],
  "totalResultsReturned":1
}

Bareword "general" not allowed while "strict subs" in use at (eval 1689770) line 1.

Da ist Unexpected token B in JSON at position 0 vermutlich das B von Bareword - der Device-Name wird irgendwo nicht richtig behandelt (mein Device-Name ist ja ein legaler Name ...)

Offline gvzdus

  • Developer
  • Sr. Member
  • ****
  • Beiträge: 852
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1068 am: 24 Februar 2021, 19:11:53 »
Wenn Du den Querystring mal dekodierst, kommt da raus:
{$defs{general.interfaces.amazon.alexa_skill}->{"active"} = 1;;undef};
jsonlist2 general.interfaces.amazon.alexa_skill;
{$defs{general.interfaces.amazon.alexa_skill}->{"active"} = 0;;undef}

Vermutlich liegt es am Punkt in Deinem Alexa-Device-Namen. Könnte man natürlich in Anführungszeichen setzen und Andre um ein Release bitten, aber schneller ist natürlich umbenennen.

Offline justme1968

  • Developer
  • Hero Member
  • ****
  • Beiträge: 20833
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1069 am: 24 Februar 2021, 20:33:30 »
also...

- das + im filter ging nicht weil die url nicht ganz sauber zusammen gebaut wurde. das sollte jetzt repariert sein.

- die " beim zugriff auf $defs habe ich auch eingebaut.

- das alexa modul startet alexa_fhem nach einem rename jetzt neu. damit kennt alexa_fhem das umbenannte alexa device wieder.


d.h. update von alexa-fhem und 39_alexa.pm sollte die drei probleme beheben.
FHEM5.4,DS1512+,2xCULv3,DS9490R,HMLAN,2xRasPi
CUL_HM:HM-LC-Bl1PBU-FM,HM-LC-Sw1PBU-FM,HM-SEC-MDIR,HM-SEC-RHS
HUEBridge,HUEDevice:LCT001,LLC001,LLC006,LWL001
OWDevice:DS1420,DS18B20,DS2406,DS2423
FS20:fs20as4,fs20bs,fs20di
AKCP:THS01,WS15
CUL_WS:S300TH
Gefällt mir Gefällt mir x 1 Liste anzeigen

Offline Christoph Morrison

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1770
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1070 am: 24 Februar 2021, 22:38:41 »
Danke dir, beim nächsten Release meiner Config werde ich vorher das Modul aktualisieren und dann testen.

Offline Christoph Morrison

  • Developer
  • Hero Member
  • ****
  • Beiträge: 1770
Antw:Einladung zum Beta-Test: "FHEMlazy" zur einfacheren Alexa-Integration
« Antwort #1071 am: 25 Februar 2021, 13:33:25 »
Habe nun mal aktualisiert und das Setup wieder auf den Namen mit Punkten und der RegExp aus meinem Beispiel umgestellt: Keine Fehler mehr im Log und die ersten Devices sind schon entsprechend attribuiert.

Eine Frage hätte ich noch: Was kann ich dafür tun, dass es den Service möglichst lange gibt? Spenden an den eV?

 

decade-submarginal