Comments (6)
Will do! It's actually quite simple: just navigate to the esphomelib root (which contains src
, examples
, etc.) and run the following command:
pio init --ide <THE_IDE>
Valid options for IDE are: atom, clion, codeblocks, eclipse, emacs, netbeans, qtcreator, sublimetext, vim, visualstudio, vscode. (I have only tested with clion, sublime text and vim; It may not work with some of the other ones without an additional setup)
from esphome-core.
When I run pio init --ide vim
in the directory I cloned esphomelib into I see:
Linking .pioenvs/livingroom/firmware.elf
Calculating size .pioenvs/livingroom/firmware.elf
text data bss dec hex filename
537954 150452 30144 718550 af6d6 .pioenvs/livingroom/firmware.elf
====================================================================== [SUCCESS] Took 8.84 seconds ======================================================================
=============================================================================== [SUMMARY] ===============================================================================
Environment livingroom [SUCCESS]
Environment dht-dallas-sensors [SKIP]
Environment switch-binarysensor [SKIP]
Environment fan-example [SKIP]
Environment lights [SKIP]
Environment livingroom8266 [SKIP]
Environment custombmp180 [SKIP]
Environment i2c-sensors [SKIP]
Environment pcf8574 [SKIP]
Environment fastled [SKIP]
====================================================================== [SUCCESS] Took 8.85 seconds ======================================================================
I also have a basic platformio project with a platformio.ini
of
[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
lib_deps = esphomelib
How do I get that to build with the modified version of esphomelib from my clone directory?
from esphome-core.
Ok, when you have lib_deps = esphomelib
it pulls in the latest esphomelib version from the platformio registry.
If you want to use a local version of esphomelib, you need to tell platformio to use it. To do this, there are two ways (neither probably works with windows, unfortunately):
a)
platformio.ini
:
[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
lib_deps =
and within your lolin32 project, run:
mkdir lib
ln -s /full/path/to/esphomelib lib/esphomelib
b) Use an absolute path for lib_deps
:
[env:lolin32]
platform = espressif32
board = lolin32
framework = arduino
lib_deps = file:///full/path/to/esphomelib
The problem with b) is that the latter copies the esphomelib directory and doesn't re-compile any updated files without a full clean+rebuild. a) on the other hand will automatically detect file changes in your esphomelib directory and compile the changes automatically.
from esphome-core.
OK, that makes sense -- but I don't understand where my esphomelib build is going. I sit somewhere under ~/.platformio? (I'm on OS X)
Also did pio init --ide vim
actually build all of esphomelib?
from esphome-core.
The build will go under <YOUR_PROJECT>/.pioenvs
(and some other files <YOUR_PROJECT>/.piolibdeps
). ~/.platformio
contains the toolchains and packages needed to build & upload the project.
You're right pio init --ide vim
does seem to do a full build, while the same command for my IDE pio init --ide clion
does not. platformio's build system is very complicated and I myself don't really understand it.
Also, once you've set up the project, you need to run pio run
within your project directory to build the project, and use pio run -t upload
to upload.
from esphome-core.
Better instructions are now in the docs under the contributing section. Closing...
from esphome-core.
Related Issues (20)
- Auto-load esphome component upon discovery by Home Assistant HOT 10
- esp32_ble_tracker scan_interval not used correctly HOT 1
- Firmware seems to have watchdog issues for esp32_ble_tracker HOT 1
- PMSx003 does not work
- MQ-2 Sensor. HOT 5
- [RGB Light Platform] Remember brightness and color after restart HOT 5
- Error in HA since 0.86 HOT 1
- DO NOT POST ISSUES HERE
- ESP32 goes to boot loops with option exrire_after HOT 1
- Error OTA update ESP8266 12e HOT 2
- MIC sensor, status fast change HOT 1
- esphomeyaml showing terminated process HOT 1
- esp32 access point not enabled HOT 1
- Update Failed: ERROR[8]: Flash config wrong real: 4194304 IDE: 16777216 HOT 1
- Returning NAN when using id.value HOT 1
- esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header HOT 1
- Ok, now I understand, so you want to have all three units show up as sensor at the same time. HOT 2
- witty cloud with LDR and RGB HOT 2
- Cannot connect to hidden SSID HOT 1
- ERROR Error binary size: Error: ESP has been flashed with wrong flash size. Please choose the correct 'board' option (esp01_1m always works) and then flash over USB. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esphome-core.