-
Notifications
You must be signed in to change notification settings - Fork 819
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
Make configuring WiFi and MQTT over MQTT optional #986
Conversation
- define MQTTsetWIFI for configuring WiFi over MQTT - define MQTTsetMQTT for configuring MQTT over MQTT Per default both are disabled to save space to OTA flash a Sonoff RF Bridge.
751118a
to
ba15283
Compare
Define 'MQTTsetWIFI' to activate this | ||
``` | ||
build_flags = '-DMQTTsetWIFI' | ||
``` | ||
|
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.
I think we can remove this, this function is not impacting a lot the program size
Define 'MQTTsetMQTT' to activate this | ||
``` | ||
build_flags = '-DMQTTsetMQTT' | ||
``` |
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.
Rather than defining it as a add, I would prefer to make it default for ESP and remove it for the RFBridge:
[com-esp]
lib_deps =
${env.lib_deps}
${libraries.wifimanager}
build_flags =
${env.build_flags}
'-DsimpleReceiving=true'
'-DZmqttDiscovery="HADiscovery"'
'-DTRACE=1'
'-DCONFIG_BT_NIMBLE_ROLE_PERIPHERAL_DISABLED'
'-DCONFIG_BT_NIMBLE_ROLE_BROADCASTER_DISABLED'
'-DMQTTsetMQTT'
;'-DCORE_DEBUG_LEVEL=4'
[env:rfbridge]
platform = ${com.esp8266_platform}
board = esp8285
lib_deps =
${com-esp.lib_deps}
${libraries.esp8266_mdns}
build_flags =
${com-esp.build_flags}
'-DZgatewaySRFB="SRFB"'
'-DLED_INFO=13'
'-DLED_INFO_ON=0'
'-DGateway_Name="OpenMQTTGateway_SRFB"'
'-UMQTTsetMQTT' ;We remove this function to have sufficient FLASH available for OTA, you should also use ESPWifiManualSetup to save flash memory and have OTA working
board_build.flash_mode = dout
# ifdef MQTTsetWIFI | ||
if (SYSdata.containsKey("wifi_ssid") && SYSdata.containsKey("wifi_pass")) { |
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.
I propose to remove it
Forked and modification applied on #1021, thanks for seeing this! |
…1046) * Disable MQTTsetMQTT and MQTT_HTTPS_FW_UPDATE to allow OTA for Avatto Bakery IR Trying to update my Avattos with the currently released 0.9.8 I found that OTA wasn't possible any longer as the build was now to large 0.9.8 Checking size .pio/build/avatto-bakeey-ir/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [==== ] 42.4% (used 34772 bytes from 81920 bytes) Flash: [====== ] 55.2% (used 528716 bytes from 958448 bytes) this goes back to 0.9.7, where WiFi, MQTT and firmware update was introduced over MQTT commands 0.9.7 Checking size .pio/build/avatto-bakeey-ir/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [==== ] 42.4% (used 34772 bytes from 81920 bytes) Flash: [====== ] 55.2% (used 528716 bytes from 958448 bytes) Going back to building 0.9.6 I was able to OTA update again with the much smaller build 0.9.6 Checking size .pio/build/avatto-bakeey-ir/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [==== ] 39.7% (used 32512 bytes from 81920 bytes) Flash: [==== ] 41.4% (used 396804 bytes from 958448 bytes) Building 0.9.8 with the flags brings the build back to OTAable size 0.9.8 with '-UMQTTsetMQTT' '-UMQTT_HTTPS_FW_UPDATE' Checking size .pio/build/avatto-bakeey-ir/firmware.elf Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" RAM: [==== ] 39.9% (used 32684 bytes from 81920 bytes) Flash: [==== ] 42.3% (used 405024 bytes from 958448 bytes) Similar to the flag setting in [env:rfbridge] I'm not even sure if MQTT_HTTPS_FW_UPDATE would even work on the Avatto, with the limited flash memory. Should we also add board_build.ldscript = eagle.flash.1m64.ld as a default, as it's required for OTA updates on the Avattos as discussed in #763 (comment) ? * Doc addition for restricted MQTT options Doc addition for #1046 and #986
Per default both are disabled to save space to OTA flash a Sonoff RF Bridge.
Fixes issue Issues OTA flashing Sonfoff RF Bridge #985.