alexa-fhem: amazon alexa smart home skill für fhem

Begonnen von justme1968, 05 November 2016, 23:21:32

Vorheriges Thema - Nächstes Thema

Hannibal1990

Dank für deine Antwort  :)
Ja Fehler habe ich schon gesucht aber war nicht wirklich was passendes dabei.
Troubleshoots von Wiki bin ich auch schon durchgegangen.
Welche Rechte meinst du genau?
Bei dem Key erstellen im ssl?
Da hatte ich nur ein Problem, dass der Befehl "move /y newkey.pem key.pem" (Wiki alexa-fhem) nicht ausgeführt werden kann, da er den Befehl nicht kennt, weder im ssl noch im cmd, keine Ahnung warum.
Habe dann einfach die newkey.pm in key.pm umbenannt.

Logausgaben in der alexa-fhem konsole

c:\FHEM\alexa-fhem\bin>node alexa
[2017-8-24 07:03:41] using \Users\Kniddi\.alexa\config.json
[2017-8-24 07:03:41] ---
[2017-8-24 07:03:41] this is alexa-fhem 0.3.4
[2017-8-24 07:03:41] Fetching FHEM devices...
[2017-8-24 07:03:41] [FHEM] starting longpoll: http://192.168.178.34:8083/fhem?X
HR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON&timestamp=1503
551021111
[2017-8-24 07:03:41] Server listening on: https://:::3000
[2017-8-24 07:03:41] [FHEM] Checking devices and attributes...
[2017-8-24 07:03:41] [FHEM]   executing: http://192.168.178.34:8083/fhem?cmd=%7B
AttrVal(%22global%22,%22userattr%22,%22%22)%7D&fwcsrf=csrf_314477705101806&XHR=1

[2017-8-24 07:03:41] [FHEM]   executing: http://192.168.178.34:8083/fhem?cmd=jso
nlist2%20TYPE=alexa&fwcsrf=csrf_314477705101806&XHR=1
[2017-8-24 07:03:41] [FHEM] Fetching FHEM devices...
[2017-8-24 07:03:41] [FHEM] fetching: http://192.168.178.34:8083/fhem?cmd=jsonli
st2%20room=alexa&fwcsrf=csrf_314477705101806&XHR=1
[2017-8-24 07:03:41] [FHEM] alexa device is MyAlexa
[2017-8-24 07:03:41] [FHEM] MyAlexa is switch
[2017-8-24 07:03:41] [FHEM] MyAlexa has
[2017-8-24 07:03:41] [FHEM] homebridgeMapping: #Characteristic=<name>=<value>,..
.
On=verb=schalte,valueOn=an;ein,valueOff=aus,valueToggle=um

Brightness=verb=stelle,property=helligkeit,valuePrefix=auf,values=AMAZON.NUMBER,
valueSuffix=prozent

Hue=verb=stelle,valuePrefix=auf,values=rot:0;grün:128;blau:200
Hue=verb=färbe,values=rot:0;grün:120;blau:220

Saturation=verb=stelle,property=sättigung,valuePrefix=auf,values=AMAZON.NUMBER
Saturation=verb=sättige,values=AMAZON.NUMBER

TargetPosition=verb=mach,articles=den;die,values=auf:100;zu:0
TargetPosition=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=proz
ent

TargetTemperature=verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=g
rad

Volume:verb=stelle,valuePrefix=auf,values=AMAZON.NUMBER,valueSuffix=prozent

#Weckzeit=verb=stelle,valuePrefix=auf;für,values=AMAZON.TIME,valueSuffix=uhr
[2017-8-24 07:03:41] [FHEM]   executing: http://192.168.178.34:8083/fhem?cmd=%7B
$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%201%7D&fwcsrf=csrf_314477705101806&
XHR=1
[2017-8-24 07:03:41] [FHEM]   executing: http://192.168.178.34:8083/fhem?cmd=%7B
$defs%7BMyAlexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20=%20%220.3.4%22%7D&fwcs
rf=csrf_314477705101806&XHR=1
[2017-8-24 07:03:41] [FHEM]   executing: http://192.168.178.34:8083/fhem?cmd=%7B
$defs%7BMyAlexa%7D-%3E%7B%22active%22%7D%20=%200%7D&fwcsrf=csrf_314477705101806&
XHR=1
[2017-8-24 07:03:41] perfectOfVerb:
[2017-8-24 07:03:41] { stelle: 'gestellt',
  schalte: 'geschaltet',
  'färbe': 'gefärbt',
  mach: 'gemacht' }
