Git Product home page Git Product logo

domoticz-google-assistant's Introduction

Domoticz-Google-Assistant is deprecated and there is no more support for this project!!

Try out my new dzga here --> https://github.com/dewgew/dzga-flask

This is a standalone implementation for Domoticz Home Automation. It means that you can put this server wherever you want, even on another machine. You need to setup a project in Actions on Google Console. You find instructions below.

Based on Pawcio's script at Domoticz Forum

Please feel free to modify it, extend and improve

Installation

Just open a terminal window and execute this command. Then set up Actions on Google. Thats it!

bash <(curl -s https://raw.githubusercontent.com/DewGew/dzga-installer/master/install.sh)

domoticz-google-assistant's People

Contributors

anthonybuisset avatar ayasystems avatar csutcliff avatar cyrilb1531 avatar d-escape avatar darkmanpi avatar dependabot[bot] avatar dewgew avatar eldigo avatar ficueu avatar frankdpgh avatar jochem22 avatar jsiegmund avatar kofec avatar ptpazuzu avatar ressof avatar tizzen33 avatar tobydeteckel avatar tofra avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

domoticz-google-assistant's Issues

Device_Config settings in config.yaml are ignored

[smarthome.py] When calling getDesc(state) the first IF statement is always true, resulting in Device_Config settings being ignored.

def getDesc(state):
    if 'Scene_Config' in configuration:
        if state.domain == sceneDOMAIN or state.domain == groupDOMAIN:
            desc = configuration['Scene_Config'].get(int(state.id), None)
            return desc
        
    elif 'Device_Config' in configuration:
            desc = configuration['Device_Config'].get(int(state.id), None)
            return desc
    else:
        return None

Dirty way that fixed it for me:

def getDesc(state):
    if state.domain == sceneDOMAIN or state.domain == groupDOMAIN:
        if 'Scene_Config' in configuration:
            desc = configuration['Scene_Config'].get(int(state.id), None)
            return desc
        
    elif 'Device_Config' in configuration:
            desc = configuration['Device_Config'].get(int(state.id), None)
            return desc
    else:
        return None

Issue Installing package pyngrok

Hi,

I have installed the dzga on a rpi using the install script and i tried to use ngrok with it but the assistant won't boot since. This is what i've got after enabling the logs

2019-12-10 13:13:53 - INFO - Installing package pyngrok
2019-12-10 13:14:24 - INFO - Connecting to Domoticz on XXXX
2019-12-10 13:14:27 - INFO - Installing package pyngrok
2019-12-10 13:14:53 - INFO - Connecting to Domoticz on XXXX

I can run the command manually without problem:

pi@raspberrypi:~ $ pip3 install pyngrok
Collecting pyngrok
  Using cached https://www.piwheels.org/simple/pyngrok/pyngrok-1.4.2-py3-none-any.whl
Collecting future (from pyngrok)
  Using cached https://www.piwheels.org/simple/future/future-0.18.2-py3-none-any.whl
Collecting pyyaml (from pyngrok)
  Using cached https://www.piwheels.org/simple/pyyaml/PyYAML-5.2-cp35-cp35m-linux_armv7l.whl
Installing collected packages: future, pyyaml, pyngrok
Successfully installed future-0.18.2 pyngrok-1.4.2 pyyaml-5.2

Devices sync dont work anymore

  1. When clinking on "sync devices" message "Page not found!: Can't convert 'NoneType' object to str implicitly" appear and devices dont sync

  2. The only way to sync is to reboot the service

Domoticz 4.10717 on synology
DZGA 1.5.5

No logs

Paste the dzga logs here.

Desktop (please complete the following information):

  • Domoticz version
  • Dzga version
  • Python Version

Smartphone (please complete the following information):

  • Device:

Additional context, screenshot:

Version 1.4.0 crash of service at start.

I update DGA on the webgui and also tried normal git pull to version 1.4.0
The system crashes immediately after start.
No hits in the log file with DEBUG On.
Went back to 1.3.9. and everything is fine.

Need details for google conf

Hi !

I followed the wiki until the action configuration where it is said to fill the reverse proxy url.
Where can I get it as it is said on the dzga configuration file that we don't have to open any port on router and do not require a reverse proxy ?
Can you give me an example ?
Does Ngrok inscription is really mandatory to keep connection alive ?

Thanks for all :-)

