JNSwanson / ESP-Home-iBoost

ESPHOME Marlec iboost integration
MIT License
18 stars 2 forks source link

Installing/updating in the Home Assistant ESPHome addon? #6

Closed no1knows closed 11 months ago

no1knows commented 11 months ago

Has anyone managed to use the Home Assistant esphome addon to install/update the firmware? I just tried, and got the usual CC1101_RFx-related errors.

Does anyone know where you're supposed to copy the .cpp and .h files so that the esphome addon can see them when compiling? (Presumably somewhere in a docker container?). For now I've compiled the latest version back on my server (rather than RPi) manually using esphome cmdline, but would be great if we could update without doing that. Cheers!

tobes49 commented 11 months ago

Yea I used the ESP home add on.

You need to install a file editor add on for home assistant.

Once installed you navigate to config/esphome/.esphome/build/cc1101/src

Paste the files. CC1101_RFx.cpp and CC1101_RFx.h into this directory.

Please see my screen shot but I have renamed my CC1101 to iboost so use CC1101 Screenshot_20230820_133723_Home Assistant

Once done retry the install and all should be fine. 😊

I have found the update doesn't want to work wireless but not tried wire yet. (But also happy to not touch what's working)

no1knows commented 11 months ago

Thank you, that did the trick! Unfortunately the new version still seems to hang before anything useful happens, but that's another issue!

jfdawson commented 3 months ago

Many thanks for the code and inspiration so far but... I'm still trying to understand the ESPHome build environment, currently under HAOS on mini-pc. There was no .esphome under /homeassistant/esphome/ so I made /homeassistant/esphome/.esphome/build/cc1101/src and added the CC1101_RFx.cpp and CC1101_RFx.h files, but the build system does not seem to pick them up, I still get errors that suggest it is not being complied or linked, and as the build system is a mystery to me I'm not sure if this is correct or how to add by hand Errors: ... Linking .pioenvs/mini-d1-temp/firmware.elf /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/mini-d1-temp/src/main.cpp.o:(.literal._ZN11iBoostBuddy5setupEv[iBoostBuddy::setup()]+0x24): undefined reference to CC1101::reset()' /data/cache/platformio/packages/toolchain-xtensa-esp32/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: .pioenvs/mini-d1-temp/src/main.cpp.o:(.literal._ZN11iBoostBuddy5setupEv[iBoostBuddy::setup()]+0x28): undefined reference toCC1101::begin(unsigned int)' .... Any help much appreciated.

srchild commented 3 months ago

Have a look at this thread

You need to get inside the docker container if you are using HAOS

jfdawson commented 3 months ago

Many thanks - this explains many things I was struggling with in trying to understand HA. I did not realise things run in containers. Ignorance is definitely not bliss!

Just to confirm, The compile works now.

sm01-uk commented 1 month ago

I am encountering the same difficulties as you @jfdawson - would you be able to provide a little more detail on what you did to sort your problem? I am running HAOS on Raspberry Pi 4 and am trying to use the ESPHome addon to install the iBoost software. Any help would be much appreciated!

jfdawson commented 1 month ago

In essence I followed the instructions in the thread cited above by srchild above.

The essence is that ESPHOME runs inside a container under HAOS and you have to gain access to the container filesystem and copy the CC1101* files to the iboost/src folder.

If this does not make sense we can dig deeper....

sm01-uk commented 1 month ago

Hi John, thanks for the reply. I've managed to work out the concept of containers and now have files in the right place and a properly compiled installable. It doesn’t yet work with the iBoost but that is probably something to do with my soldering! Going to investigate further.

Thanks again for replying, Steve.

On 4 Jun 2024, at 18:49, John F Dawson @.***> wrote:

 In essence I followed the instructions in the thread cited above by srchild above.

The essence is that ESPHOME runs inside a container under HAOS and you have to gain access to the container filesystem and copy the CC1101* files to the iboost/src folder.

If this does not make sense we can dig deeper....

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.

sm01-uk commented 1 month ago

Morning John, one more question if I may. I've looked at the ESP logs and the radio part of the construction clearly isn't working as there is nothing radio related there. I suspect my soldering so am going to redo it with a new set of boards. Just a quick question though - I understand most of the wiring, but how did you connect the D6 and D2 on the mini board to the MISO on the CC1101? Initially I just soldered two wires to the CC1101 MISO and then the ends of those to D2 and D6 respectively. Is that the correct way of doing it? Please forgive my ignorance - I am very much an amateur!

Thanks for your help, Steve.

On Tue, 4 Jun 2024 at 19:29, Stephen Markus @.***> wrote:

Hi John, thanks for the reply. I've managed to work out the concept of containers and now have files in the right place and a properly compiled installable. It doesn’t yet work with the iBoost but that is probably something to do with my soldering! Going to investigate further.

Thanks again for replying, Steve.

On 4 Jun 2024, at 18:49, John F Dawson @.***> wrote:



In essence I followed the instructions in the thread https://github.com/JNSwanson/ESP-Home-iBoost/issues/10 cited above by srchild above.

The essence is that ESPHOME runs inside a container under HAOS and you have to gain access to the container filesystem and copy the CC1101* files to the iboost/src folder.

If this does not make sense we can dig deeper....

— Reply to this email directly, view it on GitHub https://github.com/JNSwanson/ESP-Home-iBoost/issues/6#issuecomment-2148087645, or unsubscribe https://github.com/notifications/unsubscribe-auth/ALUH7EJ6DXLSNBP4BWTS5XDZFX4Z7AVCNFSM6AAAAAA3WVJPW6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBYGA4DONRUGU . You are receiving this because you commented.Message ID: @.***>

jfdawson commented 1 month ago

Steve,

Essentially you are correct.

It took me a couple of attempts to get the wiring right, partly due to misreading the IO pins on the ESP board I had.

If you can send me a photo that shows the wiring and let me know which board model you are using I may be able to spot something.

Possibly best to send direct to my e-mail: jfd141@gmx.co.uk as this is a bit off thread.