yangqian / hass-cozylife

third party cozylife integration
MIT License
66 stars 14 forks source link

Where to place getconfig.py file? #16

Open dfawlt opened 11 months ago

dfawlt commented 11 months ago

Adding the repo using HACS doesn't create the getconfig.py file anywhere. So I've tried manually creating it and filling it with the code listed here.

Running it from the config/homeassistant directory gave me best "results" with it still not finding the 'request' or 'utils" modules.

kalandor122 commented 11 months ago

just use pip install request and pip install utils

iperezandres commented 11 months ago

I used "python3 -m pip install requests" to install the missing "requests". And then I changed getconfig.py, line 3, to "from custom_components.cozylife.tcp_client import tcp_client" and line 10 to "from custom_components.cozylife.utils import get_pid_list, get_sn" I have getconfig.py inside the config dir.

lmarcelocc commented 9 months ago

You can simple clone this repo on your computer and then scan your network. Be sure to have python3 installed and all other dependencies like request and utils.

Resuming:

  1. git clone https://github.com/yangqian/hass-cozylife.git
  2. python getconfig.py 192.168.1.2 192.168.1.254

Second command will scan all your network and will output the lines you need to past on your configuration.yaml