Page 4 of 15

Re: Domoticz to Google Assistan integration

Posted: Sunday 16 June 2019 14:25
by DewGew
Do you get the devices in Google Home app?

Re: Domoticz to Google Assistan integration

Posted: Monday 17 June 2019 13:04
by DewGew
New functions: https://www.domoticz.com/wiki/Google_A ... ver_python

Speaker volume:
User: Set volume on living room speaker to 50%
Google Assistant: Sure

User: Turn up the volume on living room speaker?
Google Assistant: Alright (Volume increases with 1%)

When a device has low battery:

User: Lock front door.
Google Assistant: The front door lock has low battery. Locking the front door.

Re: Domoticz to Google Assistan integration

Posted: Wednesday 26 June 2019 23:14
by TotalImmortal64
I have this same issue as GreenSmart01 anyone have a solution? I am watching the Google Assistant web server and it is conecting just won't add to my Google Home? After authentication it just says Couldn't update the settings. Check your connection.

Re: Domoticz to Google Assistan integration

Posted: Friday 28 June 2019 17:36
by GreenSmart01
DewGew wrote: Sunday 16 June 2019 14:25 Do you get the devices in Google Home app?
nope.

Re: Domoticz to Google Assistan integration

Posted: Friday 28 June 2019 18:20
by GreenSmart01
Still the same error.

Re: Domoticz to Google Assistan integration

Posted: Friday 28 June 2019 18:21
by GreenSmart01
Can u tell me with ports to open and to what device?
domoticz to the https poort ?
3030 to the google poort ?

Re: Domoticz to Google Assistan integration

Posted: Friday 28 June 2019 19:26
by DewGew
Importhamn: On the left navigation menu under BUILD, click on Actions. Click on Add Your First Action and choose your app's language(s). Enter the URL for fulfillment,
e.g. https://<YOUR REVERSE PROXY URL>/smarthome (replace with your actual URL), click Done.
And dont forget to start test in actions also

Re: Domoticz to Google Assistan integration

Posted: Friday 28 June 2019 21:24
by GreenSmart01
DewGew wrote: Friday 28 June 2019 19:26 Importhamn: On the left navigation menu under BUILD, click on Actions. Click on Add Your First Action and choose your app's language(s). Enter the URL for fulfillment,
e.g. https://<YOUR REVERSE PROXY URL>/smarthome (replace with your actual URL), click Done.
And dont forget to start test in actions also
i did that, i see my [test] app

Re: Domoticz to Google Assistan integration

