Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dependency wish list #586

Closed
onkelbeh opened this issue Feb 1, 2020 · 12 comments
Closed

Dependency wish list #586

onkelbeh opened this issue Feb 1, 2020 · 12 comments
Labels

Comments

@onkelbeh
Copy link

onkelbeh commented Feb 1, 2020

Hello Otto,

first, thanks a lot (again) for your phantastic work.

Describe the problem you have/What new integration you would like

For running ESPHome and the Dashboard in the same environment with HomeAssistant ~0.105.0b* the following module versions would be required, these are partly already met in your dev branch:

  • protobuf-3.10.1
  • paho-mqtt-1.5.0
  • pyyaml-5.3
  • platformio-4.1.0
  • colorlog-4.1.0

Would be nice if you could make a new release soon for the upcoming 0.105.0. It always feels better when a system runs with code approved by the author :-)

Please describe your use case for this integration and alternatives you've tried:

I am currently running esphome-1.14.3-r5 including the following patch:

src_prepare() {
	sed -e 's;protobuf==3.10.0;protobuf==3.10.1;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;paho-mqtt==1.4.0;paho-mqtt==1.5.0;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;PyYAML==5.1.2;PyYAML==5.3;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;platformio==4.0.3;platformio==4.1.0;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;colorlog==4.0.2;colorlog==4.1.0;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	eapply_user
}

and can confirm that everything is working (on my ~20 devices) as it should.

Additional context

@onkelbeh
Copy link
Author

My Gentoo Ebuild still can be run with HA 0.108.3 requirements with some harder deviations to the dependency check list.

Currently I use

src_prepare() {
	sed -e 's;protobuf==3.10.0;protobuf==3.11.4;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;paho-mqtt==1.4.0;paho-mqtt==1.5.0;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;PyYAML==5.1.2;PyYAML==5.3.1;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;platformio==4.0.3;platformio==4.3.1;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;colorlog==4.0.2;colorlog==4.1.0;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	eapply_user
}

Everything I use (including the dashboard) works again like a charm.

@glmnet glmnet added the Core label Apr 15, 2020
@glmnet
Copy link
Member

glmnet commented Apr 15, 2020

Ahh thanks for testing and reporting!!
In which context that code runs?
I believe I can try modifying dev with the version changes but I'm not sure which files should be upgraded other than

@onkelbeh
Copy link
Author

Hi Guillermo,

Here I have several virtual machines used only for Home Assitant, all running Gentoo Linux. I am maintaining Gentoo Overlay for Home Assitant, containing Ebuild Files for (nearly) all modules Home Assistant uses and for ESPHome & Platformio as long as these cannot be found in Gentoo's Main Repository.

With the help of Gentoo's package manager I can keep tight control of all installed python modules.

On my productive box Home Assistant (0.108.3, yes I know it's old, sorry, short on time during home office days) and ESPHome 1.14.3-r6 run without any virtual environments (except /etc/homeassistant/deps, which i try to keep empty) on Python 3.7.7-r1. Also I have a Box for development and testing with Python 3.7.7-r1, and another one for Python 3.8.2-r1. I wrote more about my setup in my README.md.

In my home about 30 ESP based devices are in productive duty, and about 15 more are only for tests and development. Most of these run ESPHome.
Some days ago I ran into an api problem with lots of output channels, where we already met, this brought me to Platformio 4.3.1, which also runs good, I intend to keep it.

Originated mostly from Home Assitant, after a big cleanup last week, I currently have the following packages installed on the production machine:

  • voluptuous-0.11.7-r1
  • PyYAML-5.3.1
  • paho-mqtt-1.5.0-r1
  • colorlog-4.1.0
  • tornado-5.1.1
  • protobuf-3.11.4
  • tzlocal-2.0.0-r1
  • pytz-2019.3
  • pyserial-3.4
  • ifaddr-0.1.6-r1

As far as I know, https://github.com/esphome/esphome/blob/dev/requirements.txt is not used for setup anyway, so I took ESPHome's dependencies only from setup.py. My Ebuild for ESPHome simply patches esphome.egg-info/requires.txt after unpacking the source prior calling setup.py.

This works great for me (and a unknown number of cloners) since I started using esphomeyaml-1.10.0.

:-) Thanks again a lot to you all, guys.

https://xkcd.com/1988/
grafik

@onkelbeh
Copy link
Author

In addition, made some tests with tornado-6.0.4, did not find any problems. 1.14.3 runs good with it.