[2017-8-24 07:03:41] verbsOfIntent:
[2017-8-24 07:03:41] [ OnIntent: [ 'schalte' ],
  prozentIntent: [ 'stelle' ],
  HueIntent: [ 'stelle' ],
  HueIntentB: [ 'färbe' ],
  SaturationIntent: [ 'stelle' ],
  SaturationIntentB: [ 'sättige' ],
  TargetPositionIntent: [ 'mach' ],
  gradIntent: [ 'stelle' ] ]
[2017-8-24 07:03:41] characteristicsOfIntent:
[2017-8-24 07:03:41] { OnIntent: [ 'On' ],
  prozentIntent: [ 'Brightness', 'TargetPosition', 'Volume' ],
  HueIntent: [ 'Hue' ],
  HueIntentB: [ 'Hue' ],
  SaturationIntent: [ 'Saturation' ],
  SaturationIntentB: [ 'Saturation' ],
  TargetPositionIntent: [ 'TargetPosition' ],
  gradIntent: [ 'TargetTemperature' ] }
[2017-8-24 07:03:41] prefixOfIntent:
[2017-8-24 07:03:41] { OnIntent: undefined,
  prozentIntent: 'auf',
  HueIntent: 'auf',
  HueIntentB: undefined,
  SaturationIntent: 'auf',
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'auf' }
[2017-8-24 07:03:41] suffixOfIntent:
[2017-8-24 07:03:41] { OnIntent: undefined,
  prozentIntent: 'prozent',
  HueIntent: undefined,
  HueIntentB: undefined,
  SaturationIntent: undefined,
  SaturationIntentB: undefined,
  TargetPositionIntent: undefined,
  gradIntent: 'grad' }
[2017-8-24 07:03:41] alexaTypes:
[2017-8-24 07:03:41] { light: [ 'licht', 'lampen' ],
  blind:
   [ 'rolladen',
     'rolläden',
     'jalousie',
     'jalousien',
     'rollo',
     'rollos' ] }
[2017-8-24 07:03:41] roomOfEcho:
[2017-8-24 07:03:41] {}
[2017-8-24 07:03:41] fhemIntents:
[2017-8-24 07:03:41] { FHEMgutenMorgenIntent: 'gutenMorgen',
  FHEMguteNachtIntent: 'guteNacht' }
