Code Monkey home page Code Monkey logo

ghome-fhem's Introduction

  1. ghome-fhem installieren GitHub repo lokal auschecken Im Ordner folgende Kommandos ausführen: npm install ssl zertifikat mit ./createKey.sh erzeugen. -> Passwort mindestens 4 stellen, alle Fragen beantworten /.ghome/config.json anpassen (siehe config-sample.json) Bitte passt Benutzername und Passwort an, ersetzt auch die Werte von oauthClientId, oauthClientSecret und authtoken, gerne auch duch zufällig generierte Werte. So stellt ihr sicher, dass der Zugang für unbefugte Personen zumindest erschwert wird. bin/ghome starten

  2. Port 3000 von außen erreichbar machen Hinweis: Gestet habe ich das aktuell nur mit einem Load Balancer dazwischen, welcher ein gültiges SSL Zertifikat mit ausliefert. Es könnte also sein, dass Google mit selbst signierten Zertifikaten Probleme macht. Let's Encrypt stellt beispielsweise kostenlose Zertifikate aus.

  3. Google Action erstellen Folgender Anleitung folgen: https://developers.google.com/actions/sdk/create-a-project Den Inhalt der action.json mit dem Inhalt der action-sample.json aus diesem Ordner ersetzen. https://SERVICEURL wird dabei durch die URL ersetzt, unter welcher der Dienst bei euch erreichbar ist.

3.2 OAuth Setup Damit die Verbindung funktioniert, muss in der Actions on Google Konsole "Account linking" konfiguriert werden. Auf der Overview-Seite eures Assistenten wählt ihr dazu den sechsten Punkt, Account linking (optional), aus. Wählt als Grant type "Authorization code" aus, Client ID und Client secret entsprechen den Werten, die in eurer config.json unter oauthClientId und oauthClientSecret stehen. Fügt für die Authorization URL and die URL aus dem vorherigen Schritt "/oauth" an, sodass eine URL wie "https://SERVICEURL/oauth" entsteht. Für die Token URL gilt dasselbe Format. Schreibt in die Testing instructions irgendwas rein und speichert die Einstellungen. 3.3 Simulator aktivieren Im Menü links "Simulator" aktivieren. Im Menü oben lässt sich nun unter dem Icon, welches den Laptop und das Handy zeigt, "Testing on Device" aktivieren. In der Google Home-App auf einem Smartphone oder Tablet lässt sich nun im Smart Home-Bereich ein neuer Gerätetyp hinzufügen. In der Liste aller Typen taucht jetzt auch euer eigener auf, er beginnt mit [test]. Eventuell müsst ihr euer Konto mehrmals verknüpfen, bei mir hat es nicht immer beim ersten mal geklappt.

  1. “ok google, schalte <gerät> ein” “ok google, schalte das Licht im Raum aus” “ok google, stell die Temperatur in auf Grad” “ok google, dimme das Licht in Raum auf Prozent” “ok google, wie warm ist es in ?“ “ok google, ist das Licht in an?“

ghome-fhem's People

Contributors

fhempy avatar yanniks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

fhempy

ghome-fhem's Issues

Thermostats without currentTemperature not working

Hi,
it would be great if you could change the procedure how a thermostat is identified. EQ3BT thermostats don't have a CurrentTemperature value and therefore don't work as long as no mapping is created. My recommendation is to change the if statement below to DesiredTemperature. I'm not sure if it would still work without CurrentTemperature mapping, if not, a workaround would be to set CurrentTemperature to DesiredTemperature.

if (device.mappings.CurrentTemperature) {

Thanks,
Dominik

SyntaxError: Unexpected token ...

Hi,

i hope you can help me. I installed as mentioned in the readme.
When i start ./bin/ghome i get the error below in server.js:1578.
I checked nodejs versions:
node -v : v4.8.0
nodejs -v : v6.14.1

Alexa-fhem is running on my system without problems.

Code: [Auswählen]
fhem@raspberrypi:~/ghome-fhem$ ./bin/ghome
/opt/fhem/ghome-fhem/lib/server.js:1578
responses.push(...handleControlOnOff.bind(this)(cmd, exec.params.on ? 1 : 0));
^^^

SyntaxError: Unexpected token ...
at exports.runInThisContext (vm.js:53:16)
at Module._compile (module.js:373:25)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/opt/fhem/ghome-fhem/lib/cli.js:3:14)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)

Thanks.
Stefan

Only switches supported till now?

Hi,

i have a last question.
I set everything up and get all switches working.
But non devices of type thermostat or sensor.

Is this the actual state of the coding?

Is a update planed? Can i offer some help?
Will it help to port the new alexa js coding from fhem to the ghome project?

Best regards,
Stefan

Error: No default engine was specified and no extension was provided.

Also, ich glaube ich habe irgendwo etwas falsch gemacht. Also, in meiner Home App versuche ich meinen [test] Dienst hinzu zufügen. Dann werde ich zu einer Seite auf meinem Server weitergeleitet auf der "Link your FHEM devices to Google assistant" steht, da gebe ich nun meine Gmail-Adresse und Passwort ein. Soweit so gut. Dann klicke ich auf Login und erhalte folgende Fehlermeldung:

Error: No default engine was specified and no extension was provided.
    at new View (/root/.ghome/node_modules/express/lib/view.js:61:11)
    at EventEmitter.render (/root/.ghome/node_modules/express/lib/application.js:570:12)
    at ServerResponse.render (/root/.ghome/node_modules/express/lib/response.js:1008:7)
    at login (/root/.ghome/lib/auth-provider.js:389:16)
    at /root/.ghome/lib/auth-provider.js:210:20
    at Layer.handle [as handle_request] (/root/.ghome/node_modules/express/lib/router/layer.js:95:5)
    at next (/root/.ghome/node_modules/express/lib/router/route.js:137:13)
    at Route.dispatch (/root/.ghome/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/root/.ghome/node_modules/express/lib/router/layer.js:95:5)
    at /root/.ghome/node_modules/express/lib/router/index.js:281:22

Nun meine Frage: Was mache ich falsch? Schonmal danke im voraus, und danke für dieses Projekt, es scheint ja auch zu funktionieren, wenn man nicht irgendwas vermurkst wie ich.

Problems with Actions on Google Konsole (Connection?)

Hi,

sorry for having again a question.
Ghome is running and detecting devices in my FHEM room.
For Actions on Google, I did everything as explained.
(Setup account linking, uploading action.json, ...)

If i open the Test console in Actions on Google and try something i get
{
"response": "We're sorry, but something went wrong. Please try again.",
"expectUserResponse": false,
"conversationToken": "",
"audioResponse": "",
"clientError": 0,
"is3pResponse": false
}

And i even do not see a request from Google in my Ghome on raspberry console.
But a request from Browser like:
https://mynoipadress:3000/
is accepted and answered with "Cannot GET / " in Browser and with "GET / 404 33.483 ms - 139" In raspberry console.

Do you have i Idea what i am missing?
Is it possible that i need a SSL certificate from Let's Encrypt and install it somehow on my raspberry?
What do you think?

I continued with the documentation and have choosen my test Fhem application in the Google Assistant Smart Home section and i get a login screen I entered my user and password from config.json and got on smartphone and in the console:
/login { redirect: '',
client_id: 'stefan',
redirect_uri: 'https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Ffhem-f0380',
state: 'CrACQU1uRHRTRWtudE1DeDBTY3lTYWx0eko3ZmZCRmpQNTItSzhqTFFwXzlOdHJUbG5GRE9oUGQyRXFJUHhBZkRhUktNdFlfc3JCWFpfakJCZHBKalpVTjR0YXJxX0hxWG1HLTRSdjJxS1VNaGFNU3BmODY3RHRkS2pnME1JMjRXZjBpYmZqQ1ZURmtIaVhxdFp2dXpoNlFmMXZDUVZNUGg1SU16ZUlqaFBfdDJSa0FuR01ycTZmeXVvdHVod0ZxOEpscDlNaXV0NGl2am9ianV2WlRNU1dlWTNFc3VJcHllT2NoRHRteDVrVmlHc2o4RXZ3RnFBUlNtWjQ2UnhXbWRrNU9icWtFU2R5MzlSdmwzWllpSEhTYlV2ZEZYYWpNWElTclVRaG5qeWQzUVlVZFA2dRIcYXNzaXN0YW50LWhhbmRvZmY6Ly9jb21wbGV0ZSI5aHR0cHM6Ly9vYXV0aC1yZWRpcmVjdC5nb29nbGV1c2VyY29udGVudC5jb20vci9maGVtLWYwMzgwKhZydW5nZS5zdGVmYW5AZ21haWwuY29tMg5maGVtLWYwMzgwX2Rldg',
username: 'stefan',
password: 'mypassword' }
getUser stefan
not a user undefined
not a user false
Error: No default engine was specified and no extension was provided.
at new View (/opt/fhem/ghome-fhem/node_modules/express/lib/view.js:61:11)
at Function.render (/opt/fhem/ghome-fhem/node_modules/express/lib/application.js:570:12)
at ServerResponse.render (/opt/fhem/ghome-fhem/node_modules/express/lib/response.js:1008:7)
at login (/opt/fhem/ghome-fhem/lib/auth-provider.js:389:16)
at /opt/fhem/ghome-fhem/lib/auth-provider.js:210:20
at Layer.handle [as handle_request] (/opt/fhem/ghome-fhem/node_modules/express/lib/router/layer.js:95:5)
at next (/opt/fhem/ghome-fhem/node_modules/express/lib/router/route.js:137:13)
at Route.dispatch (/opt/fhem/ghome-fhem/node_modules/express/lib/router/route.js:112:3)
at Layer.handle [as handle_request] (/opt/fhem/ghome-fhem/node_modules/express/lib/router/layer.js:95:5)
at /opt/fhem/ghome-fhem/node_modules/express/lib/router/index.js:281:22
POST /login 500 9.920 ms - 1182

Thanks again,
Stefan

FHEM Modul fehlt

Hi,

erstmal VIELEN DANK für die Arbeit die Du Dir machst ;-)

Ich habe mich heute mal dran versucht bin aber an einem fehlenden Device mit dem TYPE ghome gescheitert. Kann es sein das wir hier ein FHEM Modul benötigen?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.