DewGew / DZGA-Flask

Domoticz Google Assisting using Flask
GNU General Public License v3.0
8 stars 4 forks source link

No devices found #73

Closed MikeZMssl closed 4 months ago

MikeZMssl commented 6 months ago

I want to thank you for taking the effort to re-create a solution to work with google assistant! The new UI looks great ; but unfortunately I cannot get it running

What am I doing wrong ? Or what can I do ?

When choosing the Devices page in the user interface , I cannot see any devices. Synch devices will take about 4 seconds, but no result.

The logs are not showing any failures except for the 404 on google api's for the devices:requestSync but since I cannot see any devices from Domoticz in the user interface, I guess some how the collecting of devices is not working properly ?

2023-12-29 15:48:46 Smarthome server has started. 2023-12-29 15:48:46 Running without ssl 2023-12-29 15:49:10 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:10 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:10 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:10 http://localip:localport "GET /json.htm?type=command&param=getusers HTTP/1.1" 200 42 2023-12-29 15:49:14 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:14 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:14 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:14 http://localip:localport "GET /json.htm?type=command&param=getusers HTTP/1.1" 200 42 2023-12-29 15:49:16 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:16 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:16 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:16 http://localip:localport "GET /json.htm?type=command&param=getusers HTTP/1.1" 200 42 2023-12-29 15:49:17 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:17 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:18 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:18 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:44 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:44 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:46 Starting new HTTPS connection (1): accounts.google.com:443 2023-12-29 15:49:46 https://accounts.google.com:443 "POST /o/oauth2/token HTTP/1.1" 200 None 2023-12-29 15:49:46 Starting new HTTPS connection (1): homegraph.googleapis.com:443 2023-12-29 15:49:46 https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 404 None 2023-12-29 15:49:52 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:52 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:49:54 Starting new HTTP connection (1): localip:localport 2023-12-29 15:49:54 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:50:31 generated code 2023-12-29 15:50:33 request: { "inputs": [ { "intent": "action.devices.SYNC" } ], "requestId": "9058974628686072578" } 2023-12-29 15:50:33 Starting new HTTP connection (1): 192.168.1.99:8080 2023-12-29 15:50:55 Starting new HTTP connection (1): localip:localport 2023-12-29 15:50:55 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:51:10 Starting new HTTP connection (1): localip:localport 2023-12-29 15:51:10 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:51:38 Starting new HTTP connection (1): localip:localport 2023-12-29 15:51:38 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:56:29 Starting new HTTP connection (1): localip:localport 2023-12-29 15:56:29 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:56:36 Starting new HTTPS connection (1): homegraph.googleapis.com:443 2023-12-29 15:56:37 https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 404 None 2023-12-29 15:56:43 Starting new HTTP connection (1): localip:localport 2023-12-29 15:56:43 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 15:59:03 Starting new HTTP connection (1): localip:localport 2023-12-29 15:59:03 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 16:00:50 Starting new HTTPS connection (1): homegraph.googleapis.com:443 2023-12-29 16:00:50 https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 404 None 2023-12-29 16:00:56 Starting new HTTP connection (1): localip:localport 2023-12-29 16:00:56 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2023-12-29 16:01:03 Starting new HTTP connection (1): localip:localport 2023-12-29 16:01:03 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210

Xenomes commented 6 months ago

Hi, do you see the version of Domoticz in the 'About' section? afbeelding

MikeZMssl commented 6 months ago

@Xenomes

Yes I do, version 2023.2 But I just did notice the flask version is none, 23.11 available.

But am on the latest version via docker, just pulled again but was up to date

Xenomes commented 6 months ago

Ha I see, just started my docker, here the same. afbeelding But the devices are there, and I can control them.

MikeZMssl commented 6 months ago

Another think I notice is that you see the build of domoticz, but i do not

Xenomes commented 6 months ago

I'm running the stable version on my live system, and I'm using HTTPS with my own certificate instead of HTTP, so my Basic-Auth is turn off.

DewGew commented 6 months ago

Seems like dzga on docker cant read current version. This is a bug. I put that on my list

MikeZMssl commented 6 months ago

Thanks Any details I can collect to investigate why i do not see any devices?

DewGew commented 6 months ago

Thanks Any details I can collect to investigate why i do not see any devices?

There might be devices that is not supported by dzga. If try to import all your devices this can happen.

I suggest you add a seperate user for dzga in domoticz. Then add devices one by one to this user in domoticz to make sure it is supported.

MikeZMssl commented 6 months ago

I have reduced access to only 1 device; a dimmable light switch Still no devices were added ?

2024-01-02 12:21:00 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:00 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:00 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2024-01-02 12:21:00 http://localip:localport "GET /json.htm?type=command&param=getusers HTTP/1.1" 200 42 2024-01-02 12:21:01 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:01 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2024-01-02 12:21:03 Starting new HTTPS connection (1): homegraph.googleapis.com:443 2024-01-02 12:21:03 https://homegraph.googleapis.com:443 "POST /v1/devices:requestSync HTTP/1.1" 404 None 2024-01-02 12:21:09 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:09 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2024-01-02 12:21:14 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:14 Starting new HTTP connection (1): localip:localport 2024-01-02 12:21:14 http://localip:localport "GET /json.htm?type=command&param=getversion HTTP/1.1" 200 210 2024-01-02 12:21:14 http://localip:localport "GET /json.htm?type=command&param=getusers HTTP/1.1" 200 42 2024-01-02 12:21:15 Starting new HTTP connection (1): localip:localport

DewGew commented 5 months ago

Try run manually. There might be error that is not visable in UI.

sudo systemctl stop dzga-flask #If service is running
cd /home/${USER}/DZGA-Flask
source env/bin/activate
python3 smarthome.py
Xavier82 commented 5 months ago

Had this issue to. I did multiple test and only 1 thing made it work: I created a new user in DZGA, the default admin user didn't work for me. After creating new user in DZGA everything worked fine for me.

MikeZMssl commented 5 months ago

Try run manually. There might be error that is not visable in UI.

sudo systemctl stop dzga-flask #If service is running
cd /home/${USER}/DZGA-Flask
source env/bin/activate
python3 smarthome.py

As I am running it via docker i first execute docker exec -it dzga-flask sh how do stop the service from within the container ? systemctl of service are non known commands

cannot start the smarthome command without the port conflict now ...

DewGew commented 5 months ago

https://github.com/DewGew/DZGA-Flask/wiki/5.-Debugging

github-actions[bot] commented 4 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days