@onkelbeh
Copy link
Author

Continuously getting better, currently (1.14.5) still open are:

src_prepare() {
	sed -e 's;tornado==5.1.1;tornado==6.0.4;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
	sed -e 's;protobuf==3.11.3;protobuf==3.11.4;' \
		-i esphome.egg-info/requires.txt \
		-i setup.py
}

Last update to (1.14.5): onkelbeh/HomeAssistantRepository@69b5264
Repo: dev-embedded/esphome

Thanks a lot for work.

@OttoWinter
Copy link
Member

Hi, thanks for trying to get gentoo builds.

I have a question though: Why not use python venvs? (Maybe gentoo's package manager doesn't have venv-like features?)

I understand it's a problem to get ESPHome and HA core to install on the same system without venvs because of the version conflicts.

With some packages, we could maybe relax the version pinning a bit (ifaddr, click, colorlog, protobuf, paho-mqtt) - in many other packages we really do need strict version pinning though:

  • voluptuous: We inject our own code to allow for better validation messages
  • PyYAML: We use our own Loader/Dumper - any change to PyYAML could potentially break it
  • tornado: AFAIK, the dashboard is incompatible with tornado v6 due to some of the changes to coroutines.
  • tzlocal/pytz: We heavily abuse internal data structures to efficiently build a tz string the ESP understands.
  • platformio: Injecting code

So for a bunch of packages it will be impossible to relax the version pinning.

@onkelbeh
Copy link
Author

onkelbeh commented Aug 2, 2020

Hello Otto,

you are very right, one of my main targets is to use Gentoo’s package manager, and yep, currently there’s no way to let it manage venvs. I kept HA's /etc/homeassistant/deps, but usually it is empty.

I understand that proper function is much more important than external compatibility, and version pinning makes things a lot easier. I mostly wanted to let you guys know about the versions I am using and that I did not see any problems. But I do not track the changes in the dependant libraries in detail, neither do I extensive testing, I just check if they work for my daily use.

On the other hand I believe that using the same libraries (as HA's core does) should make things easier for you, too.

Since esphome-1.15.0_beta my list is very short anyway:

  • HA's tensorflow component has a dep to protobuf-3.6.1, which I ignored for now, I assume no one here is using it.
  • check_config.py pins colorlog-4.1.0 (the only thing I had to patch in 1.15.0)
  • voluptuous, PyYAML, tzlocal/pytz and platformio are OK now

If you could just unpin colorlog, my list would be empty, except the new protobuf-3.12.4 upgrade :-)

As far as I know, a handful users (including me) are using the dashboard with my Ebuild. So I would say that tornado-6.0.4 works well, I have it running since it went stable in Gentoo's main repo in the beginning of May (during 1.14.4).

BTW: ifaddr and tornado are loaded even if the dashboard is not used. Without them even 'help' fails with import error. This behavior changed somewhere around 1.14.4.

If I can help testing anything, please let me know. And: again thanks a lot for this very cool stuff.

@OttoWinter
Copy link
Member

Oh ifaddr and tornado shouldn't be loaded when dashboard is not in use (helps keep startup times low). I'll check where that import is from.

@OttoWinter
Copy link
Member

I don't see any tornado import when running --help:

$ python3 -X importtime -m esphome --help
import time: self [us] | cumulative | imported package
import time:      1708 |       1708 | _frozen_importlib_external
import time:       373 |        373 |   time
import time:       869 |       1241 | zipimport
import time:       227 |        227 |     _codecs
import time:      1528 |       1755 |   codecs
import time:      1353 |       1353 |   encodings.aliases
import time:      1806 |       4913 | encodings
import time:       755 |        755 | encodings.utf_8
import time:       654 |        654 | _signal
import time:       861 |        861 | encodings.latin_1
import time:       179 |        179 |     _abc
import time:       904 |       1082 |   abc
import time:      1052 |       2134 | io
import time:       209 |        209 |       _stat
import time:       959 |       1168 |     stat
import time:      3133 |       3133 |     _collections_abc
import time:       352 |        352 |       genericpath
import time:       506 |        857 |     posixpath
import time:      1616 |       6773 |   os
import time:       422 |        422 |   _sitebuiltins
import time:       177 |        177 |     _locale
import time:       306 |        482 |   _bootlocale
import time:       438 |        438 |         types
import time:       636 |        636 |         warnings
import time:       287 |       1361 |       importlib
import time:       242 |        242 |       importlib.machinery
import time:       886 |       2488 |     importlib.abc
import time:       143 |        143 |             _operator
import time:       523 |        665 |           operator
import time:       176 |        176 |           keyword
import time:        70 |         70 |             _heapq
import time:       234 |        303 |           heapq
import time:       145 |        145 |           itertools
import time:       271 |        271 |           reprlib
import time:      1092 |       1092 |           _collections
import time:      1363 |       4012 |         collections
import time:        84 |         84 |           _functools
import time:       983 |       1066 |         functools
import time:       806 |       5882 |       contextlib
import time:       414 |       6296 |     importlib.util
import time:       255 |        255 |       _weakrefset
import time:       824 |       1078 |     threading
import time:       835 |      10696 |   _virtualenv
import time:       151 |        151 |     apport_python_hook
import time:       155 |        305 |   sitecustomize
import time:      7513 |      26190 | site
import time:       379 |        379 |     weakref
import time:       529 |        908 |   pkgutil
import time:       217 |       1124 | runpy
import time:       115 |        115 | esphome
import time:       706 |        706 |     enum
import time:        74 |         74 |       _sre
import time:       277 |        277 |         sre_constants
import time:       361 |        637 |       sre_parse
import time:       317 |       1027 |     sre_compile
import time:       178 |        178 |     copyreg
import time:       483 |       2392 |   re
import time:       867 |        867 |     locale
import time:       858 |       1725 |   gettext
import time:       934 |       5050 | argparse
import time:       162 |        162 |         token
import time:       979 |       1140 |       tokenize
import time:       141 |       1281 |     linecache
import time:       271 |       1552 |   traceback
import time:       161 |        161 |   collections.abc
import time:        39 |         39 |     _string
import time:       582 |        621 |   string
import time:        40 |         40 |   atexit
import time:      1731 |       4103 | logging
import time:        59 |         59 |   math
import time:       108 |        108 |   _datetime
import time:       673 |        839 | datetime
import time:       328 |        328 | esphome.const
import time:       149 |        149 |               _opcode
import time:       212 |        360 |             opcode
import time:       356 |        716 |           dis
import time:      1396 |       2111 |         inspect
import time:      1165 |       1165 |         voluptuous.error
import time:       434 |       3710 |       voluptuous.schema_builder
import time:       309 |        309 |             numbers
import time:       716 |       1024 |           _decimal
import time:       145 |       1169 |         decimal
import time:       125 |        125 |           urllib
import time:       818 |        942 |         urllib.parse
import time:      2409 |       4519 |       voluptuous.validators
import time:       177 |        177 |       voluptuous.util
import time:       191 |       8595 |     voluptuous
import time:      1418 |       1418 |       typing
import time:       132 |        132 |           fnmatch
import time:        71 |         71 |             nt
import time:        57 |         57 |             nt
import time:        65 |         65 |             nt
import time:        57 |         57 |             nt
import time:       196 |        444 |           ntpath
import time:        59 |         59 |           errno
import time:       681 |       1314 |         pathlib
import time:        80 |         80 |             zlib
import time:       257 |        257 |               _compression
import time:       193 |        193 |               _bz2
import time:       209 |        659 |             bz2
import time:       215 |        215 |               _lzma
import time:       214 |        429 |             lzma
import time:        42 |         42 |             pwd
import time:        31 |         31 |             grp
import time:       478 |       1716 |           shutil
import time:        34 |         34 |               _bisect
import time:       120 |        153 |             bisect
import time:        41 |         41 |             _sha512
import time:        30 |         30 |             _random
import time:       343 |        565 |           random
import time:       301 |       2581 |         tempfile
import time:       374 |       4268 |       esphome.helpers
import time:       729 |        729 |           signal
import time:        75 |         75 |           msvcrt
import time:        34 |         34 |           _posixsubprocess
import time:        50 |         50 |           select
import time:       483 |        483 |           selectors
import time:       408 |       1776 |         subprocess
import time:       423 |       2199 |       esphome.util
import time:       699 |       8583 |     esphome.core
import time:      1932 |       1932 |         esphome.cpp_generator
import time:       140 |        140 |           esphome.cpp_types
import time:       166 |        305 |         esphome.cpp_helpers
import time:       132 |       2368 |       esphome.codegen
import time:      2199 |       2199 |           platform
import time:       289 |        289 |           _uuid
import time:      1767 |       4254 |         uuid
import time:       585 |        585 |           difflib
import time:       217 |        802 |         esphome.voluptuous_schema
import time:      3687 |       8742 |       esphome.config_validation
import time:       820 |        820 |       esphome.automation
import time:       771 |        771 |       esphome.pins
import time:      1069 |      13768 |     esphome.core_config
import time:       271 |        271 |         yaml.error
import time:       253 |        253 |         yaml.tokens
import time:       240 |        240 |         yaml.events
import time:       149 |        149 |         yaml.nodes
import time:      4745 |       4745 |           yaml.reader
import time:       267 |        267 |           yaml.scanner
import time:       262 |        262 |           yaml.parser
import time:       164 |        164 |           yaml.composer
import time:        66 |         66 |                 _struct
import time:       110 |        176 |               struct
import time:        63 |         63 |               binascii
import time:       181 |        418 |             base64
import time:      1004 |       1422 |           yaml.constructor
import time:      1819 |       1819 |           yaml.resolver
import time:       299 |       8975 |         yaml.loader
import time:       248 |        248 |           yaml.emitter
import time:       157 |        157 |           yaml.serializer
import time:       323 |        323 |           yaml.representer
import time:       206 |        932 |         yaml.dumper
import time:        71 |         71 |           _yaml
import time:       124 |        194 |         yaml.cyaml
import time:       331 |      11341 |       yaml
import time:       153 |        153 |               _json
import time:       360 |        512 |             json.scanner
import time:       373 |        884 |           json.decoder
import time:       397 |        397 |           json.encoder
import time:       166 |       1447 |         json
import time:       102 |       1549 |       esphome.config_helpers
import time:       365 |      13253 |     esphome.yaml_util
import time:       466 |      44664 |   esphome.config
import time:       188 |        188 |   esphome.storage_json
import time:       209 |      45060 | esphome.writer
import time:       972 |        972 | textwrap
usage: __main__.py [-h] [-v] [-q] [-s key value]
                   [configuration [configuration ...]]
                   {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,clean,dashboard,vscode,update-all}
                   ...

