Commit Graph

117 Commits

Author SHA1 Message Date
Piyush Shah
1ddf30c7b2 Merge branch 'feature/timezone' into 'master'
esp_rmaker_time_sync: Add support for POSIX timezones

See merge request app-frameworks/esp-rainmaker!155
2020-09-04 22:51:44 +08:00
Piyush Shah
2e82d0a2c2 Merge branch 'bugfix/ota_long_url' into 'master'
esp_rmaker_ota: Changes to support longer OTA URLs

See merge request app-frameworks/esp-rainmaker!160
2020-09-04 21:59:27 +08:00
Piyush Shah
56d9e43163 Merge branch 'task/ota_api_update' into 'master'
cli: Update upload OTA image API

See merge request app-frameworks/esp-rainmaker!161
2020-09-04 19:22:04 +08:00
Piyush Shah
d7a1cf36e4 esp_rmaker_ota: Changes to support longer OTA URLs
This required 2 changes
1. Handle longer messages received on MQTT
2. Handle longer URLs in the http client configuration in OTA
2020-09-04 12:27:19 +05:30
Shivani Tipnis
dc1d6b82b0 cli: Update upload OTA image API 2020-09-04 12:19:15 +05:30
Piyush Shah
90354df231 esp_rmaker_console: Added commands for time get and timezone set
Examples:

tz-set posix CST-8
I (25752) esp_rmaker_time_sync: The current time is: Tue Sep  1 21:48:13 2020 +0800[CST], DST: No.

tz-set America/Los_Angeles
I (70892) esp_rmaker_time_sync: The current time is: Tue Sep  1 06:48:58 2020 -0700[PDT], DST: Yes.

local-time
esp_rmaker_commands: Current local time: Tue Sep  1 06:49:21 2020 -0700[PDT], DST: Yes
2020-09-04 00:30:17 +05:30
Piyush Shah
bf9de50955 esp_rmaker_time_sync: Add support for POSIX timezones
Raw APIs as well as a RainMaker service have been provided to manage timezones.
Timezone information is stored in NVS so that it stays even across reboots.

A config option CONFIG_ESP_RMAKER_DEF_TIMEZONE has also been added to set the
default timezone.
2020-09-04 00:29:48 +05:30
Piyush Shah
5d664fc283 Merge branch 'feature/idf4.0_compat' into 'master'
IDF 4.0 compatibility mode

See merge request app-frameworks/esp-rainmaker!154
2020-09-01 20:08:00 +08:00
Piyush Shah
7d5c39eb83 idf4.0_compat: Minor changes for IDF 4.0 compatibility
If IDF version being used is 4.0, following changes will happen:
- tcpip_adapter will be used, instead of esp_netif.
- MQTT port 8883 will be used, even if 443 is chosen, because
443 requires ALPN options in MQTT, which aren't supported in IDF 4.0
2020-09-01 16:08:09 +05:30
Piyush Shah
f4767018f9 ws2812_led: Simplify WS2812 RGB LED handling logic and also allow disabling it
The common code for WS2812 RGB LED has been moved to a component ws2812_led.

The WS2812 LED is available only on ESP32-S2-Saola-1 boards and hence
it will be enabled only if IDF target is set to ESP32S2. It can
be disabled by disabling the CONFIG_WS2812_LED_ENABLE config option.

led_strip component files have also been moved to ws2812_led
2020-09-01 16:07:57 +05:30
Piyush Shah
0f4901475a Merge branch 'task/claim_workflow_update' into 'master'
cli: Maintain same host driven claiming workflow for all platforms

See merge request app-frameworks/esp-rainmaker!156
2020-08-26 21:40:01 +08:00
Shivani Tipnis
1c18b08308 cli: Maintain same host driven claiming workflow for all platforms 2020-08-26 18:41:03 +05:30
Piyush Shah
04adf40a35 Merge branch 'feature/wifi_reset' into 'master'
examples: Separate wifi-reset and factory-reset

