stfnhmplr / node-red-contrib-homee

access the homee api with node-red
37 stars 8 forks source link

realHomee fails to connect to virtHomee #20

Closed cmaoling closed 3 years ago

cmaoling commented 3 years ago

Hi, interesting project. Thanks for the efforts, which went into it. I tried to get it up and running, but fail. Not sure whether I hit an issue in this node-red code or I miss something in my setup.

My realHomee is unable to connect the virtHomee. W/in NodeRed I do see protocol warning message 21 "login invalid response" reported by the realHomee through the "homeeAPI" element. Because my setup might be uncommon I created a virtHomee in a homeeDevice element to which I connected w/in the same flow from a homeeApi element. This seems to generally work, but I have two observations: 1.) The user in the virtHomee response is not the user I defined in the virtHomee. It seems to be always "homee". My "other" user is not reported. 2.) The IP address in the virtHomee reply (payload.settings.wlan_ip_address) to in the settings is NOT the NodeRed instance run on. It seems to be a arbitrary x.x.178.222 IP, while the Node-Red instance runs w/in a docker instance with a local IP of 172.17.0.z and global IP of x.x.y.z

Any advise, whether the IP in the response of any importance? Is it possible to set the IP in the response somehow? Or get more debug info, why the virtHomee rejects this login by my realHomee? Is there any difference, whether I identify the virtHomee based on IP address or HomeeID in the Homee-in-Homee setup?

I am running NodeRed in a docker instance with the ports 7681, 15236/udp and 1080 exposed.

Any advise or hint is appreciated.

Thanks.

stfnhmplr commented 3 years ago

I created a virtHomee in a homeeDevice element to which I connected w/in the same flow from a homeeApi element.

You should not connect a homee API node to a homee device. The homee API Node is only used to connect to a physical homee. You can find some examples of how to use it here: https://flows.nodered.org/search?term=homee&type=flow

The user in the virtHomee response is not the user I defined in the virtHomee. It seems to be always "homee". My "other" user is not reported.

Since the virtual homee is only used for a simulation of devices, the credentials defined in Node-RED are only used for login. The virtual homee always has only one default user with the username homee, but this one is not used for login.

The IP address in the virtHomee reply (payload.settings.wlan_ip_address) to in the settings is NOT the NodeRed instance run on. It seems to be a arbitrary x.x.178.222 IP, while the Node-Red instance runs w/in a docker instance with a local IP of 172.17.0.z and global IP of x.x.y.z

The reported IP address should not matter for the intended use.

If the login does not work, it is mostly due to wrong credentials or a wrong homee ID. As an alternative to the homee ID, you can specify the IP address of the docker host in the physical homee. For an extended output you can activate the debug mode of Node-RED.

stfnhmplr commented 3 years ago

Since no answer has come so far, I assume that the issue has been solved. If not, feel free to reopen the issue.