Configuration editing

Describe the bug:
I change my configuration via UI and the paswords (auth_pass or Domoticz.password) contain special characters (like '+'),

Expected behavior:
It hasn't saved to the config.yaml
Example: auth_pass is 'Pass1234+', but the config file contains auth_pass: 'Pass1234 '

dzga log:
2020-01-19 13:24:01 - INFO - Config saved
Nothing else... :(

Desktop (please complete the following information):

  • Domoticz version Beta 4.11605
  • Dzga version 1.5.6
  • Python Version 3.5.3

Btw: Many thanks for your works! This project is fantastic!!

Problem Autorization

Hi, i haw a proble at stable release and developer release, autorization don't working, how this Issues #23
Check stable and developer release, help me please

Google Assistant: Lights working but unknown error

When I use Google Assistant by giving a voice command it says: Unknown error for kitchen
The lights are working fine, there are no error's in the log.

I can't figure out how to solve this problem. Maybe this issue is linked to #100 but I guess not.

Milights issue

There is one issue with my milight lights. I have them setup as a switch in domoticz and my milights appear in google home but with the following error:

Error handling message {'requestId': '1786981529328158506', 'inputs': [{'context': {'locale_country': 'NL', 'locale_language': 'nl'}, 'intent': 'action.devices.EXECUTE', 'payload': {'commands': [{'devices': [{'id': 'ColorSwitch21'}], 'execution': [{'params': {'on': False}, 'command': 'action.devices.commands.OnOff'}]}]}}]}: {'errorCode': 'unknownError'}
127.0.0.1 - - [01/Dec/2019 15:32:07] "POST /smarthome HTTP/1.1" 200 -
Response: {
  "requestId": "1786981529328158506",
  "payload": {
    "errorCode": "unknownError"
  }
}

This is the milight when i sync devices:

      {
        "willReportState": false,
        "deviceInfo": {
          "manufacturer": "milight"
        },
        "traits": [
          "action.devices.traits.OnOff",
          "action.devices.traits.Brightness",
          "action.devices.traits.ColorSetting"
        ],
        "attributes": {
          "colorTemperatureRange": {
            "temperatureMinK": 1700,
            "temperatureMaxK": 6500
          },
          "colorModel": "rgb"
        },
        "name": {
          "name": "Slaapkamer Lamp"
        },
        "type": "action.devices.types.LIGHT",
        "id": "ColorSwitch21"
      }

I can still use my voice commands to turn on/off the light but google home mini says there is an error each time. The google home app says it is not responding.

Forum thread

Reverse proxy (apache2) not working properly

Hello, I'm tryin to redirect from my.domain:3030 to my.domain/asssistant/ in apache2:

  ProxyPass "/assistant/" "http://127.0.0.1:3030/"
  ProxyPassReverse "/assistant/" "http://127.0.0.1:3030/"

and I can see login page at my.domain/assistant/login but while trying to click sign in it redirect me to my.domain/login - probably code only support main "catalog" example.domain/, it not working if there is more levels: example.domain/googleassistant/ etc.

Is possible to fix it? Or only way is use ngrock/port redirecting?

Room change

Hello,

I noticed that once you are not publishing a room in the config.py for a device, then updating the room in the config.py is not reported in the application.
The nickname was updated correctly in GA after several changes in the config.py

For sure, I have resync and restarted several times :)

This is a minor problem as you are not supposed to moved all devices to another room every day...

One comment out of this context: Adding a comment in the config.py or readme: "Not end Domoticz URL with a slash character" would avoid a trap, I fall in...
2nd comment: Having a list all URLs to be reversed proxied (inc. /login /sync) would remove a second trap. I fall in too :)

In all cases, really great job. I would love have it merge natively into Domoticz

Thx

Command fail & sync fail

Describe the bug:
When I say "Turn off x", lamp is turning off but google assistant says: "Something went wrong for the x lamp"

