neiam
/lambent_ex
Lambent Aether 5
public · Issues · Pulls 1 · Labels · Forks · Compare · Actions success · Badges · Packages
⭐
Log in to mark this repository.
better logging for pokes, and a nice default msg
f33f6ec · gmorell · 2022-12-13 02:32
Files changed
modified
lib/lambent_ex/scan/8266-7777.ex
+2
−0
@@ -8,6 +8,7 @@ defmodule LambentEx.Scan.ESP8266x7777 do
| 8 | 8 | |
| 9 | 9 | @registry :lambent |
| 10 | 10 | @s "ꙭ📡" |
| 11 | + @p "ꙭ👉" | |
| 11 | 12 | @filtered_prefixes ["br", "docker", "lo"] |
| 12 | 13 | @pubsub_name LambentEx.PubSub |
| 13 | 14 |
@@ -114,6 +115,7 @@ defmodule LambentEx.Scan.ESP8266x7777 do
| 114 | 115 | {:noreply, state} |
| 115 | 116 | |
| 116 | 117 | device -> |
| 118 | + Logger.notice("#{@p} Poking #{dvc}}") | |
| 117 | 119 | for {i,c} <- [{10, C.cre}, {100, C.cbe}, {200, C.cge}, {300, C.cce}, {400, C.cye}, {500, C.cme}, {600, C.cke}] do |
| 118 | 120 | Process.send_after(self(), {:send, device, c}, i) |
| 119 | 121 | end |
modified
lib/lambent_ex_web/live/devices/index.html.heex
+5
−0
@@ -13,6 +13,11 @@
| 13 | 13 | </thead> |
| 14 | 14 | <tbody> |
| 15 | 15 | <!-- row 1 --> |
| 16 | + <%= if Enum.empty?(@devices) do %> | |
| 17 | + <tr> | |
| 18 | + <th colspan="6">No devices detected, yet.</th> | |
| 19 | + </tr> | |
| 20 | + <% end %> | |
| 16 | 21 | <%= for {k,v} <- @devices do %> |
| 17 | 22 | <tr> |
| 18 | 23 | <th><%= k %></th> |
Parents: e1c85d5