Skip to content

Commit

Permalink
merged mDNS.
Browse files Browse the repository at this point in the history
  • Loading branch information
lomasSE89 committed Feb 28, 2024
2 parents 73730fc + 5bb9ff8 commit f3833b0
Show file tree
Hide file tree
Showing 159 changed files with 9,045 additions and 5,865 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
firmware/**
firmware/v*/**
firmware/releaseNote.txt
firmware/ezlopi/firmware/**
Expand Down
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,10 @@ foreach(component ${external_components_list})
LIST(APPEND ALL_COMPONENTS ${SUBDIRS})
endforeach()

set(EXTRA_COMPONENT_DIRS ${ALL_COMPONENTS} ezlopi-user-config ezlopi-main) # add the list of directories 'SUBDIRS' to 'EXTRA_COMPONENT_DIRS'(ESP32 VARIABLES), links the external components
message(STATUS "EXTRA_COMPONENTS_DIRS: ${EXTRA_COMPONENTS_DIRS}\r\n")
LIST(APPEND ALL_COMPONENTS ezlopi-user-config ezlopi-main)

set(EXTRA_COMPONENT_DIRS ${ALL_COMPONENTS} ) # add the list of directories 'SUBDIRS' to 'EXTRA_COMPONENT_DIRS'(ESP32 VARIABLES), links the external components
message(STATUS "EXTRA_COMPONENTS_DIRS: ${EXTRA_COMPONENT_DIRS}\r\n")

## ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ##
project(Ezlo_Pi_v3x)
20 changes: 12 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@

[![GitHub issues](https://img.shields.io/github/issues/ezloteam/Ezlo_Pi)](https://github.com/ezloteam/Ezlo_Pi/issues) [![GitHub forks](https://img.shields.io/github/forks/ezloteam/Ezlo_Pi)](https://github.com/ezloteam/Ezlo_Pi/network)

# ezlopi
<picture>
<img src="ezlopi-doc/ezlopi_cover.png" align="center" >
</picture>

# EzloPi
EzloPi is a collaborative open-source project developed by Ezlo Innovation to enhance the functionalities of devices and platforms powered by the ESP32 chipset. It offers exceptional features that allow seamless configuration and control of ESP-based devices, empowering you to transform your automation concepts into reality.
Checkout our [website](https://www.ezlopi.com/) for further guide and examples

Expand All @@ -20,11 +24,11 @@ Checkout our [website](https://www.ezlopi.com/) for further guide and examples
# 1. Getting started
EzloPi features a [web-based configurator](https://config.ezlopi.com/) that allows you to easily configure your ESP32 device for various supported features. The web interface provides a user-friendly platform to set up relays, analog inputs, digital inputs, and I2C-based sensors on your ESP32 device with ease. Once configured, you can leverage our cloud and mobile app services to remotely control your device in real-time.

![EzloPi web configurator](ezlop-doc/ezlopi_web_flasher.png)
![EzloPi web configurator](ezlopi-doc/ezlopi_web_flasher.png)

# 2. Customizing and building EzloPi firmware in your local setup
It is required to have [ESP-IDF](https://github.com/espressif/esp-idf) installed in your machine.
Install ESP-IDF with taking help from the docs [here](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/). ESP-IDF version [v4.4.4-292-g7894f032f6-dirty](https://github.com/espressif/esp-idf/releases/tag/v4.4.4).
Install ESP-IDF with taking help from the docs [here](https://docs.espressif.com/projects/esp-idf/en/v4.4.4/esp32/). ESP-IDF version [v4.4.6](https://github.com/espressif/esp-idf/releases/tag/v4.4.6).

### 1. Clone the Ezlo-Pi Repository from GitHub

Expand All @@ -34,33 +38,33 @@ Navigate to your terminal or bash shell and execute the following commands:
git clone --recursive git@github.com:ezloteam/Ezlo_Pi.git ezlopi
cd ezlopi/firmware/ezlopi
```
### 3. Configure the Projec
### 2. Configure the Projec
You need to configure the project as per the chip type you are using. It needs to be modified the file ```sdkconfig``` , equivalent to making changes with ```idf.py menuconfig```.
EzloPi needs to have constant set of configurations which are defined for different variants of chips and saved in the file such that ```sdkconfig.<chip type>.<flash size>```. Copy the content of the chip you are using and paste it into ```sdkconfig```. For example if I want to build and run this firmware on ESP32C3 with 4MB of memory, I need to copy content of ```[sdkconfig.esp32c3.4mb](sdkconfig.esp32c3.4mb)``` into ```sdkconfig``` or rename the file ```sdkconfig.esp32c3.4mb``` to ```sdkconfig```, clean the existing build with ```idf.py fullclean``` and then build as mentioned at #2. The list of pre-defined ```sdkconfig``` for different varients of ESP32 are listed as :
EzloPi needs to have constant set of configurations which are defined for different variants of chips and saved in the file such that ```sdkconfig.<chip type>.<flash size>```. Copy the content of the chip you are using and paste it into ```sdkconfig```. For example if I want to build and run this firmware on ESP32C3 with 4MB of memory, I need to copy content of [sdkconfig.esp32c3.4mb](sdkconfig.esp32c3.4mb) into ```sdkconfig``` or rename the file ```sdkconfig.esp32c3.4mb``` to ```sdkconfig```, and then build as mentioned at #2. The list of pre-defined ```sdkconfig``` for different variants of ESP32 are listed as :

* __[ESP32 4MB Standard](sdkconfig.esp32.4mb)__
* __[ESP32-S3 4MB ](sdkconfig.esp32s3.4mb)__
* __[ESP32-S3 8MB](sdkconfig.esp32s3.8mb)__
* __[ESP32-C3 4MB](sdkconfig.esp32c3.4mb)__


### 2. Build the Project
### 3. Build the Project

Execute the following command to build the project:

```bash
idf.py build
```

### 3. Flash the Firmware
### 4. Flash the Firmware

To flash the firmware, use the following command:

```bash
idf.py -p <COM Port Name> -b <baud> flash
```

### 4. Open Serial Monitor
### 5. Open Serial Monitor

To open the serial monitor, use the following command:

Expand Down
190 changes: 190 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,190 @@

<picture>
<img src="ezlopi-doc/ezlopi_logo.png" >
</picture>

# RELEASE NOTES

## Supported Ezlo Cloud APIs

1. [Items](https://api.ezlo.com/hub/items_api/index.html)
- [hub.items.list](https://api.ezlo.com/hub/items_api/index.html#hubitemslist)
- [hub.item.value.set (single item)](https://api.ezlo.com/hub/items_api/index.html#hubitemvalueset-single-item)

2. [Devices](https://api.ezlo.com/hub/devices_api/index.html)
- [hub.devices.list](https://api.ezlo.com/hub/devices_api/index.html#hubdeviceslist)
- [hub.device.name.set](https://api.ezlo.com/hub/devices_api/index.html#hubdevicenameset)
- [hub.device.room.set](https://api.ezlo.com/hub/devices_api/index.html#hubdeviceroomset)

3. [Device Settings](https://api.ezlo.com/hub/settings_api/index.html)
- [hub.device.settings.list](https://api.ezlo.com/hub/settings_api/index.html#hubdevicesettingslist)
- [hub.device.setting.value.set](https://api.ezlo.com/hub/settings_api/index.html#hubdevicesettingvalueset)
- [hub.device.setting.reset](https://api.ezlo.com/hub/settings_api/index.html#hubdevicesettingreset)

4. [Room](https://api.ezlo.com/hub/room/index.html)
- [hub.room.list](https://api.ezlo.com/hub/room/index.html#hubroomlist)
- [hub.room.create](https://api.ezlo.com/hub/room/index.html#hubroomcreate)
- [hub.room.name.set](https://api.ezlo.com/hub/room/index.html#hubroomnameset)
- [hub.room.get](https://api.ezlo.com/hub/room/index.html#hubroomget)
- [hub.room.delete](https://api.ezlo.com/hub/room/index.html#hubroomdelete)

5. [Common commands](https://api.ezlo.com/hub/common/index.html)
- [hub.info.get](https://api.ezlo.com/hub/common/index.html#hubinfoget)
- [hub.reboot](https://api.ezlo.com/hub/common/index.html#hubreboot)

6. [Network](https://log.ezlo.com/new/hub/network/)
- [hub.network.get](https://log.ezlo.com/new/hub/network/#hubnetworkget)
- [hub.network.wifi.scan.start](https://log.ezlo.com/new/hub/network/#hubnetworkwifiscanstart)
- [hub.network.wifi.scan.stop](https://log.ezlo.com/new/hub/network/#hubnetworkwifiscanstop)


7. [House Modes commands](https://api.ezlo.com/hub/house_modes_manager/index.html#house-modes-commands)
- [hub.modes.get](https://api.ezlo.com/hub/house_modes_manager/index.html#hubmodesget)
- [hub.modes.current.get](https://api.ezlo.com/hub/house_modes_manager/index.html#hubmodescurrentget)
- [hub.modes.switch](https://api.ezlo.com/hub/house_modes_manager/index.html#hubmodesswitch)


8. [Broadcasts](https://api.ezlo.com/hub/broadcasts/index.html)
- [hub.item.updated](https://api.ezlo.com/hub/broadcasts/index.html#hubitemupdated)
- [hub.room.created](https://api.ezlo.com/hub/broadcasts/index.html#hubroomcreated)
- [hub.room.deleted](https://api.ezlo.com/hub/broadcasts/index.html#hubroomdeleted)
- [hub.room.reordered](https://api.ezlo.com/hub/broadcasts/index.html#hubroomreordered)
- [hub.room.edited](https://api.ezlo.com/hub/broadcasts/index.html#hubroomedited)
- [hub.scene.added](https://api.ezlo.com/hub/broadcasts/index.html#hubsceneadded)
- [hub.scene.deleted](https://api.ezlo.com/hub/broadcasts/index.html#hubscenedeleted)
- [hub.scene.changed](https://api.ezlo.com/hub/broadcasts/index.html#hubscenechanged)
- [hub.scene.run.progress](https://api.ezlo.com/hub/broadcasts/index.html#hubscenerunprogress)
- [hub.network.wifi.scan.progress](https://api.ezlo.com/hub/broadcasts/index.html#hubnetworkwifiscanprogress)
- [hub.device.setting.updated](https://api.ezlo.com/hub/broadcasts/index.html#hubdevicesettingupdated)

9. [Scenes](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html)
- [hub.scenes.create](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenescreate)
- [hub.scenes.get](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesget)
- [hub.scenes.list](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubsceneslist)
- [hub.scenes.edit](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesedit)
- [hub.scenes.delete](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesdelete)
- [hub.scenes.block.data.list](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesblockdatalist)
- [hub.scenes.enabled.set](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesenabledset)
- [hub.scenes.notification.add](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesnotificationadd)
- [hub.scenes.notification.remove](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesnotificationremove)
- [hub.scenes.run](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesrun)
- [hub.scenes.name.set](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesnameset)
- [hub.scenes.expressions.set](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesexpressionsset)
- [hub.scenes.expressions.delete](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesexpressionsdelete)
- [hub.scenes.expressions.list](https://api.ezlo.com/hub/scenes/local_scenes_api/index.html#hubscenesexpressionslist)


10. [Scenes : When blocks](https://api.ezlo.com/hub/scenes/when_blocks/index.html)
- [isItemState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isitemstate)
- [isItemStateChanged](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isitemstatechanged)
- [isInterval](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isinterval)
- [isSunState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#issunstate)
- [isOnce](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isonce)
- [isDateRange](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isdaterange)
- [isDeviceState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isdevicestate)
- [isSceneState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isscenestate)
- [isCloudState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#iscloudstate)
- [compareNumbers](https://api.ezlo.com/hub/scenes/when_blocks/index.html#comparenumbers)
- [compareNumberRange](https://api.ezlo.com/hub/scenes/when_blocks/index.html#comparenumberrange)
- [compareStrings](https://api.ezlo.com/hub/scenes/when_blocks/index.html#comparestrings)
- [stringOperation](https://api.ezlo.com/hub/scenes/when_blocks/index.html#stringoperation)
- [inArray](https://api.ezlo.com/hub/scenes/when_blocks/index.html#inarray)
- [compareValues](https://api.ezlo.com/hub/scenes/when_blocks/index.html#comparevalues)
- [hasAtLeastOneDictionaryValue](https://api.ezlo.com/hub/scenes/when_blocks/index.html#hasatleastonedictionaryvalue)
- [isFirmwareUpdateState](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isfirmwareupdatestate)
- [isDictionaryChanged](https://api.ezlo.com/hub/scenes/when_blocks/index.html#isdictionarychanged)
- [and](https://api.ezlo.com/hub/scenes/when_blocks/index.html#and)
- [not](https://api.ezlo.com/hub/scenes/when_blocks/index.html#not)
- [or](https://api.ezlo.com/hub/scenes/when_blocks/index.html#or)
- [xor](https://api.ezlo.com/hub/scenes/when_blocks/index.html#xor)

11. [Scenes : Action blocks](https://api.ezlo.com/hub/scenes/action_blocks/index.html#action-blocks)
- [setItemValue](https://api.ezlo.com/hub/scenes/action_blocks/index.html#setitemvalue)
- [sendHttpRequest](https://api.ezlo.com/hub/scenes/action_blocks/index.html#sendhttprequest)
- [runCustomScript](https://api.ezlo.com/hub/scenes/action_blocks/index.html#runcustomscript)
- [rebootHub](https://api.ezlo.com/hub/scenes/action_blocks/index.html#reboothub)
- [resetHub](https://api.ezlo.com/hub/scenes/action_blocks/index.html#resethub)


## Supported Sensors


1. MPU6050 Accelerometer and Gyroscope
2. ADXL345 3-Axis Accelerometer
3. GY-271 Magnetometer
4. LTR303ALS Luminosity sensor
5. RMT SK6812
6. BMP680 I2C Sensor
7. BMP280 I2C Sensor
8. DHT11 Temperature Humidity Sensor
9. DHT22 Temperature Humidity Sensor
10. Potentiometer
11. Internal Hall Effect Sensor
12. PIR Sensor
13. Parallax 2-Axis Joystick
14. MB1013 Sonar
15. PWM Generic Load
16. Touch Switch TTP223B (Toggle)
17. Ultrasonic Sensor HC SR04
18. LDR Digital and analog Sensor
19. Water Leak Sensor
20. GY61 3-Axis Accelerometer
21. GXHTC3 - RH and T Sensor
22. DS18B20 Temperature Sensor
23. JSN SR04T Water Level Sensor
24. Soil Moisture Sensor
25. Turbidity Sensor
26. Proximity Sensor
27. Touch switch TPP 223B (Momentary)
28. Servo Motor MG996R
29. SK6812 RGB LEDs
30. TCS230 Sensor
31. FC28 Soil Moisture Sensor
32. Shunt voltmeter
33. UV Intensity Sensor
34. TSL2561 Luminosity Sensor
35. CS712TELC 05B Current Sensor
36. HX711 Load Cell
37. MQ4 Methane Gas Sensor
38. MQ2 LPG Gas Sensor
39. MQ3 Alcohol Sensor
40. MQ8 H2 Gas Sensor
41. MQ135 NH3 Gas Sensor
42. GPS GYGPS6MV2
43. YFS201 flowmeter
44. Flex Resistor
45. Force Sensitive Resistor
46. KY026 Flame Sensor
47. MQ6 LPG Detector
48. Vibration Sensor
49. Reed Switch
50. MQ7 CO Detector
51. MQ9 LPG Detector
52. Float Switch
53. R307 Fingerprint Module
54. HLK-LD2410B Presence Sensor
55. ENS160 gas sensor
56. ZE08 ch02 gas sensor

## Supported Controllable Devices
1. PWM Dimmable
2. RGB Dimmable
3. Smart Plug / Relay
4. Servo Mot0r
5. Addressable LEDs

## Firmware Features
### BLE WiFi Onboarding
BLE (Bluetooth Low Energy) WiFi on-boarding for EzloPi Devices simplifies the process of connecting EzloPi devices to a WiFi network. Using BLE technology, the device can initiate a secure and user-friendly on-boarding process without the need for direct user input on the device.
### BLE Provisioning
BLE provisioning for EzloPi devices enhances user convenience by providing a wireless and user-friendly method for initial setup, eliminating the need for complex manual configurations directly on the device.
### BLE Pin Configurations
BLE Configuration simplifies the process of configuring the GPIOs of a hardware microcontroller employed by EzloPi, enhancing user convenience.
### OTA
This feature allows for convenient and remote firmware upgrades, ensuring that EzloPi devices can receive the latest software improvements and enhancements without the need for manual intervention or physical access.

## Local Meshbot (Scene)
Scenes provide the possibility to make the relations between devices and make some actions with them. A scene consists of "conditions" and "actions" represented by (when blocks and action blocks respectively. All of them, except action groups, have Json Array representation.

In the perfect case when and exceptions ("conditions") block must form Abstract Syntax Tree (AST) from the Json and be executable. Currently, it's represented as a list of possible single-argument function.
then and else (action) blocks contain the list of actions. Each functional element actually is the item. As far as you can see there are read only items such as : temperature, pressure, humidity, etc. and there are read-write items : switch, dimmer, light(switch), doorlock, etc...
4 changes: 4 additions & 0 deletions ezlopi-cloud/ezlopi-cloud-constants/ezlopi_cloud_keywords.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,7 @@ const char *scene_status_finished_str = "finished";
const char *scene_status_partially_finished_str = "partially_finished";
const char *scene_status_failed_str = "failed";
const char *scene_status_stopped_str = "stopped";

const char *ezlopi_valueformatted_str = "valueFormatted";
const char *ezlopi_value_default_str = "valueDefault";
const char *ezlopi_text_str = "text";
Expand Down Expand Up @@ -258,11 +259,14 @@ const char *ezlopi_service_str = "service";
const char *ezlopi_alarmed_str = "alarmed";
const char *ezlopi_timeIsLeft_str = "timeIsLeft";
const char *ezlopi_sources_str = "sources";
const char *ezlopi_source_str = "source";
const char *ezlopi_timestamp_str = "timestamp";
const char *ezlopi_Home_str = "Home";
const char *ezlopi_Away_str = "Away";
const char *ezlopi_Night_str = "Night";
const char *ezlopi_Vacation_str = "Vacation";
const char *ezlopi_houseMode_str = "houseMode";

const char *ezlopi_client_id_str = "client_id";

#endif // __EZLOPI_CLOUD_KEYWORDS_H__
9 changes: 6 additions & 3 deletions ezlopi-cloud/ezlopi-cloud-constants/ezlopi_cloud_keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ extern const char* ezlopi_unreachable_reasons_str;
extern const char* ezlopi_unreachable_actions_str;
extern const char* ezlopi_manual_device_adding_str;
extern const char* ezlopi_enum_str;

extern const char* ezlopi_has_getter_str;
extern const char* ezlopi_has_setter_str;
extern const char* ezlopi_scale_str;
Expand Down Expand Up @@ -211,16 +212,15 @@ extern const char* ezlopi_baud_str;
extern const char* ezlopi_baud_rate_str;
extern const char* ezlopi_sceneId_str;
extern const char* ezlopi_changed_by_str;

extern const char* scene_status_started_str;
extern const char* scene_status_finished_str;
extern const char* scene_status_partially_finished_str;
extern const char* scene_status_failed_str;
extern const char* scene_status_stopped_str;
extern const char* ezlopi_armed_str;
extern const char* ezlopi_subtype_str;
extern const char* ezlopi_scale_str;
extern const char* ezlopi_enum_str;
extern const char* ezlopi_valueformatted_str;

extern const char* ezlopi_value_default_str;
extern const char* ezlopi_text_str;
extern const char* ezlopi_label_str;
Expand Down Expand Up @@ -268,4 +268,7 @@ extern const char* ezlopi_Night_str;
extern const char* ezlopi_Vacation_str;
extern const char* ezlopi_houseMode_str;

extern const char* ezlopi_client_id_str;
extern const char* ezlopi_source_str;

#endif // __EZLOPI_CLOUD_KEYWORDS_H__
Loading

0 comments on commit f3833b0

Please sign in to comment.