Hallo zusammen.
Ich habe nun den Fhem Connector auf einem PI2 laufen. Meine Fhem Hauptinstallation auf einem Nuc, wo auch alle Geräte installiert sind.
Per Fhem2Fhem sind beide verbunden. Was muss den in die Fhem-cfg rein, damit ich nun auch die mit "alexaName" - Geräte finde?
Gruß
In die alexa-config die connection auf das andere fhem eintragen oder vorhandene connection anpassen...
EDIT: alternativ ginge verm. auch die fhem2fhem-Clone-Dummies entsprechend Alexa-tauglich zu machen. Allerdings würde ich die Connection entsprechend einstellen...
Gruß, Joachim
hmmm....das habe ich versucht. Wenn ich aber die Lokal Ip gegen die andere Fhem-Ip austausche, geht das alexaFHEM.ProxyConnection Reading auf "stopped".
ZitatOriginal{
"sshproxy" : {
"ssh" : "/usr/bin/ssh",
"description" : "FHEM Connector"
},
"connections" : [
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "127.0.0.1",
"filter" : "alexaName=..*"
}
]
}
ZitatAngepasst{
"sshproxy" : {
"ssh" : "/usr/bin/ssh",
"description" : "FHEM Connector"
},
"connections" : [
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "192.178.168.29",
"filter" : "alexaName=..*"
}
]
}
Was passiert, wenn du einfach eine 2te Connection einträgst?
Was steht im Alexa-Log (NICHT fhem Log)?
Hast du das "remote-fhem" abgesichert!?
Dann musst du das auch in der Connection angeben...
Gruß, Joachim
Hi MadMax.
Verstehe zwar Deine Fragen, weiß aber nicht, ob es so richtig angelegt ist.
Zitat{
"sshproxy" : {
"ssh" : "/usr/bin/ssh",
"description" : "FHEM Connector"
},
"connections" : [
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "127.0.0.1",
"filter" : "alexaName=..*"
}
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "192.168.178.29",
"filter" : "alexaName=..*",
"user" : "xxxxx",
"password" : "xxxxxx",
}
]
}
Alexa "stopped" den Service nach Restart direkt wieder.
Gruß
Was steht im Alexa-Log!?
Gruß, Joachim
[2020-3-4 11:43:31] os.homedir()=/opt/fhem
[2020-3-4 11:43:31] this is alexa-fhem 0.5.48
[2020-3-4 11:43:31] connecting to FHEM ...
[2020-3-4 11:43:31] [FHEM] defaults to: will not send proactive events
[2020-3-4 11:43:32] [FHEM] trying longpoll to listen for fhem events
[2020-3-4 11:43:32] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1583318612994
[2020-3-4 11:43:33] [FHEM] got csrfToken:
[2020-3-4 11:43:33] [FHEM] Checking devices and attributes...
[2020-3-4 11:43:33] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&XHR=1
[2020-3-4 11:43:33] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&XHR=1
[2020-3-4 11:43:33] [FHEM] waiting for events ...
[2020-3-4 11:43:33] [FHEM] Fetching FHEM devices...
[2020-3-4 11:43:33] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20alexaName=..*&XHR=1
[2020-3-4 11:43:33] [FHEM] alexa device is alexa
[2020-3-4 11:43:33] [FHEM] alexa will not send proactive events
[2020-3-4 11:43:33] [FHEM] alexa uses ID: 5e5ea2fd-f33f-930e-49d5-7ec67c96f5c41c9d
[2020-3-4 11:43:33] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.48%22%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:43:33] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bget%20alexa%20proxyToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:43:33] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20alexa%20.eventToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:43:33] Server listening on: http://127.0.0.1:53829 for proxy connections
[2020-3-4 11:43:33] *** SSH: checking proxy configuration
[2020-3-4 11:43:33] sshautoconf: home=/opt/fhem, spath=/opt/fhem/.alexa, cpath=./alexa-fhem.cfg, sshpath=/opt/fhem/.ssh
[2020-3-4 11:43:33] Passed config: {"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","port":53829},"connections":[{"port":"8083","name":"FHEM","uid":999,"webname":"fhem","server":"127.0.0.1","filter":"alexaName=..*"}]}
[2020-3-4 11:43:33] sshautoconf: SSH key seems to exist
[2020-3-4 11:43:34] sshautoconf: Our SSH key is known at the reverse proxy, good!
[2020-3-4 11:43:34] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20alexa%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
*** FHEM: connected
[2020-3-4 11:43:34] [FHEM] got: 0 results
[2020-3-4 11:43:34] BearerToken '...A4878' read from alexa
[2020-3-4 11:43:34] 39_alexa.pm is new version: true
[2020-3-4 11:43:34] sshautoconf: completed successfully
[2020-3-4 11:43:34] *** SSH: proxy configuration set up done
[2020-3-4 11:43:34] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
[2020-3-4 11:43:34] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:43:34] Starting SSH with -R 1234:127.0.0.1:53829 -oServerAliveInterval=90 -i /opt/fhem/.ssh/id_rsa -p 58824 fhem-va.fhem.de
[2020-3-4 11:43:34] [FHEM] got .eventToken
[2020-3-4 11:43:34] refreshing token
[2020-3-4 11:43:35] got fresh token
[2020-3-4 11:43:35] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
[2020-3-4 11:43:35] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:43:35] *** SSH: proxy connection established
[2020-3-4 11:43:35] SSH: Welcome at the reverse proxy! This pseudoshell does not react to any input - do not get irritated.
[2020-3-4 11:58:09] Got SIGTERM, shutting down alexa-fhem...
[2020-3-4 11:58:09] Reading alexaFHEM.ProxyConnection set to stopping;; alexa-fhem terminating
[2020-3-4 11:58:09] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20stopping%3B%3B%20alexa-fhem%20terminating%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:58:09] Stopping SSH ...
[2020-3-4 11:58:09] Reading alexaFHEM.ProxyConnection set to stopped
[2020-3-4 11:58:09] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20stopped%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 11:58:09] *** SSH: exited with 143
[2020-3-4 11:58:12] using config from ./alexa-fhem.cfg
[2020-3-4 11:58:12] There was a problem reading your config.json file.
[2020-3-4 11:58:12] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2020-3-4 11:58:12]
Startup rejected. Reason: SyntaxError: Unexpected token { in JSON at position 306
[2020-3-4 11:58:33] using config from ./alexa-fhem.cfg
[2020-3-4 11:58:33] There was a problem reading your config.json file.
[2020-3-4 11:58:33] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2020-3-4 11:58:33]
Startup rejected. Reason: SyntaxError: Unexpected token { in JSON at position 306
[2020-3-4 11:58:54] using config from ./alexa-fhem.cfg
[2020-3-4 11:58:54] There was a problem reading your config.json file.
[2020-3-4 11:58:54] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2020-3-4 11:58:54]
Startup rejected. Reason: SyntaxError: Unexpected token { in JSON at position 306
[2020-3-4 11:59:15] using config from ./alexa-fhem.cfg
[2020-3-4 11:59:15] There was a problem reading your config.json file.
[2020-3-4 11:59:15] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2020-3-4 11:59:15]
Startup rejected. Reason: SyntaxError: Unexpected token { in JSON at position 306
[2020-3-4 11:59:36] using config from ./alexa-fhem.cfg
[2020-3-4 11:59:36] There was a problem reading your config.json file.
[2020-3-4 11:59:36] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2020-3-4 11:59:36]
Startup rejected. Reason: SyntaxError: Unexpected token { in JSON at position 306
Steht doch drin:
Zitat
[2020-3-4 11:58:12] Please try pasting your config.json file here to validate it: http://jsonlint.com
Irgendwas hast du beim Abändern der config-json "kaputt" gemacht...
Ich hoffe du hast die alte aufgehoben!?
Denn einfach die IP-Adresse von fhem anpassen sollte nicht dazu führen (und auch davor schon nicht), dass alexa-fhem nicht mehr startet.
Es gibt bzgl. user/passwort zum Zugriff auf fhem auch das Attribut alexaFHEM-auth...
EDIT: zwischen den beiden connections-Einträgen fehlt ein "KOMMA"! Und nach password ist eines zuviel!
Also mindestens mal so:
Zitat
{
"sshproxy" : {
"ssh" : "/usr/bin/ssh",
"description" : "FHEM Connector"
},
"connections" : [
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "127.0.0.1",
"filter" : "alexaName=..*"
}
,
{
"port" : "8083",
"name" : "FHEM",
"uid" : 999,
"webname" : "fhem",
"server" : "192.168.178.29",
"filter" : "alexaName=..*",
"user" : "xxxxx",
"password" : "xxxxxx",
}
]
}
Gruß, Joachim
Natürlich nicht :-\
Wenn ich auf die Standardkonfiguration gehe,
{
"sshproxy" : {
"ssh" : "/usr/bin/ssh",
"description" : "FHEM Connector"
},
"connections" : [
{
"uid" : 999,
"port" : "8083",
"name" : "FHEM",
"server" : "127.0.0.1",
"filter" : "alexaName=..*",
"webname" : "fhem"
}
]
}
sieht das Log auch gut aus. Nur wenn ich an der Cfg umändere läuft nichts mehr.
[2020-3-4 13:18:26] os.homedir()=/opt/fhem
[2020-3-4 13:18:26] this is alexa-fhem 0.5.49
[2020-3-4 13:18:26] connecting to FHEM ...
[2020-3-4 13:18:26] [FHEM] defaults to: will not send proactive events
[2020-3-4 13:18:28] [FHEM] trying longpoll to listen for fhem events
[2020-3-4 13:18:28] [FHEM] starting longpoll: http://127.0.0.1:8083/fhem?XHR=1&inform=type=status;addglobal=1;filter=.*;since=null;fmt=JSON×tamp=1583324308638
[2020-3-4 13:18:28] [FHEM] got csrfToken:
[2020-3-4 13:18:28] [FHEM] Checking devices and attributes...
[2020-3-4 13:18:28] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7BAttrVal(%22global%22%2C%22userattr%22%2C%22%22)%7D&XHR=1
[2020-3-4 13:18:28] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20TYPE%3Dalexa&XHR=1
[2020-3-4 13:18:28] [FHEM] waiting for events ...
[2020-3-4 13:18:28] [FHEM] Fetching FHEM devices...
[2020-3-4 13:18:28] [FHEM] fetching: http://127.0.0.1:8083/fhem?cmd=jsonlist2%20alexaName=..*&XHR=1
[2020-3-4 13:18:29] [FHEM] alexa device is alexa
[2020-3-4 13:18:29] [FHEM] alexa will not send proactive events
[2020-3-4 13:18:29] [FHEM] alexa uses ID: 5e5f9638-f33f-930e-9751-d87881d2a297e1c4
[2020-3-4 13:18:29] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22alexa-fhem%20version%22%7D%20%3D%20%220.5.49%22%7D%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 13:18:29] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bget%20alexa%20proxyToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 13:18:29] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Blist%20alexa%20.eventToken%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 13:18:29] Server listening on: http://127.0.0.1:52620 for proxy connections
[2020-3-4 13:18:29] *** SSH: checking proxy configuration
[2020-3-4 13:18:29] sshautoconf: home=/opt/fhem, spath=/opt/fhem/.alexa, cpath=./alexa-fhem.cfg, sshpath=/opt/fhem/.ssh
[2020-3-4 13:18:29] Passed config: {"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","port":52620},"connections":[{"uid":999,"port":"8083","name":"FHEM","server":"127.0.0.1","filter":"alexaName=..*","webname":"fhem"}]}
[2020-3-4 13:18:29] sshautoconf: SSH key seems to exist
[2020-3-4 13:18:30] sshautoconf: Our SSH key is known at the reverse proxy, good!
[2020-3-4 13:18:30] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bjsonlist2%20alexa%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
*** FHEM: connected
[2020-3-4 13:18:30] [FHEM] got: 0 results
[2020-3-4 13:18:30] 39_alexa.pm is new version: true
[2020-3-4 13:18:30] sshautoconf: completed successfully
[2020-3-4 13:18:30] *** SSH: proxy configuration set up done
[2020-3-4 13:18:30] Reading alexaFHEM.ProxyConnection set to starting;; starting SSH
[2020-3-4 13:18:30] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20starting%3B%3B%20starting%20SSH%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 13:18:30] Starting SSH with -R 1234:127.0.0.1:52620 -oServerAliveInterval=90 -i /opt/fhem/.ssh/id_rsa -p 58824 fhem-va.fhem.de
[2020-3-4 13:18:30] BearerToken '...4EA09' read from alexa
[2020-3-4 13:18:31] Reading alexaFHEM.ProxyConnection set to running;; SSH connected
[2020-3-4 13:18:31] [FHEM] executing: http://127.0.0.1:8083/fhem?cmd=%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%201%3B%3Bundef%7D%3Bsetreading%20alexa%20alexaFHEM.ProxyConnection%20running%3B%3B%20SSH%20connected%3B%7B%24defs%7Balexa%7D-%3E%7B%22active%22%7D%20%3D%200%3B%3Bundef%7D&XHR=1
[2020-3-4 13:18:31] *** SSH: proxy connection established
[2020-3-4 13:18:31] SSH: Welcome at the reverse proxy! This pseudoshell does not react to any input - do not get irritated.
Wie, mit welchem Editor änderst du denn?
Du kannst die cfg direkt "in fhem" editieren...
Füge doch mal ein OHNE die von mir "markierten" Fehler...
...dann sollte es laufen...
Du kannst ja auch eine 2te Web-Instanz auf dem "remote fhem" anlegen OHNE user/passwort zum Test.
Dann entweder RICHTIG! eine 2te connection dorthin eintragen oder mal die IP von 127.0.0.1 auf die gewünschte ändern...
Gruß, Joachim