Posted: Saturday 29 June 2019 14:44
by GreenSmart01
its working :)
did it 3 times over and over again...
didnt know what was wrong.. :-) :-(

Re: Domoticz to Google Assistan integration

Posted: Monday 01 July 2019 21:46
by TotalImmortal64
Hmmm mine doesn't work still same issue I even tried to test from the PC in the test area and get an error. When I try to add the app in google home I still get the login and it accepts my credentials then I get the Couldn't update the setting. Check your connection error. Testing is Enabled should be working I would think? When I go to https://(my Domain)/smarthome from my browser I get an error 500 my web server shows this [01/Jul/2019 14:51:54] "GET /smarthome HTTP/1.1" 500 - so it is reaching the server. At a loss right now on what could be the issue.

Re: Domoticz to Google Assistan integration

Posted: Tuesday 02 July 2019 14:39
by DewGew
TotalImmortal64 wrote: Monday 01 July 2019 21:46 Hmmm mine doesn't work still same issue I even tried to test from the PC in the test area and get an error. When I try to add the app in google home I still get the login and it accepts my credentials then I get the Couldn't update the setting. Check your connection error. Testing is Enabled should be working I would think? When I go to https://(my Domain)/smarthome from my browser I get an error 500 my web server shows this [01/Jul/2019 14:51:54] "GET /smarthome HTTP/1.1" 500 - so it is reaching the server. At a loss right now on what could be the issue.
Check your Domoticz settings in config.py i had isseues with users. Try admin user

Re: Domoticz to Google Assistan integration

Posted: Tuesday 02 July 2019 18:13
by TotalImmortal64
DewGew wrote: Tuesday 02 July 2019 14:39
TotalImmortal64 wrote: Monday 01 July 2019 21:46 Hmmm mine doesn't work still same issue I even tried to test from the PC in the test area and get an error. When I try to add the app in google home I still get the login and it accepts my credentials then I get the Couldn't update the setting. Check your connection error. Testing is Enabled should be working I would think? When I go to https://(my Domain)/smarthome from my browser I get an error 500 my web server shows this [01/Jul/2019 14:51:54] "GET /smarthome HTTP/1.1" 500 - so it is reaching the server. At a loss right now on what could be the issue.
Check your Domoticz settings in config.py i had isseues with users. Try admin user
So I have the users all setup correctly and I am getting account linking failed after the login? Something on the Google side?
The web server shows HTTP error 307

Re: Domoticz to Google Assistan integration

Posted: Tuesday 02 July 2019 18:24
by DewGew
TotalImmortal64 wrote: Tuesday 02 July 2019 18:13
DewGew wrote: Tuesday 02 July 2019 14:39
TotalImmortal64 wrote: Monday 01 July 2019 21:46 Hmmm mine doesn't work still same issue I even tried to test from the PC in the test area and get an error. When I try to add the app in google home I still get the login and it accepts my credentials then I get the Couldn't update the setting. Check your connection error. Testing is Enabled should be working I would think? When I go to https://(my Domain)/smarthome from my browser I get an error 500 my web server shows this [01/Jul/2019 14:51:54] "GET /smarthome HTTP/1.1" 500 - so it is reaching the server. At a loss right now on what could be the issue.
Check your Domoticz settings in config.py i had isseues with users. Try admin user
So I have the users all setup correctly and I am getting account linking failed after the login? Something on the Google side?
I think Somthing with user rights.

Re: Domoticz to Google Assistan integration

Posted: Tuesday 23 July 2019 13:50
by DewGew
TotalImmortal64 wrote: Monday 01 July 2019 21:46 Hmmm mine doesn't work still same issue I even tried to test from the PC in the test area and get an error. When I try to add the app in google home I still get the login and it accepts my credentials then I get the Couldn't update the setting. Check your connection error. Testing is Enabled should be working I would think? When I go to https://(my Domain)/smarthome from my browser I get an error 500 my web server shows this [01/Jul/2019 14:51:54] "GET /smarthome HTTP/1.1" 500 - so it is reaching the server. At a loss right now on what could be the issue.
We made some changes. Try out latst on github https://github.com/DewGew/Domoticz-Google-Assistant

Re: Domoticz to Google Assistan integration

Posted: Wednesday 31 July 2019 10:40
by DewGew
New function:
Stream security camera to chromecast. Supports hls, dash, smooth streaming, Progressive MP4 urls. You need a to convert your video url to one of those. Try with ffmpeg or with a surveillance software system. I use http://shinobi.video.

https://github.com/DewGew/Domoticz-Google-Assistant

Re: Domoticz to Google Assistan integration

Posted: Thursday 29 August 2019 19:50
by freakyman88
Allmost everything is working well. Thanks for the effort you have put into this.

The one thing i am unable to get to work is the thermostaat. The thermostat is working from within Domoticz, however the Google Assistent is refusing to change the value of the thermostat. Is this because it is not supported or because i am doing something wrong?

Re: Domoticz to Google Assistan integration

Posted: Monday 02 September 2019 8:16
by DewGew
freakyman88 wrote: Thursday 29 August 2019 19:50 Allmost everything is working well. Thanks for the effort you have put into this.

The one thing i am unable to get to work is the thermostaat. The thermostat is working from within Domoticz, however the Google Assistent is refusing to change the value of the thermostat. Is this because it is not supported or because i am doing something wrong?
I dont have any thermostat I only tryed out with a dummy thermostat and that worked for me. Maybe your device type is missing. You can enter http://your.ipadress:8080/json.htm?type=devices&rid=IDX in your browser and put the result here ( change IDX to your thermostat idx)

Re: Domoticz to Google Assistant integration

Posted: Monday 02 September 2019 19:39
by EscApe
I have the same problem with my Nefit Easy thermostat. Google assistant says that setting the temperature is not supported. I verified that the execute routine in class TemperatureSettingTrait (trait.py) does not run at all by putting in print statement in it and running your program from the command line.
After some experimenting I still don't understand how the capabilities of devices are determined. I can manually change the temperature from Domoticz and the Domoticz (json) api.

result of http://your.ipadress:8080/json.htm?type=devices&rid=IDX :

Code: Select all

{
   "ActTime" : 1567445303,
   "AstrTwilightEnd" : "22:27",
   "AstrTwilightStart" : "04:38",
   "CivTwilightEnd" : "20:55",
   "CivTwilightStart" : "06:10",
   "DayLength" : "13:34",
   "NautTwilightEnd" : "21:39",
   "NautTwilightStart" : "05:26",
   "ServerTime" : "2019-09-02 19:28:23",
   "SunAtSouth" : "13:32",
   "Sunrise" : "06:45",
   "Sunset" : "20:20",
   "app_version" : "4.11231",
   "result" : [
      {
         "AddjMulti" : 1.0,
         "AddjMulti2" : 1.0,
         "AddjValue" : 0.0,
         "AddjValue2" : 0.0,
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "18.5",
         "Description" : "",
         "Favorite" : 1,
         "HardwareID" : 4,
         "HardwareName" : "Nefit EASY",
         "HardwareType" : "Nefit Easy HTTP server over LAN interface",
         "HardwareTypeVal" : 68,
         "HaveTimeout" : false,
         "ID" : "0010101",
         "LastUpdate" : "2019-09-02 19:28:18",
         "Name" : "CV.Setpoint",
         "Notifications" : "false",
         "PlanID" : "11",
         "PlanIDs" : [ 11 ],
         "Protected" : false,
         "SetPoint" : "18.5",
         "ShowNotifications" : true,
         "SignalLevel" : "-",
         "SubType" : "SetPoint",
         "Timers" : "false",
         "Type" : "Thermostat",
         "TypeImg" : "override_mini",
         "Unit" : 1,
         "Used" : 1,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "29"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

Re: Domoticz to Google Assistant integration

Posted: Monday 02 September 2019 20:01
by EscApe
B.t.w. I also tried to add a door contact domain but could not get it to work. In your master branch it shows as a light, but it is alway on. It will update correctly after replacing line 125 of traits.py with:

Code: Select all

response['on'] = self.state.state not in ['Off', 'Closed']

I wanted it to show as a door, but was unsuccessful. Added all the bits in smarthome.py, const.py and trait.py (but reverted the code, so I cannot share it :? ) The trait it should use was 'OpenCloseTrait', but it only ran the sync_attribute. Never the query_attributes. I tested this (again) with a print statement in the code and running from command line. The device would show up in the google home app as a unusable (unknown?) thing with a cogwheel. After revering the code I tried some other (PIR) sensor and it will show with same cogwheel icon. Seems not every type of device is working, even in the current master branch...
IMG_6873.jpeg
IMG_6873.jpeg (10.15 KiB) Viewed 2105 times
I will do some more digging around until I really understand how this code actually works, but if you can give some pointers that will be great.

Re: Domoticz to Google Assistant integration

Posted: Tuesday 03 September 2019 9:16
by DewGew
EscApe wrote: Monday 02 September 2019 20:01 B.t.w. I also tried to add a door contact domain but could not get it to work. In your master branch it shows as a light, but it is alway on. It will update correctly after replacing line 125 of traits.py with:

Code: Select all

response['on'] = self.state.state not in ['Off', 'Closed']

I wanted it to show as a door, but was unsuccessful. Added all the bits in smarthome.py, const.py and trait.py (but reverted the code, so I cannot share it :? ) The trait it should use was 'OpenCloseTrait', but it only ran the sync_attribute. Never the query_attributes. I tested this (again) with a print statement in the code and running from command line. The device would show up in the google home app as a unusable (unknown?) thing with a cogwheel. After revering the code I tried some other (PIR) sensor and it will show with same cogwheel icon. Seems not every type of device is working, even in the current master branch...
IMG_6873.jpeg

I will do some more digging around until I really understand how this code actually works, but if you can give some pointers that will be great.
'Door contact' domain is not yet added to smarthome.py so only 'door lock' domain works. Thats why it shows a light.