My hints on how to read/flash the ESP and install Home Assistant #281
Replies: 5 comments 1 reply
-
I added a note about 1. I never would have considered powering the Vue by mains when it is taken apart since it can be deadly! |
Beta Was this translation helpful? Give feedback.
-
Definitely! I had it connected though since I've been debugging the SAMD09. But yeah, for just flashing the ESP it's not needed and therefor way safer to power it via the 5V from the UART. |
Beta Was this translation helpful? Give feedback.
-
Are these notes intended for the 2 or 3? Right now they seem general enough to apply to both, but i would expect they might get more specific as info is added. |
Beta Was this translation helpful? Give feedback.
-
I flashed a VUE3 yesterday and updated the instructions, which are the same for VUE2 and VUE3. The first time I did this it all seemed so complicated, but it's all just really simple :) Anyway updated some info so it's going to be hopefully even easier for newbies. I installed it in a different house and this time I installed HA on a cheap Intel N100 server and it's actually even easier. Just write the image to the server (via a bootable linux USB stick), boot it up and you're done :) BTW for VUE2 and VUE3, the process above is the same. Just keep in mind that you need some slightly different YAML settings than the VUE2, specifically for the "i2c" part. Also you need different calibration values than the VUE2, otherwise your measured Voltage and power values will be too high. See: https://digiblur.com/2024/03/14/emporia-vue-gen3-esp32-esphome-home-assistant/ where the YAML file contains the correct values. You also might need to switch the main A clamp with the main C clamp. |
Beta Was this translation helpful? Give feedback.
-
Thanks for updating your instructions. I have my Vue3 but haven't tried to flash it yet. A few things I noted from reading your updated instructions now.
|
Beta Was this translation helpful? Give feedback.
-
So I wanted to try Home Assistant for the first time, but my main issue was that I had no clue of what all this is or what I even needed to do. There are bits and pieces everywhere, most like 'install this, then click there and there etc'. But no explanation of what we're doing in broad terms. So let me lay that out now. In broad terms you need to do:
Home assistant ("HA") is Linux software that you run on a server. It opens up a port, like all server software does of course, and once opened you can communicate with it via browser GUI. HA is perfect to install I guess on some cheap server like a N100 mini PC ($134 on amazon), that doesnt consume much power (6 watt). In that case follow this link: https://www.home-assistant.io/installation/generic-x86-64/ But if you're like me and just want to see how it all works, you most likely just want to run it on your windows PC. Which is actually relatively easy with virtualbox and an image that you can download. This page explains it quite well: https://www.home-assistant.io/installation/windows/
Anyway, I installed it on virtualbox, in which case you configure a virtual machine using linux, feed it the image that you can download there, make a few adjustment in the configuration like explained and just let it boot up.
If it all worked out, you now have HA up and running! If you didnt modify the port, it can now be accessed via a browser gui: http://homeassistant.local:8123/
If you can access the link above: congratulations, home assistant is running! BTW that GUI webpage is really all you'll ever need to manage your home assistant. Normally you won't need to access your linux server directly via a monitor. Only when the above link doesn't get active, you might need to check your linux server to find out what went wrong.
Now we need to install ESPhome. ESPhome is a plugin for Home assistant. You can install plugins, like this one, directly from within home asissant, by going to 'settings/plugins (or add-ons, not sure what's it called) and then go to the store, at the bottom right. There choose ESPhome, install it and start it. You know it all worked when you can open:
http://homeassistant.local:8123/hassio
And then it should show the ESPHome plugin. If you click on that it should bring you to the ESPhome homepage. I think there was a button 'install' there, not sure. Anyway when it's ready it should show 'open web-ui' . There you can then select 'New Device' where our specific journey regarding our VUE2 starts! It will ask you for a wifi password and SSID. It's important to put those in right! It will save them to the "SECRETS", which can be accessed from the ESPhome homepage if you want to change it, upper right corner it says "SECRETS". Why this is important is that if you have set that up correctly, you do NOT need to change your wifi credentials in the yaml file! You can just leave it like this:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
It will then automatically put the ones you have in SECRETS into your firmware.
Anyway, then you basically use the yaml file that was supplied with this project. What you then need to do is build the firmware based on these yaml settings. First make sure you clicked 'verify' so that it checks that the yaml settings are all fine. Then you can build the firwmare and at the end it will then download the compiled .bin for you. You can chose new format file or old. I flashed it myself with "esphome flasher" https://github.com/esphome/esphome-flasher/releases that requires the old firmware format!!! BTW there are several methods to flash, you could use the tool above, or you could just use the commandline, like explains on this website, or you could do it even via the web GUI. But I chose to do it via the flasher I just linked. The only thing is that you need to make sure that the firmware format coincides with your flashing tool (legacy, old layout (=flasher tool above) or new format (= webgui).
Anyway, then just flash it:
The instructions were a bit unclear to me. I guess this is important:
When it's flashed, boot up the VUE normally (no bootloader mode). Make sure you have the antenna connected. You should see a message in the messages part of home assistant, where it says it found new hardware. Then you can add it to home assistant and you're done! If there appears no message, make sure your antenna is connected and the SSID/password that you put into SECRETS are correct. If you have the UART connected, it will output debug messages that you can see in the flasher tool that I linked or with PUTTY. This should help you to figure out what's wrong.
Anyway I wanted to add this info as this was all a bit unclear to me. I'm sure this will be helpful some day to somebody here.
Ah, lastly, at first it wouldnt work for some reason, my wifi wouldnt work. If that happens (and you're sure the antenna is connected), probably best to start over again with a new yaml file, recompile the firmware from start. You might want to open up the compiled firmware with a hex editor to make sure your wifi password and SSID is inside and is correct. And then flash it.
EDIT It's possible that the link http://homeassistant.local:8123/ doesn't work. In that case, connect your server to a monitor, in the welcome screen it shows the IP, so replace that link with that IP (so for example 192.168.0.200:8123) and check again if that works.
Good luck!
Beta Was this translation helpful? Give feedback.
All reactions