Hi,
after not updating esphome for a while (last version used is 2022.10.1) I updated to 2023.10.4.
I am using virtual environments on macOS.
After setup new environment for esphome 2023.10.4 I can compile my yaml code. Most esphome commands (clean, compile, logs, mqtt-clean) are working.
But when I try to upload (OTA) the new binary to my device I get the following error:
INFO ESPHome 2023.10.4
INFO Reading configuration wz-aq-vindriktning.yaml...
Traceback (most recent call last):
File "/Users/ulrich/devkits/esphome_2023_10_4/bin/esphome", line 8, in <module>
sys.exit(main())
^^^^^^
File "/Users/ulrich/devkits/esphome_2023_10_4/lib/python3.12/site-packages/esphome/__main__.py", line 1036, in main
return run_esphome(sys.argv)
^^^^^^^^^^^^^^^^^^^^^
File "/Users/ulrich/devkits/esphome_2023_10_4/lib/python3.12/site-packages/esphome/__main__.py", line 1023, in run_esphome
rc = POST_CONFIG_ACTIONS[args.command](args, config)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ulrich/devkits/esphome_2023_10_4/lib/python3.12/site-packages/esphome/__main__.py", line 425, in command_upload
exit_code = upload_program(config, args, port)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/ulrich/devkits/esphome_2023_10_4/lib/python3.12/site-packages/esphome/__main__.py", line 331, in upload_program
config, args.username, args.password, args.client_id
^^^^^^^^^^^^^
AttributeError: 'Namespace' object has no attribute 'username'
My device uses MQTT. Home Assistant API is disabled. mDNS is also disabled.
Switching to my 2022.10.1 esphome environment I can upload the binary compiled by 2023.10.4 to my device. So maybe something is missing inside my yaml?
What could I do, to upload my binary using the esphome 2023.10.4 CLI?
Yes. Bot don’t know where I have to start searching. Could narrow down the error to esphome 2023.6.1. Thats the first version where this error occurs.
But there is only one none breaking change inside mqtt. Could not find other relevant changes?
To get rid of side effects or incompatible versions I used docker images for my testings.
Maybe someone has an idea? Any help is appreciated.
Your YAML seems fine to me and the fact that you seem to be able to compile it also suggest so.
It is the upload that is the issue.
I can’t see what should cause it, so you need someone with an understanding of the ESPHome code and not the YAML parsing.
I can suggest that you add more to you secret file, so things like usernames and maybe also URL to services gets included. I can see you have them changed and they would likely be the same over multiple devices, so one spot to change them all might be nice, if you need to change them in the future.
You are right. Only upload command is failing. All other cli commands works fine.
Tanks for your suggestions. Next week I will do some tests with a complete new configuration and module.
Maybe I could than narrow down the issue why upload is failing.
Also created an issue in esphome GitHub. Maybe someone over there could help me.
Thanks for making a comment about it. It will help the next one with the problem that finds this thread.
Could you post a link to the Issue on Github, if you know it?