ESPHome v1.16.0-dev

positional arguments:
  configuration         Your YAML configuration file.
  {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,clean,dashboard,vscode,update-all}
                        Commands
    config              Validate the configuration and spit it out.
    compile             Read the configuration and compile a program.
    upload              Validate the configuration and upload the latest
                        binary.
    logs                Validate the configuration and show all MQTT logs.
    run                 Validate the configuration, create a binary, upload
                        it, and start MQTT logs.
    clean-mqtt          Helper to clear an MQTT topic from retain messages.
    wizard              A helpful setup wizard that will guide you through
                        setting up esphome.
    mqtt-fingerprint    Get the SSL fingerprint from a MQTT broker.
    version             Print the esphome version and exit.
    clean               Delete all temporary build files.
    dashboard           Create a simple web server for a dashboard.
    vscode              ==SUPPRESS==
    update-all          ==SUPPRESS==

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Enable verbose esphome logs.
  -q, --quiet           Disable all esphome logs.
  -s key value, --substitution key value
                        Add a substitution

@onkelbeh
Copy link
Author

onkelbeh commented Aug 15, 2020

Sorry for keeping you waiting, was a busy week. This is how it looks here:

root@g18-hasstest:/usr/portage/homeassistant/dev-embedded/esphome # python3 -X importtime -m esphome --help
import time: self [us] | cumulative | imported package
import time:       158 |        158 | zipimport
import time:       744 |        744 | _frozen_importlib_external
import time:       162 |        162 |     _codecs
import time:       751 |        913 |   codecs
import time:       623 |        623 |   encodings.aliases
import time:       923 |       2457 | encodings
import time:       334 |        334 | encodings.utf_8
import time:       194 |        194 | _signal
import time:       545 |        545 | encodings.latin_1
import time:        84 |         84 |     _abc
import time:       391 |        475 |   abc
import time:       444 |        918 | io
import time:       181 |        181 |       _stat
import time:       367 |        547 |     stat
import time:      1584 |       1584 |     _collections_abc
import time:       208 |        208 |       genericpath
import time:       521 |        728 |     posixpath
import time:      1035 |       3893 |   os
import time:       308 |        308 |   _sitebuiltins
import time:       794 |        794 |   sitecustomize
import time:       119 |        119 |   usercustomize
import time:      1404 |       6516 | site
import time:       540 |        540 |       types
import time:       489 |        489 |       warnings
import time:       280 |       1308 |     importlib
import time:       322 |       1630 |   importlib.machinery
import time:       608 |        608 |     importlib.abc
import time:        99 |         99 |           _operator
import time:      1107 |       1206 |         operator
import time:       237 |        237 |         keyword
import time:       287 |        287 |           _heapq
import time:       310 |        596 |         heapq
import time:       193 |        193 |         itertools
import time:       316 |        316 |         reprlib
import time:       219 |        219 |         _collections
import time:      1294 |       4059 |       collections
import time:        78 |         78 |         _functools
import time:      1071 |       1148 |       functools
import time:      1057 |       6263 |     contextlib
import time:       448 |       7318 |   importlib.util
import time:       307 |        307 |       _weakrefset
import time:       647 |        954 |     weakref
import time:       648 |       1602 |   pkgutil
import time:       573 |      11121 | runpy
import time:       252 |        252 | esphome
import time:       948 |        948 |     enum
import time:       180 |        180 |       _sre
import time:       433 |        433 |         sre_constants
import time:       567 |        999 |       sre_parse
import time:       493 |       1671 |     sre_compile
import time:       150 |        150 |     _locale
import time:       241 |        241 |     copyreg
import time:       938 |       3946 |   re
import time:      1141 |       1141 |     locale
import time:      1629 |       2769 |   gettext
import time:      1442 |       8157 | argparse
import time:       159 |        159 |   time
import time:       234 |        234 |         token
import time:      1314 |       1547 |       tokenize
import time:       239 |       1785 |     linecache
import time:       432 |       2217 |   traceback
import time:       282 |        282 |   collections.abc
import time:        56 |         56 |     _string
import time:      1122 |       1177 |   string
import time:       839 |        839 |   threading
import time:        63 |         63 |   atexit
import time:      1465 |       6200 | logging
import time:       302 |        302 |   math
import time:       453 |        453 |   _datetime
import time:      1339 |       2093 | datetime
import time:       605 |        605 | esphome.const
import time:       222 |        222 |               _opcode
import time:       408 |        629 |             opcode
import time:       647 |       1276 |           dis
import time:      1960 |       3235 |         inspect
import time:       857 |        857 |         voluptuous.error
import time:      1496 |       5587 |       voluptuous.schema_builder
import time:       560 |        560 |             numbers
import time:       880 |       1439 |           _decimal
import time:       227 |       1666 |         decimal
import time:       189 |        189 |           urllib
import time:      1228 |       1417 |         urllib.parse
import time:      4144 |       7226 |       voluptuous.validators
import time:       345 |        345 |       voluptuous.util
import time:       397 |      13553 |     voluptuous
import time:      2022 |       2022 |       typing
import time:       213 |        213 |           fnmatch
import time:       123 |        123 |             nt
import time:       104 |        104 |             nt
import time:       107 |        107 |             nt
import time:       353 |        685 |           ntpath
import time:       116 |        116 |           errno
import time:      1136 |       2149 |         pathlib
import time:       348 |        348 |             zlib
import time:       398 |        398 |               _compression
import time:       324 |        324 |               _bz2
import time:       408 |       1128 |             bz2
import time:       398 |        398 |               _lzma
import time:       412 |        809 |             lzma
import time:        76 |         76 |             pwd
import time:       345 |        345 |             grp
import time:       826 |       3528 |           shutil
import time:       792 |        792 |               _hashlib
import time:       237 |        237 |               _blake2
import time:       288 |        288 |               _sha3
import time:       386 |       1701 |             hashlib
import time:       214 |        214 |               _bisect
import time:       204 |        417 |             bisect
import time:       224 |        224 |             _random
import time:       586 |       2927 |           random
import time:       624 |       7077 |         tempfile
import time:       522 |       9747 |       esphome.helpers
import time:      1420 |       1420 |           signal
import time:       223 |        223 |           _posixsubprocess
import time:       296 |        296 |           select
import time:       797 |        797 |           selectors
import time:       781 |       3515 |         subprocess
import time:       924 |       4439 |       esphome.util
import time:      1336 |      17543 |     esphome.core
import time:      3999 |       3999 |         esphome.cpp_generator
import time:       253 |        253 |           esphome.cpp_types
import time:       326 |        579 |         esphome.cpp_helpers
import time:       286 |       4863 |       esphome.codegen
import time:       289 |        289 |           _uuid
import time:       655 |        944 |         uuid
import time:       820 |        820 |           difflib
import time:       331 |       1151 |         esphome.voluptuous_schema
import time:      6294 |       8388 |       esphome.config_validation
import time:      1417 |       1417 |       esphome.automation
import time:       882 |        882 |       esphome.pins
import time:      1927 |      17476 |     esphome.core_config
import time:       333 |        333 |         yaml.error
import time:       581 |        581 |         yaml.tokens
import time:       441 |        441 |         yaml.events
import time:       267 |        267 |         yaml.nodes
import time:      7869 |       7869 |           yaml.reader
import time:       648 |        648 |           yaml.scanner
import time:       391 |        391 |           yaml.parser
import time:       280 |        280 |           yaml.composer
import time:       279 |        279 |                 _struct
import time:       210 |        489 |               struct
import time:       296 |        296 |               binascii
import time:       453 |       1237 |             base64
import time:      1755 |       2992 |           yaml.constructor
import time:      4040 |       4040 |           yaml.resolver
import time:       559 |      16776 |         yaml.loader
import time:       454 |        454 |           yaml.emitter
import time:       299 |        299 |           yaml.serializer
import time:       416 |        416 |           yaml.representer
import time:       404 |       1572 |         yaml.dumper
import time:       535 |        535 |           _yaml
import time:       516 |       1051 |         yaml.cyaml
import time:      1096 |      22113 |       yaml
import time:       241 |        241 |               _json
import time:       590 |        830 |             json.scanner
import time:       715 |       1545 |           json.decoder
import time:       627 |        627 |           json.encoder
import time:       340 |       2510 |         json
import time:       197 |       2707 |       esphome.config_helpers
import time:       651 |      25471 |     esphome.yaml_util
import time:       666 |      74707 |   esphome.config
import time:       319 |        319 |   esphome.storage_json
import time:       348 |      75373 | esphome.writer
import time:      1603 |       1603 | textwrap
usage: __main__.py [-h] [-v] [-q] [-s key value]
                   [configuration [configuration ...]]
                   {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,clean,dashboard,vscode,update-all}
                   ...

