Z-Wave-Me / home-automation

Z-Way Home Automation engine
183 stars 116 forks source link

Docker installation - Ip address find #526

Open perhusaas opened 2 years ago

perhusaas commented 2 years ago

installing 3.2.2 and patching for HASS integration (mentioned here: https://github.com/Z-Wave-Me/home-automation/commit/cc62fa25406f096a23d9f06afb0d977eb88752dc), I can't log in with any user but admin. the login screen just resets.

I get this in the log: sh: 1: ip: not found

so i looked into the 'AutomationController.prototype.getIPAddress = function() {' in AutomationController.js , and see that none of the ways of obtaining what i asume is the host IP for the z-way server works in a docker (ubuntu based). 'Hostname -i" will return the container IP, don't know how to find host IP from within the docker..

I tried to hard code the correct IP in this function, and i see that the error message disapeared, but the login still resets for all but the admin user.

Any ideas?

PoltoS commented 2 years ago

Please show the tcpdump traffic (mangle your tokens not to show real data). tcpdump -i eth0 port 8083 -ntls 1000.

As for the IP, it is not a problem - it will just return empty string. It is not used by HASS

perhusaas commented 2 years ago

couldn't get that going for some reason, but i looked into the HASS log, and this appears twice: 2022-03-13 13:47:09 ERROR (Thread-92) [websocket] error from callback <bound method ZWaveMe.on_close of <zwave_me_ws.ZWaveMe.ZWaveMe object at 0x7efe60d82730>>: on_close() missing 1 required positional argument: '_'

what is the "_" argument zwave_me_ws is missing?

perhusaas commented 2 years ago

I see now that I mentioned that in another thread, and that this issue can be closed if the IP address thing is not an issue.

PoltoS commented 2 years ago

Which docker do you use? How do you install it?

perhusaas commented 2 years ago

I made this docker, the docker compose and dockerfile is in the description. HASS is running in homeassistant/home-assistant:latest openLuup (which is connected to Z-Way using luasocket) is also in a separate docker, and all of them are in the same docker network at netmask 192.168.0.1-254/16.

perhusaas commented 2 years ago

IP issue is stated as not the problem up above here, so this issue can be closed. (my issues with first logon was caused by something in my config files, I set up HASS all over again and problem disappeared).