See merge request app-frameworks/esp-rainmaker!142
2020-08-26 15:02:27 +08:00
Piyush Shah
e0385e9ec3 iot_button: Minor fix in header file to prevent compilation warnings 2020-08-21 23:22:27 +05:30
Piyush Shah
196bcb2d41 examples: Use the new wifi-reset and factory-reset APIs 2020-08-21 23:21:53 +05:30
Piyush Shah
7be8b6e9d4 esp_rmaker_utils: Add helper functions for Wi-Fi and factory reset
Also added events for these.
2020-08-19 23:56:16 +05:30
Piyush Shah
4628715d35 Merge branch 'bugfix/str_list_warning' into 'master'
Fixed a minor compilation warning

See merge request app-frameworks/esp-rainmaker!152
2020-08-19 21:55:32 +08:00
Piyush Shah
2a478e25f8 Fixed a minor compilation warning 2020-08-19 16:47:25 +05:30
Piyush Shah
3c7a563beb Merge branch 'feature/valid_vals' into 'master'
esp_rmaker_core: Add a facility to add a valid set of string values

See merge request app-frameworks/esp-rainmaker!83
2020-08-19 13:36:55 +08:00
Piyush Shah
1cca9ba4c4 esp_rmaker_core: Add a facility to add a valid set of string values
Some string parameters may want to have a set of valid values which
it wants the client (phone apps primarily) to show in a dropdown.
A new API esp_rmaker_param_add_valid_str_list() has been added for that.
2020-08-19 10:37:01 +05:30
Piyush Shah
f74179b771 Merge branch 'task/ci-use-github' into 'master'
gitlab-ci: Changes to esp-idf path to provide more flexibility in CI

See merge request app-frameworks/esp-rainmaker!151
2020-08-19 13:05:44 +08:00
Piyush Shah
0eafc0d20f gitlab-ci: Changes to esp-idf path to provide more flexibility in CI 2020-08-18 23:51:53 +05:30
Piyush Shah
475983131c Merge branch 'feature/json_obj_arr' into 'master'
Add facility for Objects and Arrays in Parameters

See merge request app-frameworks/esp-rainmaker!123
2020-08-06 19:35:45 +08:00
Piyush Shah
a9d1d4792a Merge branch 'feature/console_prov' into 'master'
esp_rmaker_console: Add a command for Wi-Fi provisioning

See merge request app-frameworks/esp-rainmaker!143
2020-08-06 18:41:30 +08:00
Piyush Shah
ff78d1aa07 Merge branch 'bugfix/secure_pop' into 'master'
Generate secure proof of possession

See merge request app-frameworks/esp-rainmaker!135
2020-08-06 14:56:09 +08:00
Piyush Shah
94254771fc esp_rmaker_console: Add a command for Wi-Fi provisioning
Command: wifi-prov <ssid> [<passphrase>]
2020-08-06 12:11:27 +05:30
Shubham Patil
e19abab592 wifi_provisioning: Use a random pop instead of creating it from MAC address
MAC address is a public information and can also be sniffed easily. Creating the proof of
possession pin from that is not secure enough. Instead, a random stream of bytes is now generated
and stored in the fctry partition during claiming and that is used for the PoP.
2020-08-05 23:12:08 +05:30
Piyush Shah
67df92932e Merge branch 'feature/persistent_mqtt' into 'master'
esp_rmaker_mqtt: Added support for persistent sockets and use of port 443.

See merge request app-frameworks/esp-rainmaker!95
2020-08-04 01:50:02 +08:00
Piyush Shah
bbeb8f1d4d esp_rmaker_mqtt: Added support for persistent sockets and use of port 443
Using MQTT persistent session improves the reliability as the broker can then deliver any
pending QOS1 messages even after the node disconnects and then re-connects (within max 1hr).
However, it has a side-effect that messages can be received at unexpected times.
Please check the MQTT specs to understand persistent sessions.

Support for port 443 for MQTT has been enabled since it is generally open on most networks,
whereas port 8883 (default MQTT) could be blocked.
2020-08-03 19:28:32 +05:30
Piyush Shah
e24029fc90 esp_rmaker_core: Add support for Objects and Arrays in parameters
Validating the JSON arrays and objects would be the application's responsibility.
The RainMaker core will just treat them as strings (without the quotes, ofcourse).
2020-08-03 17:09:03 +05:30
Piyush Shah
b5cdfecdf7 json: Add facility to specifiy objects and arrays as strings
Eg. Add a pre-generated JSON object, say {"name":"val"} into another object, giving
a result {"pregen":{"name":"val"}}
Similarly allow to read entire object string during parsing.
2020-08-03 16:53:29 +05:30
Piyush Shah
c94d945958 Merge branch 'task/api_restructure' into 'master'
esp_rainmaker_core: Code restructure and API changes