ESPHome v1.16.0-dev

positional arguments:
  configuration         Your YAML configuration file.
  {config,compile,upload,logs,run,clean-mqtt,wizard,mqtt-fingerprint,version,clean,dashboard,vscode,update-all}
                        Commands
    config              Validate the configuration and spit it out.
    compile             Read the configuration and compile a program.
    upload              Validate the configuration and upload the latest
                        binary.
    logs                Validate the configuration and show all MQTT logs.
    run                 Validate the configuration, create a binary, upload
                        it, and start MQTT logs.
    clean-mqtt          Helper to clear an MQTT topic from retain messages.
    wizard              A helpful setup wizard that will guide you through
                        setting up esphome.
    mqtt-fingerprint    Get the SSL fingerprint from a MQTT broker.
    version             Print the esphome version and exit.
    clean               Delete all temporary build files.
    dashboard           Create a simple web server for a dashboard.
    vscode              ==SUPPRESS==
    update-all          ==SUPPRESS==

optional arguments:
  -h, --help            show this help message and exit
  -v, --verbose         Enable verbose esphome logs.
  -q, --quiet           Disable all esphome logs.
  -s key value, --substitution key value
                        Add a substitution

But, if I call it directly (without tornado installed):

root@g18-hasstest:/usr/portage/homeassistant/dev-embedded/esphome # esphome
Traceback (most recent call last):
  File "/usr/lib/python-exec/python3.7/esphome", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3251, in <module>
    @_call_aside
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 900, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python3.7/site-packages/pkg_resources/__init__.py", line 786, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'tornado==6.0.4' distribution was not found and is required by esphome
   [1]   root@g18-hasstest:/usr/portage/homeassistant/dev-embedded/esphome #

Seems that something is parsing /usr/lib/python3.7/site-packages/esphome-1.16.0.dev0-py3.7.egg-info/requires.txt. If I take out tornado there, it can be started.

@onkelbeh
Copy link
Author

Yeay.
Current dev tree is even with Home Assitants dependencies!
Thanks!

@nagyrobi
Copy link
Member

nagyrobi commented Jul 5, 2022

Seems fixed to me. If not, please let me know and I reopen.

@nagyrobi nagyrobi closed this as completed Jul 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants