Homematic Interface Layer für Hue Lampen und alles andere

diverse Zusatzsoftware

Moderator: Co-Administratoren

Benutzeravatar
Centauri2k
Beiträge: 684
Registriert: 17.09.2016, 21:13

Re: Homematic Interface Layer für Hue Lampen

Beitrag von Centauri2k » 21.11.2016, 18:20

Okay, verstehe. Ich dachte die config.json ist die selbe wie von der Homebridge.

Ich habe das Plugin auf einem Pi installiert wo auch meine Homebridge drauf läuft.

Aber wie gesagt, bei mir gibt es den Ordner "node_modules" in "/home/pi/" nicht.

Benutzeravatar
thkl
Beiträge: 2765
Registriert: 15.07.2013, 13:32
Wohnort: dickes B
Danksagung erhalten: 5 Mal

Re: Homematic Interface Layer für Hue Lampen

Beitrag von thkl » 21.11.2016, 20:01

ok also ich hab das mal soweit im Github aktuallisiert.
Installation aus dem Github auf einem Pi wie folgt:
  • auf den PI nach /home/pi ssh'en
  • wget -nv -O- https://raw.githubusercontent.com/thkl/ ... install.sh | bash -
  • mit cd .hm_virtual_interface ins config Verzeichnis wechseln und
  • mit nano config.json die config.sjon editieren. Einträge

    Code: Alles auswählen

    {"ccu_ip":"192.168.178.80",
      "plugins": [
        {
       "type":"HuePlugin",
       "name":"HueMain",
       "hue_bridge_ip":"192.168.XXX.XXX",
       "hue_username":"fooBar"
        },
        {
       "type":"NetAtmoPlugin",
       "name":"NetAtmo",
       "auth": {
        "client_id": "xxx",
             "client_secret": "xxx",
             "username": "xx@yy.com",
             "password": "xxx"
            }
        }
        ]
    }
    
    Zur Config siehe http://homematic-forum.de/forum/viewtop ... 80#p322411
  • Wichtig ist erstmal die CCU IP den Rest macht das Hue Plugin
  • ins Programmverzeichnis wechseln - cd /home/pi/Homematic-Virtual-Interface und start mit bin/hmvi
Sollte dann sowas hier auswerfen :

Code: Alles auswählen

[2016-11-21 19:51:04] Homematic Virtual Device Bridge
[2016-11-21 19:51:04] 2016 by thkl https://github.com/thkl/Homematic-Hue-Interface
[2016-11-21 19:51:04] ============================================================
[2016-11-21 19:51:04] [HomematicLogicalLayer] welcome. will create a logical layer for CCU at 192.168.blabla
[2016-11-21 19:51:04] [HomematicLogicalLayer] MyIP is 192.168.blabla
[2016-11-21 19:51:04] [Homematic Virtual Interface.Server] Loaded plugin: HuePlugin
[2016-11-21 19:51:04] [HuePlugin] trying to find your Hue bridge ...
[2016-11-21 19:51:04] [Homematic Virtual Interface.Server] HuePlugin initialized.
[2016-11-21 19:51:11] [HuePlugin] Scan complete 192.168.blabla
[2016-11-21 19:51:11] [HuePlugin] Saved the Philips Hue bridge ip address 192.168.blabla to your config to skip discovery.
[2016-11-21 19:51:11] [HuePlugin] trying to create a new user at your bridge
[2016-11-21 19:51:11] [HuePlugin] Please press the link button on your Philips Hue bridge within 30 seconds.
[2016-11-21 19:51:23] [HuePlugin] trying to create a new user at your bridge
[2016-11-21 19:51:23] [HuePlugin] saved your user to config.json
Wenns so ausschaut ist erstmal alles schick.
Dann mit dem Browser die IP des PI's aufrufen Port 8181 Es sollte die Configseite erscheinen.
Man kann aber schon mal im Hue Plugin schauen, wieviele Lampen er gefunden hat.

Links ist ein Button "Install Mode". Den betätigen. Dadurch schickt der Layer alle Geräte an die CCU und sie sollten dort im Posteingang erscheinen.

Das wäre es erstmal ab dann sollten sich die Lampen wie normale RGBW Controller verhalten.
Zuletzt geändert von thkl am 30.12.2016, 21:11, insgesamt 9-mal geändert.

Benutzeravatar
Centauri2k
Beiträge: 684
Registriert: 17.09.2016, 21:13

Re: Homematic Interface Layer für Hue Lampen

Beitrag von Centauri2k » 21.11.2016, 20:13

Hallo, was genau meinst du mit clonen? Einfach die URL im Terminal eingeben?

Benutzeravatar
thkl
Beiträge: 2765
Registriert: 15.07.2013, 13:32
Wohnort: dickes B
Danksagung erhalten: 5 Mal

Re: Homematic Interface Layer für Hue Lampen

Beitrag von thkl » 21.11.2016, 20:16

Ok wenn das alles rennt, hat das DIng natürlich das gleiche Problem wie zb die Homebridge. Nach dem Kappen der ssh Verbindung ist Schluss. Daher habe ich gleich das passende Servicefile mitgeliefert. Beenden des HMVI mit CTRL-C

Installation wie dann folgt.

Code: Alles auswählen

cd /home/pi/Homematic-Virtual-Interface
sudo cp lib/hmvi /etc/init.d/hmvi
sudo chmod +x /etc/init.d/hmvi
sudo update-rc.d hmvi defaults

sudo /etc/init.d/hmvi start
Unter /var/log/messages/hmvi.log kann dann geschaut werden ob es startete.
Aber merkt man ja auch am Webserver und das die CCU nicht rumheult ....

Benutzeravatar
thkl
Beiträge: 2765
Registriert: 15.07.2013, 13:32
Wohnort: dickes B
Danksagung erhalten: 5 Mal

