esphome 0.4.2 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/exe/esphome-monitor +40 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1645662492ca971bef36466bc76591f54fd6d3b1a1a6cb3901e31f7467a55bb
|
4
|
+
data.tar.gz: 60820cb0f6f0de053ce481febb9f84d517cfbc5827bccc453a5df13218499a5f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3fb801ac9971df3fdd865daa5ac0174bdeb5822a2e3d99342947d1f1d0b5c669c9961e53772092bee79104bbc34cda684ed6f6d13e45c4df6176dfbcc4fa19fe
|
7
|
+
data.tar.gz: 772ef18348e9d6e020c7e78da2bdd5a8c185cfc292d3bcef739cf3a84e16c1f279e34fd653a635a7edcb66a220e8e046cd0ece2d9bce7c794351adb10684eb93
|
data/exe/esphome-monitor
CHANGED
@@ -1,8 +1,45 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
+
require "optparse"
|
5
|
+
|
4
6
|
require "esphome/cli/monitor"
|
5
7
|
|
8
|
+
actions = true
|
9
|
+
log_level = :info
|
10
|
+
connection_log_level = :warn
|
11
|
+
device_log_level = :debug
|
12
|
+
dump_config = false
|
13
|
+
opts = OptionParser.new do |opts|
|
14
|
+
opts.banner = <<~TEXT
|
15
|
+
Usage: esphome-monitor ([<uri>] <device_name> | <address> <encryption_key>)
|
16
|
+
|
17
|
+
Example: esphome-monitor http://localhost:6052/ my_device
|
18
|
+
If URI is omitted, it defaults to http://localhost:6052/
|
19
|
+
TEXT
|
20
|
+
|
21
|
+
opts.on("--[no-]actions", "Subscribe to Home Assistant actions (default on)") do |v|
|
22
|
+
actions = v
|
23
|
+
end
|
24
|
+
opts.on("--connection-log-level=VALUE", "Connection log level") do |v|
|
25
|
+
connection_log_level = v
|
26
|
+
end
|
27
|
+
opts.on("--device-log-level=VALUE", "Device log level (`fatal` to disable log streaming)") do |v|
|
28
|
+
device_log_level = v
|
29
|
+
end
|
30
|
+
opts.on("--log-level=VALUE", "Monitoring program log level") do |v|
|
31
|
+
log_level = v
|
32
|
+
end
|
33
|
+
opts.on("--dump-config", "Dump device configuration on connect (requires log streaming at info level)") do
|
34
|
+
dump_config = true
|
35
|
+
end
|
36
|
+
opts.on("-h", "--help", "Show this help message") do
|
37
|
+
puts opts
|
38
|
+
exit
|
39
|
+
end
|
40
|
+
end
|
41
|
+
opts.parse!
|
42
|
+
|
6
43
|
if ARGV.size == 1
|
7
44
|
uri = "http://localhost:6052/"
|
8
45
|
device_name = ARGV[0]
|
@@ -11,9 +48,7 @@ elsif ARGV.size == 2 && ARGV[0].include?(":")
|
|
11
48
|
elsif ARGV.size == 2
|
12
49
|
address, encryption_key = ARGV
|
13
50
|
else
|
14
|
-
warn
|
15
|
-
warn "Example: esphome-monitor http://localhost:6052/ my_device"
|
16
|
-
warn " If URI is omitted, it defaults to http://localhost:6052/"
|
51
|
+
warn opts
|
17
52
|
exit(-1)
|
18
53
|
end
|
19
54
|
|
@@ -36,6 +71,6 @@ if uri
|
|
36
71
|
end
|
37
72
|
end
|
38
73
|
|
39
|
-
device = ESPHome::Device.new(address, encryption_key
|
74
|
+
device = ESPHome::Device.new(address, encryption_key)
|
40
75
|
|
41
|
-
ESPHome::Cli::Monitor.run(device)
|
76
|
+
ESPHome::Cli::Monitor.run(device, connection_log_level:, device_log_level:, log_level:, actions:, dump_config:)
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: esphome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cody Cutrer
|
8
8
|
bindir: exe
|
9
9
|
cert_chain: []
|
10
|
-
date: 2025-
|
10
|
+
date: 2025-10-09 00:00:00.000000000 Z
|
11
11
|
dependencies:
|
12
12
|
- !ruby/object:Gem::Dependency
|
13
13
|
name: curses
|