Expected behavior:
Lamp turns off without "Something went wrong for the x lamp"

Logs:

2020-01-19 12:11:21 - INFO - Logs removed by user
2020-01-19 12:11:29 - INFO - Request {
  "inputs": [
    {
      "context": {
        "locale_country": "US",
        "locale_language": "en"
      },
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "ColorSwitch9"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ],
  "requestId": "10598680905628680826"
}
2020-01-19 12:11:30 - ERROR - Invalid control character at: line 3 column 38 (char 164)
2020-01-19 12:11:30 - INFO - Error handling message {'inputs': [{'context': {'locale_country': 'US', 'locale_language': 'en'}, 'intent': 'action.devices.EXECUTE', 'payload': {'commands': [{'devices': [{'id': 'ColorSwitch9'}], 'execution': [{'command': 'action.devices.commands.OnOff', 'params': {'on': True}}]}]}}], 'requestId': '10598680905628680826'}: {'errorCode': 'unknownError'}
2020-01-19 12:11:30 - INFO - Response {
  "requestId": "10598680905628680826",
  "payload": {
    "errorCode": "unknownError"
  }
}

Desktop (please complete the following information):

  • Domoticz version: v4.11605
  • Dzga version: 1.5.6
  • Python Version: 3.6.5

Smartphone (please complete the following information):

  • Device: Nest Mini

Temperature Conversion Fahrenheit / Celcius

I'm running DGA from source, pulled yesterday.

My Domoticz devices report temperature in Fahrenheit, but it seems that Google Home thinks the report is in Celsius, and converts to Fahrenheit. So, when my thermostat setpoint is 66f, Google Home reports the temperature as 150f (converting 66c to 150f). Here's a snippet from my DGA log:

2019-12-29 14:01:51 - INFO - Response: {
"requestId": "12700150954660525955",
"payload": {
"devices": {
"Temp119": {
"online": true,
"thermostatMode": "heat",
"thermostatTemperatureAmbient": 66.0,
"thermostatTemperatureSetpoint": 66.0
}
}
}
}

And here's a screenshot from GH:
Screenshot_20191229-091321

Configurable place for log file

Feature request.
It would be nice if the place of the logfile could be configurable.
I have all my logfiles in /var/log/* and that is a ramfile.
So on my Raspberry Pi it will not wear out my SD-card.

Failure to sync devices

Running off of the latest beta version I'm getting the following when trying to sync up with Google:

https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 404 None

The UI is giving me:

Page not found!: 404 Client Error: Not Found for url: https://homegraph.googleapis.com/v1/devices:requestSync

I'm using smart-home-key.json which I downloaded from Google and as far as I can see everything seems to be set-up correctly. What might I be missing here?

PS: I also tried the master branch using the Homegraph_API_Key setting, but that gives me:

Homegraph api key not valid!

I'm quite sure the key is correct though, I've copy/pasted it from the Google console a couple of times now.

Device Config [Feature Request]

Feature Request

@afrieswijk have the idea to create a devicecontrol option like there is with device_config. The devicecontrol could then be set in config.yaml or in the description field within domoticz.
The devicecontrol should have the devicetype and the devicetrait in it.
With this we can flexibel manage the devices from domoticz to GA.

To add the devicetype would be prefferable, because with that we can adjust the right icon to it.

Moved from #82

Crashes when ClientSectret contains underscore

Describe the bug:
When generated my ClientSectret i contained a underscore _ witch made the software crash

Expected behavior:
That is started normaly

Logs:

  File "/usr/lib/python2.7/runpy.py", line 165, in _run_module_as_main
    mod_name, loader, code, fname = _get_main_module_details(_Error)
  File "/usr/lib/python2.7/runpy.py", line 133, in _get_main_module_details
    return _get_module_details(main_name)
  File "/usr/lib/python2.7/runpy.py", line 119, in _get_module_details
    code = loader.get_code(mod_name)
  File "/usr/lib/python2.7/pkgutil.py", line 281, in get_code
    self.code = compile(source, self.filename, 'exec')
  File "/root/Domoticz-Google-Assistant/__main__.py", line 84
    for path,value in {**oauthGetMappings, **smarthomeGetMappings}.items():
                        ^
SyntaxError: invalid syntax

Desktop (please complete the following information):

  • Domoticz version Stable 4.10717
  • Dzga version v1.5.5
  • Python Version 3.7.3

Two-factor authentication

In config.py acknowledgement does not work properly.
I got error 'challenge needed' in terminal.

DEVICE_CONFIG = {
    '135' : {
            'nicknames' : ['Kitchen Blind One'],
            'room' : 'Kitchen' ,
            'ack' : True},

Adding new service fails

When I add a new service in Google Home, the DGA login screen is showed. After entering the username and password, it shows: Page not found: 'https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fthuis-50e54'

It looks like the redirect isn't going well.. Here is the console log:

Started httpserver on port  3030
127.0.0.1 - - [04/Jul/2019 21:42:26] "POST /login HTTP/1.1" 404 -
127.0.0.1 - - [04/Jul/2019 21:42:26] "GET /sync HTTP/1.1" 200 -
No user data
1.2.3.4 - - [04/Jul/2019 21:42:38] "GET /oauth?redirect_uri=https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fthuis-50e54&client_id=<clientid>&response_type=code&state=<state>&scope=read&user_locale=nl-NL HTTP/1.1" 307 -
1.2.3.4 - - [04/Jul/2019 21:42:38] "GET /login?client_id=<clientid>&redirect_uri=https%253A%252F%252Foauth-redirect.googleusercontent.com%252Fr%252Fthuis-50e54&redirect=/oauth&state=<state> HTTP/1.1" 200 -
1.2.3.4 - - [04/Jul/2019 21:42:56] "POST /login HTTP/1.1" 301 -
1.2.3.4 - - [04/Jul/2019 21:42:56] "GET /https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fthuis-50e54?code=<code>&state=<state> HTTP/1.1" 404 -

1.2.3.4 is my reverse proxy
< clientid >, < code > and < state > have been replaced

Device configuration

  • voicecontrol device configuration is not failed back to the settings in config.yaml when tags are not found on the Domoticz device's description. It only checks for device description tags in Domoticz, if not found then devices customization is not synch'ed with G Home even if they are configured in config.yaml in Device_Config section.

It would be wonderful if you could look into restoring the fail back of device_config with config.yaml configuration, because i think it is by far preferrable to have all the devices' configurations centralized into one place, rather than having them spread across multiple devices in Domoticz, with the risk to forget or miss where device are configured or not, and which devices are configured.

Forum thread

Persistent and duplicated device when changing type

Hello everyone, first of all thank your very much for all the work done on this great project !

Describe the bug:
After changing a device type from light to fan in domoticz, and with the proper image_override parameter, the device (idx 56) seems to have been duplicated, according to the requests sent by GA.

However, the device appears only once, in the dzga's device list and in Google Home app.,

Logs:

The request for an "on" command :

2020-01-26 17:39:22 - INFO - Request {
  "inputs": [
    {
      "context": {
        "locale_country": "FR",
        "locale_language": "fr"
      },
      "intent": "action.devices.EXECUTE",
      "payload": {
        "commands": [
          {
            "devices": [
              {
                "id": "Light56"
              },
              {
                "id": "Fan56"
              }
            ],
            "execution": [
              {
                "command": "action.devices.commands.OnOff",
                "params": {
                  "on": true
                }
              }
            ]
          }
        ]
      }
    }
  ],

You can clearly see the two duplicated devices being sollicitated.

And the error :

2020-01-26 17:39:22 - INFO - Response {
  "requestId": ,
  "payload": {
    "commands": [
      {
        "ids": [
          "Light56"
        ],
        "status": "ERROR",
        "errorCode": "deviceOffline"
      },
      {
        "ids": [
          "Fan56"
        ],
        "status": "SUCCESS",
        "states": {
          "on": true
        }
      }
    ]
  }
}

The issue is bothering since any vocal command passed through my nest mini result with "I switched on the device. However, the device is not available" answer.

**Desktop **

  • Domoticz version Stable 4.10717
  • Dzga version 1.5.7
  • Running on Raspberry pi 2

Update button does not show.

I am on version 1.3.6 (present in const.py and the GUI) but the button in the GUI does not show.
I saw that both master and beta are currently on 1.3.7.
I use Chrome and cleared the cache.

Can't sync or control Domoticz-Google-Assistant

When I try to add the device in google home. I can login to Domoticz Google Assistant, and it loads, then I get kicked back to the add device screen. When I try to add the device again, I get a Not Found message. and the adress it tries to open is

`https://<MY_SITE>/https%3A%2F%2Foauth-redirect.googleusercontent.com%2Fr%2Fdomoticzassistant-2c9ee?code=.....&state=....

If I open the adress in Firefox and remove MySite and open https://oauth-redirect.googleusercontent.com/r/do... I get a "Logging in" message, but it takes me back to the add device screen and no device is added.

1 server for multiple domoticz instance

Hi,

Can I setup only 1 server but for many different domoticz instance?
Example, I have 2 houses and 1 office in different location.
I want to setup only 1 server but the domoticz will be at 3 different location.
3 different login because I don't want to join the item in to one. Of course, we have 3 different phone.

Temperature doesnt update on first check.

When I ask after a temperature I get an old value. When I ask again then I get the actual value.
Same thing happens in the Goolge Home App. When I push on a temperature I get an old value and when I go back and push the temperature again I get the actual value.

Does anybody else has this problem?

Edit:
I see now that the same thing happens on the switches and dimmers.

Prepare for Docker

Makes for project more compliant to Docker containers

Proposal
Change location of config.yaml + smart-home-key.json files to something like "/config" folder (instead of root directory).
With that, you should configure a "volume" (persistant data) for this folder and save custom files.

Tested & functionnal dockerfile

 
# Update Software repository
RUN apk add --update --no-cache git

ARG COMMIT_ID
RUN cd / && \
    git clone https://github.com/DewGew/Domoticz-Google-Assistant && \
    cp ./Domoticz-Google-Assistant/requirements/pip-requirements.txt requirements.txt

#Copy configuration
COPY apk-requirements.txt apk-requirements.txt
COPY config.yaml /Domoticz-Google-Assistant/config.yaml
COPY smart-home-key.json /Domoticz-Google-Assistant/smart-home-key.json
 
# Configure Services and Port
CMD ["python3 Domoticz-Google-Assistant"]
 
EXPOSE 3030

With apk-requirements.txt file:

python3
python3-dev
gcc
musl-dev
libffi-dev
libressl-dev
git

Sync not working:

Today I setup this Google assistent integration, but when I click Sync on the settings page I got the following error:

Page not found!: 'client_email'

I'm running this on my Synology NAS by running the synology setup file. How can I fix this error?

Device changes/updates in Domoticz not updated on Assistant

Hi,
using 1.5.5, when querying Assistant if a device is on I only get state from last manual sync.
Any change of state in Domoticz is not being reflected in Google Assistant.
For example, light x is off. I ask Assistant if light x is on. Assitant tells me light x is off. In Domoticz I turn on light x. I ask Assistant if light x is on. Assistant tells me light x is off.
Same with temperature devices. I only get the temperature from last manual sync.
It never updates.
Running DZGA behind a nginx reverse proxy. When I turn on/off devices using Assistant, I can see queries coming from Google in the reverse proxy logs. I would expect incoming queries from Google when I ask for the state of a specific device, but nothing appears in the reverse proxy log.
Does DZGA send device changes to Assistant as they happen, or does Assistant query DZGA if asked for the state of a device?

ERROR - 400 Client Error: Bad Request for url

hi everybody,

I have been struggling with the following issue. Acutually everything works fine, lights go on and off but every request is followed by the message that an unknown error has accured. I see in the dzga log the information below. Any one any suggestion what to do next ? Thank you in advance.

Andre

2020-02-11 10:02:39 - INFO - Request {
"inputs": [
{
"context": {
"locale_country": "NL",
"locale_language": "nl"
},
"intent": "action.devices.EXECUTE",
"payload": {
"commands": [
{
"devices": [
{
"id": "ColorSwitch2436"
}
],
"execution": [
{
"command": "action.devices.commands.OnOff",
"params": {
"on": true
}
}
]
}
]
}
}
],
"requestId": "16069518951766576407"
}
2020-02-11 10:02:39 - ERROR - 400 Client Error: Bad Request for url: https://accounts.google.com/o/oauth2/token
2020-02-11 10:02:39 - INFO - Error handling message {'inputs': [{'context': {'locale_country': 'NL', 'locale_language': 'nl'}, 'intent': 'action.devices.EXECUTE', 'payload': {'commands': [{'devices': [{'id': 'ColorSwitch2436'}], 'execution': [{'command': 'action.devices.commands.OnOff', 'params': {'on': True}}]}]}}], 'requestId': '16069518951766576407'}: {'errorCode': 'unknownError'}
2020-02-11 10:02:39 - INFO - Response {
"requestId": "16069518951766576407",
"payload": {
"errorCode": "unknownError"
}
}

FAQ

I can see my domoticz device on the UI, I setup the google cloud API. But when I link the service in Google Home, I can login but no devices show up.

  • Missing step somewhere during installation. Restart from scratch.

Sync button does not work.

  • Make sure the json file is for same project you use for dzga.
  • Json file is not valid

Sync button and sync by voice does not work.

  • Try Goto action on google and press Test button again.

The action is completed normal but Google responds with an error.

  • can report error if there is a special character in device name or levelnames
  • try set report state to false for this device
  • try to do a sync request 1-2 times

In what python version does dzga fully work?

  • Python 3.5 (confirmed by user)(travis passed)
  • Python 3.6 (confirmed by user)(travis passed)
  • Python 3.7 (Issue by a user #98)(travis passed)
  • Python 3.8 (not confirmed)(travis passed)

Whats diffrence between master and beta?

  • Beta are for testing containing new features and bug fixes. It's most likely there are bugs and errors in beta. Even features that worked before can stop working.

What's the minimal configuration to make server work?

# Configuration:
port_number: 3030
loglevel: "Info"
logtofile: true
userinterface: true

# Login on Google Home app and configuration interface
auth_user: 'admin'
auth_pass: 'admin'
  
# Domoticz Settings:
Domoticz:
  ip: 'http://192.168.1.100'
  port: '8080'
  roomplan: '0'
  username: 'Domouser'
  password: 'Domopass'
  switchProtectionPass: false

# Report low battry
Low_battery_limit: 0

I have changed token and now I cant sync, query or exceute.

  • You have to reconnect in Google Home App
    • On your mobile device, open the Google Home app.
    • At the top left, tap Add (+)
    • Set up device
    • Works with Google.
    • Select your device app e.g: "[test]Your Appname"
    • Search for new devices

More help

Sync will not delete removed devices

When i look at my DZGA devices page there are devices listed that are already deleted from my domoticz system. When i sync they wont get deleted. Google Home now has devices that are not existing anymore. The devices that should be removed dont show up at json.htm?type=devices either. Only way to fix this is to restart DZGA.

Installation

  1. Had to remove "pkg-resources>=0.0.0" from pip-requirements.txt because pip could not find such a module and gave errors. By the way, as i understand, it is not needed to explicitely declare such a module as a dependency.

  2. In the installation procedure, I couldn't find pip command installed on the system, i have pip3 only and i used it successfuly. Using pip3 would also ensure python3 is used.

  3. pyngrok shoudn't be a mandatory requirement, because i use Caddy Proxy for exposing DZGA to Google Assistant and i don't need/want to set up a tunnel with ngrok proxy, but i am forced to install pyngrok anyway.

Forum thread

Roller shutter direction changed.

I might be mistaken, but a few versions back my roller shutters worked normally with voice command.
Commands like Up and Down worked normally but the action in version 1.4.3 is now reversed.
Can that be changed some where or is there something changed in code?
The "Open" and "Close" work correctly.

Device control

What an awesome solution, great work!

I have a problem with devices in GA. for example i don't get my fan with modes in google home, but also not my thermostat programs with a selector.

So i have the idea to create a devicecontrol option like you did with voicecontrol. The devicecontrol could then be set in config.yaml or in the description field within domoticz.
The devicecontrol should have the devicetype and the devicetrait in it.
With this we can flexibel manage the devices from domoticz to GA.

Is this an idea to create in a future release?

ERROR - 403 Client Error: Forbidden for url: https://homegraph.googleapis.com/v1/devices:reportStateAndNotification

hi everybody,

I have been struggling with the following issue. Acutually everything works fine, lights go on and off but every request is followed by the message that an unknown error has accured. I see in the dzga log the information below. Any one any suggestion what to do next ? Thank you in advance.

Andre

2020-02-11 11:21:00 - ERROR - 403 Client Error: Forbidden for url: https://homegraph.googleapis.com/v1/devices:reportStateAndNotification
2020-02-11 11:21:00 - INFO - Error handling message {'inputs': [{'context': {'locale_country': 'NL', 'locale_language': 'nl'}, 'intent': 'action.devices.EXECUTE', 'payload': {'commands': [{'devices': [{'id': 'Light3778'}], 'execution': [{'command': 'action.devices.commands.OnOff', 'params': {'on': True}}]}]}}], 'requestId': '5567267980387605867'}: {'errorCode': 'unknownError'}
2020-02-11 11:21:00 - INFO - Response {
"requestId": "5567267980387605867",
"payload": {
"errorCode": "unknownError"
}
}

Merge Devices

A way to make the dzga to merge different domoticz devices into one device.
i.e: a heater for my main room with following devices in domoticz

  • Thermostat
  • Selector switch (Modes, e.g Heating | Cooling | ECO )

Suggestion:
Add some kind of configuration into device_config and/or in tags in domoticz description

Update in GUI not correct

I just did a pull on the beta v. 1.3.5 and everything went fine.
I did a restart of the server and a sync.
The version is shown in 'const.py' on the header in the GUI.
At the bottom of the GUI it shows that I am on version v.1.3.5
But the 'Update' button is visible and clickable.
I think that the button should be disabled or gone.

Improve commit messages

Can you please improve the commit messages?
Instead of 'Update default_config' use 'Enable UI by default'

This way it's easy for your users to see what has changed and if the changes could affect them or what new features have been built.

error on start

for path,value in {**oauthGetMappings, **smarthomeGetMappings}.items():
                    ^

SyntaxError: invalid syntax

am i doing something wrong ?

Make contextroot configurable

when you have one "gateway server" like nginx or apache that proxies from the big bad internet to the safety of the internal network. One of the biggest challenges is setting up all forwarding.

DGA forces to have the context root at /. Can this be changed into a configuration?

Duplicate Domoticz requests

Sadly I'm new to Git and currently have no time to sort it al out. I had BIG issues with DZGA performing duplicate requests to Domoticz. Took me ages to figure out where it came from (GActions, Proxy, Domoticz, or somewhere in the DZGA code), but I found it. Probably every single user has this issue, but it feels I'm the only one who noticed and had issues with it (due to IR).

The issue is on line 431 of smarthome.py:

print(json.dumps(self.smarthome_process(message, token), indent=2, sort_keys=False))

In this line the smarthome_process call is made a second time. It can be fixed by replacing with:

print(json.dumps(response, indent=2, sort_keys=False))

I hope it helps.

Not correct state

Describe the bug
Updated state is not passed correctly to Google Assistant by DZGA.

Desktop:

  • Domoticz version Stable 4.10717
  • Dzga version 1.5.4
  • Python Version 3.5.3

Smartphone:

  • Iphone 8

First start configuration problem

When I install the latest version, I run into a problem when trying to start the service. The configuration file is created because it does not exist yet, but it's filled with 'Problem opening this file'.

I think it's because of the readFile function which is trying to open the default_config from a relative location

file = open(filename, 'r+')

Instead of an absolute location

file = open(os.path.join(FILE_DIR, filename), 'r+')

Running in main console

Hi, I have installed via the installation-script thru SSH. When i checked the screen connected to the RaspberryPi the script was running in foreground on the main console.

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.