Re: Homematic Interface Layer für Hue Lampen

Beitrag von thkl » 21.11.2016, 20:17

Stanni hat geschrieben:Hallo, was genau meinst du mit clonen? Einfach die URL im Terminal eingeben?
Terminalbefehle sind fett geschrieben ;)

Benutzeravatar
Centauri2k
Beiträge: 684
Registriert: 17.09.2016, 21:13

Re: Homematic Interface Layer für Hue Lampen

Beitrag von Centauri2k » 21.11.2016, 23:20

Bei mir klappt es irgendwie nicht richtig:

Code: Alles auswählen

root@raspberrypi:/home/pi/Homematic-Virtual-Interface# bin/hmvi
[2016-11-21 22:12:00] Homematic Virtual Interface Core
[2016-11-21 22:12:00] 2016 by thkl https://github.com/thkl/Homematic-Virtual-Interface
[2016-11-21 22:12:00] ================================================================
[2016-11-21 22:12:01] [Homematic Virtual Interface.Config] There was a problem reading your config.json file (/root/.hm_virtual_interface/config.json).
[2016-11-21 22:12:01] [Homematic Virtual Interface.Config] Please verify your config.json at http://jsonlint.com
[2016-11-21 22:12:01] [HomematicLogicalLayer] please setup your ccu ip in config.json
[2016-11-21 22:12:01] [HomematicLogicalLayer] MyIP is 192.168.179.47
[2016-11-21 22:12:01] [HomematicLogicalLayer] please restart your ccu to establish a connection
[2016-11-21 22:12:01] [Homematic Virtual Interface.Server] No plugins found. See the README for information on installing plugins.
Die config.json sieht so aus:

Code: Alles auswählen

{
"192.168.179.23":"",
"192.168.179.64":"",
"hue_username":""
}

Benutzeravatar
thkl
Beiträge: 2765
Registriert: 15.07.2013, 13:32
Wohnort: dickes B
Danksagung erhalten: 5 Mal

Homematic Interface Layer für Hue Lampen

Beitrag von thkl » 21.11.2016, 23:25

Neee

{"ccu_ip":"192.168.179.23","hue_bridge_ip ....

Und so weiter

Das ist ein Json Format das geht immer "key":value ....

Und da Value ein String ist wird es in " gesetzt


sent from a solid block of aluminum.

Benutzeravatar
Centauri2k
Beiträge: 684
Registriert: 17.09.2016, 21:13

Re: Homematic Interface Layer für Hue Lampen

Beitrag von Centauri2k » 21.11.2016, 23:28

so?:

Code: Alles auswählen

{
	"ccu_ip": "192.168.179.23",
	"hue_bridge_ip": "192.168.179.64",
	"hue_username": ""
}

Code: Alles auswählen

root@raspberrypi:/home/pi/Homematic-Virtual-Interface# bin/hmvi
[2016-11-21 22:48:43] Homematic Virtual Interface Core
[2016-11-21 22:48:43] 2016 by thkl https://github.com/thkl/Homematic-Virtual-Interface
[2016-11-21 22:48:43] ================================================================
[2016-11-21 22:48:43] [HomematicLogicalLayer] welcome. will create a logical layer for CCU at 192.168.179.23
[2016-11-21 22:48:43] [HomematicLogicalLayer] MyIP is 192.168.179.47
[2016-11-21 22:48:43] [HomematicLogicalLayer] please restart your ccu to establish a connection
[2016-11-21 22:48:43] [Homematic Virtual Interface.Server] No plugins found. See the README for information on installing plugins.
Und warum sucht er in root? die config.json ist doch in /home/pi/...." oder?

Code: Alles auswählen

[Homematic Virtual Interface.Config] There was a problem reading your config.json file (/root/.hm_virtual_interface/config.json).

Benutzeravatar
thkl
Beiträge: 2765
Registriert: 15.07.2013, 13:32
Wohnort: dickes B
Danksagung erhalten: 5 Mal

Re: Homematic Interface Layer für Hue Lampen

Beitrag von thkl » 21.11.2016, 23:52

Weil Du Root bist steht ja da er im Users Home sucht und das bei Root eben nicht /home/root sondern /root ist.

Lass das einfach als Pi User laufen. Der braucht kein Root.


sent from a solid block of aluminum.

Benutzeravatar
Centauri2k
Beiträge: 684
Registriert: 17.09.2016, 21:13

Re: Homematic Interface Layer für Hue Lampen

Beitrag von Centauri2k » 21.11.2016, 23:54

Ach so, also auch hier wie bei der Homebridge am besten als Pi User installieren?

Wenn man dies hier alles gemacht hat: http://homematic-forum.de/forum/viewtop ... 10#p320794

muss man dann trotzdem noch "npm i Homematic-Hue-Interface" ausführen?

Edit:

Jetzt ist die Meldung mit root zwar weg, aber es scheint immer noch nicht zu klappen:

Code: Alles auswählen

[2016-11-21 22:51:00] Homematic Virtual Interface Core
[2016-11-21 22:51:00] 2016 by thkl https://github.com/thkl/Homematic-Virtual-Interface
[2016-11-21 22:51:00] ================================================================
[2016-11-21 22:51:00] [HomematicLogicalLayer] welcome. will create a logical layer for CCU at 192.168.179.23
[2016-11-21 22:51:00] [HomematicLogicalLayer] MyIP is 192.168.179.47
[2016-11-21 22:51:00] [HomematicLogicalLayer] please restart your ccu to establish a connection
[2016-11-21 22:51:00] [Homematic Virtual Interface.Server] No plugins found. See the README for information on installing plugins.

Antworten

Zurück zu „Sonstige Addons“