[2017-8-24 07:03:41] [FHEM] got: 0 results
[2017-8-24 07:05:32] accepted new token
**** Received Directive: {"header":{"namespace":"Alexa.ConnectedHome.Discovery",
"name":"DiscoverAppliancesRequest","payloadVersion":"2","messageId":"e6330487-3b
30-4c68-af94-206ceeb6636b"},"payload":{"accessToken":"Atza|IwEBIEjnaExucqbRzSVLb
83mWX0vhzbHuTFs8vOjwCYRGVs99CSAUncuIGdacUKBfCxo4SLlKD0sLiDPpuNOl9pIuVSEM2RAIL3sp
hFzijESqzeV_s-QZwfMrRz8BovC0_EmTZRJfcxRkJbTO8uLP-AJNKvgsCpMhBpLb6NDULV_bbI2RGHea
oN_0fwHxruZjGprVKmQcoZrkCOuhQoavwFsNbC6ZcyBg0RUBJUEURIR6JR-OXhx1nSlPEWTeFFY_PkzJ
x6L-h8fvtOV1eZn2NMFcmioi5eNMkEq_LrdL9DzxeH6VYZ_croxLKncTA22l3z0OYlmVJEU_AamgU5VE
ohuuaRd-8xM5KxNKvO9qnX67Gy6RSUBlTelMMeqA3RDhwTCk7Ylyl6u8aBV2BwPLsfVtUx3qmu15XCbq
UA9j2qB2Hiu6vzWaNwIk7GNrAfYVcgyiKcL4-MMHMASIFLeFJqdTyKMoNoVMddEThYPoJbLYGGQs1dLC
U87nHnfFItrODgwmn0"}}
response :{"header":{"name":"DiscoverAppliancesResponse","payloadVersion":"2","n
amespace":"Alexa.ConnectedHome.Discovery","messageId":"1b204a9f-96be-4c31-8ef0-1
3820153a57b"},"payload":{"discoveredAppliances":[]}}
**** Received Directive: {"header":{"namespace":"Alexa.ConnectedHome.Discovery",
"name":"DiscoverAppliancesRequest","payloadVersion":"2","messageId":"495afeb7-8b
f7-4325-bafa-bc8fc1967264"},"payload":{"accessToken":"Atza|IwEBIEjnaExucqbRzSVLb
83mWX0vhzbHuTFs8vOjwCYRGVs99CSAUncuIGdacUKBfCxo4SLlKD0sLiDPpuNOl9pIuVSEM2RAIL3sp
hFzijESqzeV_s-QZwfMrRz8BovC0_EmTZRJfcxRkJbTO8uLP-AJNKvgsCpMhBpLb6NDULV_bbI2RGHea
oN_0fwHxruZjGprVKmQcoZrkCOuhQoavwFsNbC6ZcyBg0RUBJUEURIR6JR-OXhx1nSlPEWTeFFY_PkzJ
x6L-h8fvtOV1eZn2NMFcmioi5eNMkEq_LrdL9DzxeH6VYZ_croxLKncTA22l3z0OYlmVJEU_AamgU5VE
ohuuaRd-8xM5KxNKvO9qnX67Gy6RSUBlTelMMeqA3RDhwTCk7Ylyl6u8aBV2BwPLsfVtUx3qmu15XCbq
UA9j2qB2Hiu6vzWaNwIk7GNrAfYVcgyiKcL4-MMHMASIFLeFJqdTyKMoNoVMddEThYPoJbLYGGQs1dLC
U87nHnfFItrODgwmn0"}}
response :{"header":{"name":"DiscoverAppliancesResponse","payloadVersion":"2","n
amespace":"Alexa.ConnectedHome.Discovery","messageId":"8bb2f954-799f-4fb1-aa08-7
c8380093cc1"},"payload":{"discoveredAppliances":[]}}
[2017-8-24 08:59:58] accepted new token
**** Received Directive: {"header":{"namespace":"Alexa.ConnectedHome.Discovery",
"name":"DiscoverAppliancesRequest","payloadVersion":"2","messageId":"a251459f-85
9a-47df-8920-631f3ce73e61"},"payload":{"accessToken":"Atza|IwEBII5epFhFfhTJh2vjz
fImbwDworLPped2CGy0v49vNlgj0UGvzzMNhkSXpA3Wze20Sn_cGDfHxrtiu9uDj9Nja6qgWrUqCNBRB
njvJQOxvtA3OZLBUmwOiOF4U4bcJIyro-3IotkA6jBcbXV4Dm4mBHQzFTGhyKoWkJDy5Fe-JraSfr5uz
g2KLNjrIe-IePXkRu5Gnndo7HsN5fOszd1HNovFrzf_pqjyicLMnniYHvKixpimV6wUUvo43w1HVrxKO
nVH59SwNNIAfl3dAtXl8-soy91rOsnEvhkE_doy1eqF3tYLxykWYi9fXmwWVhJmJQSV92QeMn1z6eTnX
fb8pO5SS_XMU-2e0PGnhVLBZgmDcmqf70nB6tukAuHBLu4YKb3XD_ih4y4Rwo1pgM-S0JjYV-BEfxlnQ
DNcmnmmHtuvnnjW_UUe7bVLQRMWPbJa2NixtMCBGiMd8afzeDl_8XKi3CkfUkifQL_7rxuyGwF6D5WxR
9lr0XMgiDqaa_SmAyM"}}
response :{"header":{"name":"DiscoverAppliancesResponse","payloadVersion":"2","n
amespace":"Alexa.ConnectedHome.Discovery","messageId":"75ab41e1-2675-448b-a233-9
3d9c1d0ab43"},"payload":{"discoveredAppliances":[]}}
**** Received Directive: {"header":{"namespace":"Alexa.ConnectedHome.Discovery",
"name":"DiscoverAppliancesRequest","payloadVersion":"2","messageId":"d72b7cb1-b5
98-45b7-be7c-e4272c385ae3"},"payload":{"accessToken":"Atza|IwEBII5epFhFfhTJh2vjz
fImbwDworLPped2CGy0v49vNlgj0UGvzzMNhkSXpA3Wze20Sn_cGDfHxrtiu9uDj9Nja6qgWrUqCNBRB
njvJQOxvtA3OZLBUmwOiOF4U4bcJIyro-3IotkA6jBcbXV4Dm4mBHQzFTGhyKoWkJDy5Fe-JraSfr5uz
g2KLNjrIe-IePXkRu5Gnndo7HsN5fOszd1HNovFrzf_pqjyicLMnniYHvKixpimV6wUUvo43w1HVrxKO
nVH59SwNNIAfl3dAtXl8-soy91rOsnEvhkE_doy1eqF3tYLxykWYi9fXmwWVhJmJQSV92QeMn1z6eTnX
fb8pO5SS_XMU-2e0PGnhVLBZgmDcmqf70nB6tukAuHBLu4YKb3XD_ih4y4Rwo1pgM-S0JjYV-BEfxlnQ
DNcmnmmHtuvnnjW_UUe7bVLQRMWPbJa2NixtMCBGiMd8afzeDl_8XKi3CkfUkifQL_7rxuyGwF6D5WxR
9lr0XMgiDqaa_SmAyM"}}
response :{"header":{"name":"DiscoverAppliancesResponse","payloadVersion":"2","n
amespace":"Alexa.ConnectedHome.Discovery","messageId":"1ec71c21-11d1-4004-8e62-b
d92d6167fd8"},"payload":{"discoveredAppliances":[]}}
[2017-8-24 09:00:57] client not authorized: {"error_description":"The request ha
s an invalid parameter : access_token","error":"invalid_token"}
[2017-8-24 09:00:57] ERROR: InvalidAccessTokenError from ::ffff:52.211.70.77
response :{"header":{"name":"InvalidAccessTokenError","payloadVersion":"2","name
space":"Alexa.ConnectedHome.Control","messageId":"65f61214-3ecc-45c4-9842-f874b2
ce5943"},"payload":{}}


Logfile aus FHEM

2017.08.23 13:19:09 3: PLC S7_ReadBlockFromPLC ReadArea error: 3=A timeout occurred waiting a reply.
2017.08.23 13:19:09 2: PLC S7 disconnected
2017.08.23 13:19:12 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 19:19:04 3: PLC S7_ReadBlockFromPLC ReadArea error: 3=A timeout occurred waiting a reply.
2017.08.23 19:19:04 2: PLC S7 disconnected
2017.08.23 19:19:07 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 21:55:01 0: Server shutdown
2017.08.23 21:55:03 1: registering fhem as Windows Service
2017.08.23 21:55:03 1: starting fhem as a service
2017.08.23 21:55:03 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 21:55:03 3: telnetPort: port 7072 opened
2017.08.23 21:55:03 3: WEB: port 8083 opened
2017.08.23 21:55:03 3: WEBphone: port 8084 opened
2017.08.23 21:55:03 3: WEBtablet: port 8085 opened
2017.08.23 21:55:03 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 21:55:06 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 21:55:06 1: Including ./log/fhem.save
2017.08.23 21:55:06 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 21:55:06 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 21:55:06 0: Featurelevel: 5.8
2017.08.23 21:55:06 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:10576)
2017.08.23 21:55:06 3: FHEMWEB WEB CSRF error: csrf_146884867760635 ne csrf_442943319790716 for client WEB_127.0.0.1_50646. For details see the csrfToken FHEMWEB attribute.
2017.08.23 21:55:06 0: Server shutdown
2017.08.23 21:55:08 1: registering fhem as Windows Service
2017.08.23 21:55:08 1: starting fhem as a service
2017.08.23 21:55:08 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 21:55:08 3: telnetPort: port 7072 opened
2017.08.23 21:55:08 3: WEB: port 8083 opened
2017.08.23 21:55:08 3: WEBphone: port 8084 opened
2017.08.23 21:55:08 3: WEBtablet: port 8085 opened
2017.08.23 21:55:08 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 21:55:11 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 21:55:11 1: Including ./log/fhem.save
2017.08.23 21:55:11 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 21:55:11 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 21:55:11 0: Featurelevel: 5.8
2017.08.23 21:55:11 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:1684)
2017.08.23 21:55:21 0: Server shutdown
2017.08.23 21:55:22 1: registering fhem as Windows Service
2017.08.23 21:55:22 1: starting fhem as a service
2017.08.23 21:55:22 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 21:55:23 3: telnetPort: port 7072 opened
2017.08.23 21:55:23 3: WEB: port 8083 opened
2017.08.23 21:55:23 3: WEBphone: port 8084 opened
2017.08.23 21:55:23 3: WEBtablet: port 8085 opened
2017.08.23 21:55:23 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 21:55:26 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 21:55:26 1: Including ./log/fhem.save
2017.08.23 21:55:26 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 21:55:26 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 21:55:26 0: Featurelevel: 5.8
2017.08.23 21:55:26 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:4804)
2017.08.23 21:55:26 3: FHEMWEB WEB CSRF error: csrf_284241481995583 ne csrf_166985053309668 for client WEB_127.0.0.1_50658. For details see the csrfToken FHEMWEB attribute.
2017.08.23 21:55:26 0: Server shutdown
2017.08.23 21:55:27 1: registering fhem as Windows Service
2017.08.23 21:55:27 1: starting fhem as a service
2017.08.23 21:55:27 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 21:55:27 3: telnetPort: port 7072 opened
2017.08.23 21:55:27 3: WEB: port 8083 opened
2017.08.23 21:55:27 3: WEBphone: port 8084 opened
2017.08.23 21:55:27 3: WEBtablet: port 8085 opened
2017.08.23 21:55:27 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 21:55:31 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 21:55:31 1: Including ./log/fhem.save
2017.08.23 21:55:31 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 21:55:31 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 21:55:31 0: Featurelevel: 5.8
2017.08.23 21:55:31 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:9516)
2017.08.23 22:12:47 0: Server shutdown
2017.08.23 22:12:49 1: registering fhem as Windows Service
2017.08.23 22:12:49 1: starting fhem as a service
2017.08.23 22:12:49 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 22:12:49 3: telnetPort: port 7072 opened
2017.08.23 22:12:49 3: WEB: port 8083 opened
2017.08.23 22:12:49 3: WEBphone: port 8084 opened
2017.08.23 22:12:49 3: WEBtablet: port 8085 opened
2017.08.23 22:12:49 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 22:12:52 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 22:12:52 1: Including ./log/fhem.save
2017.08.23 22:12:52 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 22:12:52 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 22:12:52 0: Featurelevel: 5.8
2017.08.23 22:12:52 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:8264)
2017.08.23 22:12:52 3: FHEMWEB WEB CSRF error: csrf_561608248542993 ne csrf_176187262572005 for client WEB_127.0.0.1_50850. For details see the csrfToken FHEMWEB attribute.
2017.08.23 22:12:52 0: Server shutdown
2017.08.23 22:12:54 1: registering fhem as Windows Service
2017.08.23 22:12:54 1: starting fhem as a service
2017.08.23 22:12:54 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.23 22:12:54 3: telnetPort: port 7072 opened
2017.08.23 22:12:54 3: WEB: port 8083 opened
2017.08.23 22:12:54 3: WEBphone: port 8084 opened
2017.08.23 22:12:54 3: WEBtablet: port 8085 opened
2017.08.23 22:12:54 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.23 22:12:57 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.23 22:12:57 1: Including ./log/fhem.save
2017.08.23 22:12:57 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.23 22:12:57 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.23 22:12:57 0: Featurelevel: 5.8
2017.08.23 22:12:57 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:11024)
2017.08.23 22:12:57 3: FHEMWEB WEB CSRF error: csrf_176187262572005 ne csrf_300490456839183 for client WEB_127.0.0.1_50853. For details see the csrfToken FHEMWEB attribute.
2017.08.23 22:18:11 3: PLC S7_ReadBlockFromPLC ReadArea error: 3=A timeout occurred waiting a reply.
2017.08.23 22:18:11 2: PLC S7 disconnected
2017.08.23 22:18:14 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.24 04:18:07 3: PLC S7_ReadBlockFromPLC ReadArea error: 3=A timeout occurred waiting a reply.
2017.08.24 04:18:07 2: PLC S7 disconnected
2017.08.24 04:18:10 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.24 07:02:48 0: Server shutdown
2017.08.24 07:02:49 1: registering fhem as Windows Service
2017.08.24 07:02:49 1: starting fhem as a service
2017.08.24 07:02:49 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.24 07:02:49 3: telnetPort: port 7072 opened
2017.08.24 07:02:50 3: WEB: port 8083 opened
2017.08.24 07:02:50 3: WEBphone: port 8084 opened
2017.08.24 07:02:50 3: WEBtablet: port 8085 opened
2017.08.24 07:02:50 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.24 07:02:53 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.24 07:02:53 1: Including ./log/fhem.save
2017.08.24 07:02:53 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.24 07:02:53 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.24 07:02:53 0: Featurelevel: 5.8
2017.08.24 07:02:53 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:10232)
2017.08.24 07:02:53 3: FHEMWEB WEB CSRF error: csrf_300490456839183 ne csrf_369192453595965 for client WEB_127.0.0.1_54032. For details see the csrfToken FHEMWEB attribute.
2017.08.24 07:02:53 0: Server shutdown
2017.08.24 07:02:54 1: registering fhem as Windows Service
2017.08.24 07:02:54 1: starting fhem as a service
2017.08.24 07:02:54 1: Including C:/FHEM/fhem-5.8/fhem.cfg
2017.08.24 07:02:54 3: telnetPort: port 7072 opened
2017.08.24 07:02:54 3: WEB: port 8083 opened
2017.08.24 07:02:54 3: WEBphone: port 8084 opened
2017.08.24 07:02:54 3: WEBtablet: port 8085 opened
2017.08.24 07:02:54 2: eventTypes: loaded 11 events from ./log/eventTypes.txt
2017.08.24 07:02:57 3: PLC S7_connect: connect to PLC with maxPDUlength=240
2017.08.24 07:02:58 1: Including ./log/fhem.save
2017.08.24 07:02:58 3: initialUsbCheck return value: This command is not yet supported on windows
2017.08.24 07:02:58 2: SecurityCheck:  WEB,WEBphone,WEBtablet has no associated allowed device with basicAuth. telnetPort has no associated allowed device with password/globalpassword.  Restart FHEM for a new check if the problem is fixed, or set the global attribute motd to none to supress this message.
2017.08.24 07:02:58 0: Featurelevel: 5.8
2017.08.24 07:02:58 0: Server started with 15 defined entities (fhem.pl:14854/2017-08-06 perl:5.024001 os:MSWin32 user:SYSTEM pid:10628)
2017.08.24 07:02:58 3: FHEMWEB WEB CSRF error: csrf_369192453595965 ne csrf_314477705101806 for client WEB_127.0.0.1_54045. For details see the csrfToken FHEMWEB attribute.


Devices wie im Wiki vorgegeben!
SmarthomeSkill ohne CustomSkill


amenomade

Zitat"payload":{"discoveredAppliances":[]}

Frage:
- hast Du die gewünsche Geräte dem room "alexa" zugewiesen?
- haben die Geräte ein attr genericDeviceType?
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Hannibal1990

Ja sind im Alexaroom alexaroom
Und generic device Type Switch

amenomade

#2988
Ich meine nicht Alexaroom sondern room.

Du hast ein Filter im config.json:"filter": "room=alexa"

Dies wird so benutzt:
Zitat[2017-8-24 07:03:41] [FHEM] fetching: http://192.168.178.34:8083/fhem?cmd=jsonlist2%20room=alexa&fwcsrf=csrf_314477705101806&XHR=1

Dewegen müssen die Geräte im Room alexa sein.
attr <device> room <beliebige Räume>,alexa
Pi 3B, Alexa, CUL868+Selbstbau 1/2λ-Dipol-Antenne, USB Optolink / Vitotronic, Debmatic und HM / HmIP Komponenten, Rademacher Duofern Jalousien, Fritz!Dect Thermostaten, Proteus

Hannibal1990

#2989
Jetzt gehts danke  ;D

War wirklich an dem Filter gelegen, bzw. an dem falschen room  ::)

Aber das mit dem InvalidAccessTokenError ist trotzdem komisch.
Aber solang es geht...

Jetzt wenn ich sage "Alexa schalte name ein" dann sollte er den Schalter einschalten oder?

Esjay

Zitat von: Hannibal1990 am 24 August 2017, 11:53:56
Jetzt gehts danke  ;D

War wirklich an dem Filter gelegen, bzw. an dem falschen room  ::)

Aber das mit dem InvalidAccessTokenError ist trotzdem komisch.
Aber solang es geht...

Jetzt wenn ich sage "Alexa schalte name ein" dann sollte er den Schalter einschalten oder?

Wenn das Device in der App angezeigt wird, es nicht als offline gekennzeichnet ist, und dann noch die dementsprechenden Attribute besitzt, ist deine Annahme richtig.

Hannibal1990

Ja funktioniert, sehr fein  8)

Jetzt habe ich nur noch ein letzte aber spezifischere Frage.

Ich habe auch meine S7 mit FHEM gekoppelt.
Jetzt ist mein Ziel, dass ich Alexa einen Sprachbefehl gebe,
welcher eine Schalter schaltet und diese Aktion einen
Eingang/Merker in meiner S7 schaltet.

Ich habe mal was gelesen von Notify oder ander berichteten
über homebridgemapping.
Aber so richtig schlau bin ich daraus nicht geworden.

Hat da schon jemand Erfahrung gemacht und kann mir Starthilfe geben?

Esjay

Zitat von: Hannibal1990 am 24 August 2017, 13:43:54
Ja funktioniert, sehr fein  8)

Jetzt habe ich nur noch ein letzte aber spezifischere Frage.

Ich habe auch meine S7 mit FHEM gekoppelt.
Jetzt ist mein Ziel, dass ich Alexa einen Sprachbefehl gebe,
welcher eine Schalter schaltet und diese Aktion einen
Eingang/Merker in meiner S7 schaltet.

Ich habe mal was gelesen von Notify oder ander berichteten
über homebridgemapping.
Aber so richtig schlau bin ich daraus nicht geworden.

Hat da schon jemand Erfahrung gemacht und kann mir Starthilfe geben?

Dann wirst du dich noch einmal mit beschäftigen müssen. Gerade wenn du aus der S7 Welt kommst ( verbringe dort beruflich auch schon ein paar Jahre) sollte es dir nicht all zu schwer fallen, mit Notify und DOIF umzugehen. Ist halt nur die Syntax die sich einmal einbrennen muss. Ansonsten gibt es auch auf Youtube diverse Videos zu dem Thema, falls du eher der Visuelle Mensch bist.

Grobes Beispiel für dein Vorhaben.

Dummy Schalter definieren, alexaName--> Schalter--> attr usw.
Doif
define SchalterS7 DOIF ([Schalter:state] eq "on")(set S7diesdas on)DOELSEIF([Schalter:state] eq "off")(set S7diesdas off)

Notify
define S7Schalter notify Schalter set S7diesdas $EVENT

Wie gesagt, viele Wege führen nach Rom. Am besten ist, du ließt dich wirklich in die Themen ein, versuchst dich daran, und wenn es nicht klappt, dann kannst du fragen. Die Erfahrung zeigt, das man dir wohlwollender gegenübersteht, wenn du deine bisherigen versuche aufzeigst, anstatt einfach zu fragen, und somit den eindruck vermittelst "Macht ihr mal,hab gerade keine Lust". Ist nur ein Rat, das soll nicht heißen, dass du diesen Eindruck bisher gemacht hast.

LG

Hannibal1990

Ok danke,

ich lese mich dementsprechend mehr in das Thema ein und melde mich wieder wenn ich gar nicht weiterkomme.
Aber danke trotzdem für die schnelle und nette Hilfe  :D


onkeloki

Hallo ich versuche gerade meine Wifilight devices mit dem alexa smart home skill zu benutzen.
"an" und "aus"  klappt wunderbar. (das ging auch schon mit der alten version)
nun habe ich auf 0.3.5 aktualisiert und beim Starten wirft alexa-fhem folgendes aus:

das sieht doch erst mal ganz gut aus dachte ich mir..

alexaname ist schrank


alexa mache schrank rot.. funktioniert aber noch nicht
habe ich etwas vergessen? muss ich noch "rot" in die eventmap aufnehmen oder so?
vielen dank

[8/24/2017, 6:10:09 PM] [FHEM] { reading: 'hue',
  cmd: 'HSV',
  max: 359,
  maxValue: 359,
  homekit2reading: [Function: bound ],
  device: 'LED.SCHRANK',
  informId: 'LED.SCHRANK-hue',
  characteristic_type: 'Hue',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' } }
[8/24/2017, 6:10:09 PM] [FHEM] { reading: 'saturation',
  cmd: 'HSV',
  max: 100,
  maxValue: 100,
  homekit2reading: [Function: bound ],
  device: 'LED.SCHRANK',
  informId: 'LED.SCHRANK-saturation',
  characteristic_type: 'Saturation',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' } }
[8/24/2017, 6:10:09 PM] [FHEM] { reading: 'brightness',
  cmd: 'HSV',
  max: 100,
  maxValue: 100,
  delay: true,
  homekit2reading: [Function: bound ],
  device: 'LED.SCHRANK',
  informId: 'LED.SCHRANK-brightness',
  characteristic_type: 'Brightness',
  log:
   { [Function: bound ]
     debug: [Function],
     info: [Function],
     warn: [Function],
     error: [Function],
     log: [Function],
     prefix: 'FHEM' }






TomLee

Bei mir geht das mit diesen Befehlen:

ZitatAlexa, stelle Schrank auf rot
oder
ZitatAlexa, schalte Schrank auf rot
oder
ZitatAlexa, mache Schrank auf rot

onkeloki

Zitat von: TomLee am 24 August 2017, 19:32:01
Bei mir geht das mit diesen Befehlen:

jedes mal "Schrank unterstützt das nicht"

TomLee

Mal im Verlauf nachgeschaut was Alexa  wirklich verstanden hat?
Mit der 0.3.5 funktioniert Milight ohne weitere Einstellungen bei mir.

onkeloki

Zitat von: TomLee am 24 August 2017, 20:02:35
Mal im Verlauf nachgeschaut was Alexa  wirklich verstanden hat?
Mit der 0.3.5 funktioniert Milight ohne weitere Einstellungen bei mir.

ah ups.. ich habe hier nur die alexa-fhem-0.3.4.tgz  gefunden.. also ich nutze 0.3.4.. habe ich mich jetzt vertan oder gibt es gar eine 0.3.5 und ich bin nur zu doof den download zu finden?