Jump to content

Welcome to Smart Home Forum by FIBARO

Dear Guest,

 

as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.

 

As a member you can:

  •     Start new topics and reply to others
  •     Follow topics and users to get email updates
  •     Get your own profile page and make new friends
  •     Send personal messages
  •     ... and learn a lot about our system!

 

Regards,

Smart Home Forum by FIBARO Team


qbasob

Member
  • Posts

    11
  • Joined

  • Last visited

About qbasob

Profile information

  • Country
    Polska
  • Gateway/s
    Home Center Lite

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

qbasob's Achievements

Newbie

Newbie (1/8)

9

Reputation

  1. You should use login and password configured in your Home Center. Default is admin/admin. Ther should not be any @ signs in login. For example: >[ON:POST:http://admin:[email protected]:80/api/devices/15/action/turnOn] : and @ are for basic authentication. More info here: https://en.wikipedia.org/wiki/Basic_access_authentication#URL_encoding But if you really need or want to use base64 encoded credentials in headers, I found this information that can help you: https://community.openhab.org/t/http-request-with-credentials/30365/2 I'll be more than happy if the administration will move my posts to another thread.
  2. Maybe I will make some detailed tutorial with screenshots, if I'll find some free time next week. But basically: 1. Create an account on https://myopenhab.org/ (this is openHAB cloud service, that you will connect with Google Home in later steps) 2. Follow this instructions to install openHABian (Raspbian image with openHAB already installed) on RaspberryPi (they recommend RaspberryPI 2 or newer, I'm using my old RaspberryPi 1 and it works just fine): https://docs.openhab.org/installation/openhabian.html#raspberry-pi 3. In openHAB PaperUI go to Addons->Bindings->HTTP Binding and click install (we need that binding to be able to connect to Fibaro Home Center API) 4. In openHAB PaperUI go to Addons->Misc->openHAB Cloud Connector and click install (we need that binding to be able to connect to https://myopenhab.org/ ) 5. Go to https://myopenhab.org/account and set openHAB UUID and openHAB Secret. You will find both UUID and Secret in your openHAB files on your RaspberryPi, more info here: https://docs.openhab.org/addons/ios/openhabcloud/readme.html 6. If everything went OK you should now see green ONLINE message on top of https://myopenhab.org/ 7. Now you need to add your lights to openHAB. You need to manually create file with any name and '.items' extension in openHAB 'items' directory. For example 'default.items' or 'home.items' in openHAB items directory. 8. This file shoud contain information about every light you want to control, like this (every light should be defined in new line): Dimmer some_light "Some Light" ["Lighting"] { http=">[ON:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOn] >[OFF:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOff] >[*:GET:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/callAction?deviceID=<device_id>&name=setValue&arg1=%2$s]" } Dimmer some_other_light "Some Other Light" ["Lighting"] { http=">[ON:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOn] >[OFF:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOff] >[*:GET:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/callAction?deviceID=<device_id>&name=setValue&arg1=%2$s]" } Switch some_not_dimmable_light "Some Not Dimmable Light" ["Lighting"] { http=">[ON:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOn] >[OFF:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOff]" } You can use 'Switch' instead of 'Dimmer' and remove last command: >[*:GET:http://...] if your light is not dimmable. 9. On your phone go to Google Home app -> Home Control -> (+) and select 'openHAB' from the list 10. Login to the account that you created in first step, then click 'Allow'. 11. If everythhing went OK you should now see list of lights from openHAB in your Google Home. 12. If you will edit/add/remove lights in .items file you will need to ask Google Home/Google Assistant to 'sync my devices'. That will refresh information about your lights in Google Home Control. One more thing about UUID, secret and .items file: If you are on Windows, then you should see OPENHABIANPI device in your Network folder. If that is the case: - items file should be created in: \\OPENHABIANPI\openHAB-conf\items - UUID is located in 'uuid' file in: \\OPENHABIANPI\openHAB-share\openhab2-userdata - Secret is located in 'secret' file in: \\OPENHABIANPI\openHAB-share\openhab2-userdata\openhabcloud
  3. @pooh To learn more about Fibaro Rest API create an account on https://developer.fibaro.com, then go to Documentation -> FGHC Rest API. There is list of actions also available on http://<your_fibaro_home_center_ip>/docs (for example, mine is http://192.168.1.44/docs). I've defined all my lights manually in openHAB adding it to .items file (https://docs.openhab.org/configuration/items.html) using http binding (https://docs.openhab.org/addons/bindings/http1/readme.html) Basically, every line in my .items file looks like: Dimmer Kitchen_Lgt "Kitchen Ceiling Light" ["Lighting"] { http=">[ON:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOn] >[OFF:POST:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/devices/<device_id>/action/turnOff] >[*:GET:http://<login>:<password>@<fibaro_hcl_ip_address>:80/api/callAction?deviceID=<device_id>&name=setValue&arg1=%2$s]" } At this moment I'm only sending commands from Google Home, via openHAB to HCL. Later, I will add the binding that will get current light status back, so the "Is the <light name> on?" and "Is the <light name> off?" Google Home commands could work.
  4. Ok, I've tested it and it works great. Finally I can use short commands using openHAB installed on a RaspberryPi and configured to communicate with Fibaro Home Center via Rest API. Demo:
  5. openHAB now supports Google Assistant Home Control API, thanks to Mehmet Arziman that made the full integration by himself in his free time (something that apparently whole Fibaro team is unable to do). I will check it later, but it sounds great. More info here: https://community.openhab.org/t/official-google-assistant-integration-for-openhab/40425
  6. Unfortunately, Google changed the way linking is done. This is information from the HA-Bridge repository (https://github.com/bwssytems/ha-bridge):
  7. Yes, I'm doing this on Android. What is your problem? Which of the steps doesn't work for you?
  8. Hi, I've answered how to unlink Fibaro here:
  9. Start talking with Fibaro in Google Assitant on your phone. Three dot menu should appear on the top right corner of the conversation: Click on it, and then on 'About Fibaro'. New page will appear, with informations about Fibaro. Scroll down, there will be an option to unlink Fibaro from your account.
  10. Honestly, I was hoping that you would eventually use the Google Smart Home API [https://developers.google.com/actions/smarthome/] and you will not have to use 'talk to Fibaro' command. Other smart device manufacturers have made their integrations using the above API and then everything works from Google Home / Google Assistant directly. For example, 'Ok Google, turn on the lights in the living room' immediately turns on the lights. If there is such API, why not use it? Who will want to repeat the whole 'Ok Google, tell Fibaro to...' thing every time.
  11. Szczerze, liczyłem na to że jednak ostatecznie użyjecie Google Smart Home API [https://developers.google.com/actions/smarthome/] i nie trzeba będzie bawić się w to całe 'talk to Fibaro'. Inni producenci smart sprzętów zrobili swoje integracje z użyciem powyższego API i wtedy wszystko działa z poziomu Google Home/Google Assistant bezpośrednio. Np. 'Ok Google, turn on the lights in the living room' od razu włącza światła. Istnieje taka możliwość, dlaczego z niej nie skorzystać? Komu będzie się chciało za każdym razem powtarzać całe to: 'Ok Google, tell Fibaro to...'
×
×
  • Create New...