-
Notifications
You must be signed in to change notification settings - Fork 636
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
Add support for the Zhilde ZLD-64EU-W #2342
Conversation
This is a power outlet with 6 power sockets and 4 USB ports.
#define DEBUG_SERIAL_SUPPORT 0 | ||
|
||
#define BUTTON1_PIN 3 | ||
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH | ||
#define BUTTON1_PRESS BUTTON_ACTION_NONE | ||
#define BUTTON1_RELAY 3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
re: serial debug / led & buttons never bothers to check for active gpio's. (i'll add some this weekend though... to avoid this subtle thing...)
should button still control the 3rd relay? should the action be the default 'switch relay' (just erasing the _PRESS line)? This needs BUTTON_ACTION_RELAY then
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideally I'd do whatever the original firmware did with that button. Alas, I never even tried it out before putting espurna on there, so have no idea. And I can't bring myself to install that spyware app on my phone either.
Incidentally this no longer builds since rebasing on dev
, since that branch doesn't build due to the BSEC proprietary library.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Incidentally this no longer builds since rebasing on dev, since that branch doesn't build due to the BSEC proprietary library.
Travis does not catch it, what's the error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Building in release mode
process_archive([".pio/build/zhilde-zld-64eu-w/libalgobsec_patched/libalgobsec.a"], [".pio/libdeps/zhilde-zld-64eu-w/BSEC Software Library/src/esp8266/libalgobsec.a"])
Mkdir(".pio/build/zhilde-zld-64eu-w/libalgobsec_patched/_tmpdir")
xtensa-lx106-elf-ar x /home/bert/src/espurna/code/.pio/libdeps/zhilde-zld-64eu-w/BSEC Software Library/src/esp8266/libalgobsec.a
Compiling .pio/build/zhilde-zld-64eu-w/lib260/ESP8266WiFi/WiFiServerSecureAxTLS.cpp.o
Compiling .pio/build/zhilde-zld-64eu-w/lib260/ESP8266WiFi/WiFiServerSecureBearSSL.cpp.o
Compiling .pio/build/zhilde-zld-64eu-w/lib260/ESP8266WiFi/WiFiUdp.cpp.o
Compiling .pio/build/zhilde-zld-64eu-w/lib06d/ESPAsyncTCP/AsyncPrinter.cpp.o
Compiling .pio/build/zhilde-zld-64eu-w/lib06d/ESPAsyncTCP/ESPAsyncTCP.cpp.o
Compiling .pio/build/zhilde-zld-64eu-w/lib06d/ESPAsyncTCP/ESPAsyncTCPbuffer.cpp.o
*** [.pio/build/zhilde-zld-64eu-w/libalgobsec_patched/libalgobsec.a] No such file or directory
I bet it's the spaces in the directory name, in the xtensa-lx106-elf line.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Debug log just tries to be clever with ' '.join(cmd)
, cwd might be wrong though? why it can't find the .a
espurna/code/scripts/espurna_utils/libalgobsec.py
Lines 33 to 38 in 3d1b82e
def run(cmd): | |
sys.stdout.write(" ".join(cmd)) | |
sys.stdout.write("\n") | |
subprocess.check_call(cmd, cwd=tmpdir) | |
run([env.subst("$AR"), "x", source[0].abspath]) |
...
process_archive([".pio/build/zhilde-64eu-w/libalgobsec_patched/libalgobsec.a"], [".pio/libdeps/zhilde-64eu-w/BSEC Software Library/src/esp8266/libalgobsec.a"])
Mkdir(".pio/build/zhilde-64eu-w/libalgobsec_patched/_tmpdir")
xtensa-lx106-elf-ar x /home/builder/espurna/code/.pio/libdeps/zhilde-64eu-w/BSEC Software Library/src/esp8266/libalgobsec.a
xtensa-lx106-elf-ar cr /home/builder/espurna/code/.pio/build/zhilde-64eu-w/libalgobsec_patched/libalgobsec.a applyScalarFunctionInPlace.c.o Bsec.c.o bsec_codegen_data.c.o bsec_codegen_do_steps.c.o bsec_codegen_get_configuration.c.o bsec_codegen_get_state.c.o bsec_codegen_get_version.c.o bsec_codegen_init.c.o bsec_codegen_reset_output.c.o bsec_codegen_rtwutil.c.o bsec_codegen_sensor_control.c.o bsec_codegen_set_configuration.c.o bsec_codegen_set_state.c.o bsec_codegen_update_subscription.c.o bsec_interface.c.o Channel.c.o ChannelHub.c.o constructor_bsec.c.o convertHumidity.c.o crcCcitt2.c.o Entity.c.o ExpSmoothing.c.o ExpSmoothingBsec.c.o GasHumidityBaselineTracker.c.o GasHumidityPreProcessor.c.o HumidityTemperatureCorrector.c.o IaqEstimator.c.o isequal.c.o log.c.o log10.c.o polyval.c.o SensorHeatCompensator.c.o SensorStatusTracker.c.o Serialization.c.o sin.c.o sqrt.c.o
Delete(".pio/build/zhilde-64eu-w/libalgobsec_patched/_tmpdir")
...
(works-for-me, and note that I renamed the env)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Python 2 is the reason btw, I'd assume implementation of subprocess does something different
We never test with 2.7 b/c of EOL and while PIO supports it by itself, it is not recommended
This is a power outlet with 6 power sockets and 4 USB ports.