Added BLE Proxy for DC Load.
This commit is contained in:
		
							
								
								
									
										141
									
								
								esphome/atorch-ble-proxy.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										141
									
								
								esphome/atorch-ble-proxy.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,141 @@ | ||||
| substitutions: | ||||
|   name: "dc-load" | ||||
|   friendly_name: Atorch programmable DC load | ||||
|   external_components_source: github://syssi/esphome-atorch-dl24@main | ||||
|   dl24_mac_address: !secret dl24_mac_address | ||||
|   project_version: 2.1.0 | ||||
|   device_description: "Monitor and control a Atorch meter via bluetooth BLE" | ||||
|  | ||||
| esphome: | ||||
|   name: ${name} | ||||
|   friendly_name: ${friendly_name} | ||||
|   comment: ${device_description} | ||||
|   min_version: 2024.6.0 | ||||
|   project: | ||||
|     name: "syssi.esphome-atorch-dl24" | ||||
|     version: ${project_version} | ||||
|  | ||||
| esp32: | ||||
|   board: esp32-s3-devkitc-1 | ||||
|   framework: | ||||
|     type: esp-idf | ||||
|  | ||||
| external_components: | ||||
|   - source: ${external_components_source} | ||||
|     refresh: 0s | ||||
|  | ||||
| # Enable logging | ||||
| logger: | ||||
|   level: DEBUG | ||||
|  | ||||
| # Enable Home Assistant API | ||||
| api: | ||||
|   encryption:  | ||||
|     key: !secret apikey | ||||
|  | ||||
| # Enable over-the-air updates | ||||
| ota: | ||||
|   platform: esphome | ||||
|   password: !secret ota | ||||
|  | ||||
| wifi: | ||||
|   ssid: "Voltage-legacy" | ||||
|   password: !secret voltage_legacy_psk | ||||
|   use_address: ${name}.home   | ||||
|   power_save_mode: high | ||||
|   fast_connect: on | ||||
|  | ||||
|   # Enable fallback hotspot (captive portal) in case wifi connection fails | ||||
|   ap: | ||||
|     ssid: "DC-Load Fallback Hotspot" | ||||
|     password: !secret fallback_psk | ||||
|  | ||||
| captive_portal: | ||||
|  | ||||
| #esp32_ble_tracker: | ||||
| #  scan_parameters: | ||||
| #    active: true | ||||
| #  on_ble_advertise: | ||||
| #    then: | ||||
| #      - lambda: |- | ||||
| #          if (x.get_name().rfind("-BLE", 0) == 0) { | ||||
| #            ESP_LOGI("ble_adv", "New Atorch device found"); | ||||
| #            ESP_LOGI("ble_adv", "  Name: %s", x.get_name().c_str()); | ||||
| #            ESP_LOGI("ble_adv", "  MAC address: %s", x.address_str().c_str()); | ||||
| #            ESP_LOGD("ble_adv", "  Advertised service UUIDs:"); | ||||
| #            for (auto uuid : x.get_service_uuids()) { | ||||
| #              ESP_LOGD("ble_adv", "    - %s", uuid.to_string().c_str()); | ||||
| #            } | ||||
| #          } | ||||
| # | ||||
| #text_sensor: | ||||
| #  - platform: ble_scanner | ||||
| #    name: "BLE Devices Scanner" | ||||
|  | ||||
| esp32_ble_tracker: | ||||
|   scan_parameters: | ||||
|     active: False | ||||
|  | ||||
| ble_client: | ||||
|   - mac_address: ${dl24_mac_address} | ||||
|     id: ble_client0 | ||||
|  | ||||
| atorch_dl24: | ||||
|   - id: atorch0 | ||||
|     ble_client_id: ble_client0 | ||||
|     check_crc: false | ||||
|     # The meter publishes a status report per second via BLE notification. If you don't like this update interval | ||||
|     # you can use this setting to throttle the sensor updates by skipping some status reports. | ||||
|     throttle: 0s | ||||
|  | ||||
| binary_sensor: | ||||
|   - platform: atorch_dl24 | ||||
|     atorch_dl24_id: atorch0 | ||||
|     running: | ||||
|       name: "${name} running" | ||||
|  | ||||
| sensor: | ||||
|   - platform: atorch_dl24 | ||||
|     atorch_dl24_id: atorch0 | ||||
|     voltage: | ||||
|       name: "${name} voltage" | ||||
|     current: | ||||
|       name: "${name} current" | ||||
|     power: | ||||
|       name: "${name} power" | ||||
|     capacity: | ||||
|       name: "${name} capacity" | ||||
|     energy: | ||||
|       name: "${name} energy" | ||||
|     temperature: | ||||
|       name: "${name} temperature" | ||||
|     dim_backlight: | ||||
|       name: "${name} dim backlight" | ||||
|     runtime: | ||||
|       name: "${name} runtime" | ||||
|  | ||||
| text_sensor: | ||||
|   - platform: atorch_dl24 | ||||
|     atorch_dl24_id: atorch0 | ||||
|     runtime_formatted: | ||||
|       name: "${name} runtime formatted" | ||||
|  | ||||
| button: | ||||
|   - platform: atorch_dl24 | ||||
|     atorch_dl24_id: atorch0 | ||||
|     reset_energy: | ||||
|       name: "${name} reset energy" | ||||
|     reset_capacity: | ||||
|       name: "${name} reset capacity" | ||||
|     reset_runtime: | ||||
|       name: "${name} reset runtime" | ||||
|     reset_all: | ||||
|       name: "${name} reset all" | ||||
|     usb_plus: | ||||
|       name: "${name} plus" | ||||
|     usb_minus: | ||||
|       name: "${name} minus" | ||||
|     setup: | ||||
|       name: "${name} setup" | ||||
|     enter: | ||||
|       name: "${name} enter" | ||||
| @@ -15,6 +15,8 @@ esp32: | ||||
|   board: m5stack-atom | ||||
|   framework: | ||||
|     type: esp-idf | ||||
|     version: 4.4.8 | ||||
|     platform_version: 5.4.0 | ||||
|  | ||||
| # Enable Home Assistant API | ||||
| api: | ||||
|   | ||||
		Reference in New Issue
	
	Block a user