See merge request app-frameworks/esp-rainmaker!136
2020-07-31 21:37:18 +08:00
Piyush Shah
a3a1d05531 esp_rainmaker_core: Code restructure and API changes
- APIs and data structures changed to a more object oriented approach.
- Some internal files split into multiple files to separate out functionality
  of node, device and parameter.
- A new doc file CHANGES.md added to help understand the changes.
- Modified all the examples as per these changes in the RainMaker APIs.
2020-07-31 16:16:21 +05:30
Piyush Shah
a0ed4fb536 Merge branch 'task/common_rainmaker_component' into 'master'
esp_rainmaker: Combine the various components into a single esp_rainmaker component

See merge request app-frameworks/esp-rainmaker!133
2020-07-23 01:59:49 +08:00
Piyush Shah
2bc2c7396f esp_rainmaker: Combine the various components into a single esp_rainmaker component
- Better exchange of data between different rainmaker components
- Single Kconfig file
- Easier to manage events and other common functionality
2020-07-22 19:16:04 +05:30
Piyush Shah
33a7446ba7 Merge branch 'feature/cpp_support' into 'master'
cpp support: Make header files compatible with CPP

See merge request app-frameworks/esp-rainmaker!131
2020-07-21 04:31:20 +08:00
Switi Mhaiske
b939945995 cpp support: Make header files compatible with CPP 2020-07-20 19:56:03 +05:30
Piyush Shah
dc64868533 Merge branch 'task/ci-changes' into 'master'
gitlab-ci: Get submodules during cloning step, instead of doing it later

See merge request app-frameworks/esp-rainmaker!134
2020-07-18 17:01:36 +08:00
Piyush Shah
28d52079e5 gitlab-ci: Get submodules during cloning step, instead of doing it later 2020-07-17 16:54:35 +05:30
Piyush Shah
44a7972b4a Merge branch 'bugfix/claim_compile' into 'master'
esp_claim: Fixed a compilation error introduced due to a previous commit

See merge request app-frameworks/esp-rainmaker!129
2020-07-14 03:41:39 +08:00
Piyush Shah
7d460768b7 esp_claim: Fixed a compilation error introduced due to a previous commit 2020-07-14 00:26:27 +05:30
Piyush Shah
27ec6dfef4 Merge branch 'bugfix/strncpy_usage' into 'master'
esp_rmaker_core: Fix usage of strncpy

See merge request app-frameworks/esp-rainmaker!128
2020-07-11 11:07:03 +08:00
Hrishikesh Dhayagude
c1831248ea esp_rmaker_core: Fix usage of strncpy 2020-07-10 21:47:34 +05:30
Piyush Shah
6692278a2f Merge branch 'bugfix/fix_typo_rmaker_doc' into 'master'
Docs: Minor fixes and additions

See merge request app-frameworks/esp-rainmaker!127
2020-07-08 18:07:47 +08:00
Shubham Patil
475984cd4f esp_rmaker_core: Fix typos in c api docs
Added
- Pointers to github repos of phone apps
2020-07-08 14:11:09 +05:30
Piyush Shah
8a89b3ad9d Merge branch 'feature/sntp_time_check' into 'master'
esp_rmaker_time_sync: Expose time_sync APIs.

See merge request app-frameworks/esp-rainmaker!118
2020-07-04 03:24:59 +08:00
Chirag Atal
4796f987b7 esp_rmaker_time_sync: Expose time_sync APIs. 2020-07-03 17:48:51 +05:30
Piyush Shah
5fb0e69932 Merge branch 'feature/rmaker_events' into 'master'
Add a framework for RainMaker Events

See merge request app-frameworks/esp-rainmaker!122
2020-07-03 11:02:30 +08:00
Piyush Shah
966a767755 switch: Add an event handler for RainMaker Events 2020-07-02 19:34:54 +05:30
Piyush Shah
15ccf7a7e9 esp_rmaker_core: Added support for some basic rainmaker events
Some RainMaker events could be useful for applications, either
to take some action, or trigger indicators. These are now
exposed using the ESP Events framework of ESP IDF.
2020-07-02 19:31:42 +05:30