Détection de présence via le réseau local

Did you ask a generative AI? I’d really like to give it a try to see.

2 Likes

No, I didn’t think of that at all, very good idea!

I see what you mean, what I find difficult is illustrating:

  • the presence of a human
  • a local network

Without too many elements or text ^^

The text isn’t forbidden :wink:

Yes, yes, of course! But I think too much text kills the illustration.

Hello,
if some of you are motivated, I have a first version that seems functional and sufficient for detecting devices on the network.
We’ll deal with the other features at a later time.

The docker image: atrovato/gladys:lan-manager

As a reminder, this is a test image and may therefore harm your « production » environment, so it is recommended to back up your data before using the image, or to test the image on another device, in order not to impact your « stable » installation.
The feature is not available via Gladys Plus at the moment; it will be as soon as everything has been validated.

Thanks.

3 Likes

Thanks @AlexTrovato!

Tested this morning:

  • I don’t really like the logo colors, especially in the services list; it clashes too much with a « default Visio (Microsoft) colors » vibe. The same logo in a darker color would work better, I think (compare with the orange of the Zigbee2MQTT logo or even the illustration for Xiaomi)

  • During the scan there is a big CPU spike up to 168% but only for a few seconds. I’m on a mini PC, no issues. On an RPi you’d need to check the behavior, even if it means slowing the scan to save CPU

  • I have at least x3 phones on a WiFi router + Freebox (WiFi disabled) and the scan only detected two MAC addresses. But since I have two routers that means I also have two IP allocations; I imagine the scan only works on the same network as Gladys. I’ll test with two other PCs turned on. In any case it would be good to remind users of the scan limitations when there are multiple networks.

  • The scan results display the detected MAC addresses, without other indications. My Freebox for instance shows the name advertised by the device — do you think that’s achievable (in v2)? Otherwise, as a fallback, do a manufacturer lookup from the MAC addresses?

Thanks for developing this service — it’s going to be useful :blush:

3 Likes

And I would add that the interface is very simple to use and super clear.

Thanks for taking the time.

Me neither, I did that quickly, but I also asked for a bit of help to create a new one. I tested AI, but I have trouble getting my point across :confused:

Well, I tested on a real PC, not a Raspberry Pi, and I use a library that does the scan.
I can always change it though.

The scan runs on the networks where Gladys is present; all network interfaces are scanned (eth, wlan…).
So if your devices aren’t on the same networks, indeed, I can’t do anything.

Strangely, I do get the device names (except for one).

That’s doable :smiley:

Thanks again.

Just for my personal info, which AI did you use?

I’ll test as soon as I have 2 minutes :slight_smile:

StarryAI and DALL-E :wink:

1 Like

Hi!
Tested and… When I click on ‹ save › nothing happens, nothing is added to the ‹ devices › list and nothing in the Gladys log…
RPi2 32bit
Sorry :⁠-⁠\
Edit: I’m lying, there is this in the log : 2023-01-15T11:42:54+0100 \u003cinfo\u003e lan-manager.scan.js:20 (LANManager.scan) LANManager discovers 31 devices
But no matter what I try, it won’t save anything…

Do you see any logs in the browser? (F12 for developer mode + « Console » tab)

I just tested (but from my phone, so no logs) and I can see my devices… But I can’t save them. The command returns nothing.

Okay, I’m reproducing the problem… a regression from my last change… I’ll let you know as soon as it’s fixed.

1 Like

@AlexTrovato can you remind me of the docker run command to use please :slight_smile:

That must be it :

Here it is:

docker run -d --log-driver json-file --log-opt max-size=10m --cgroupns=host --restart=always --privileged --network=host --name gladys -e 
NODE_ENV=production -e 
SERVER_PORT=80 -e 
TZ=Europe

Ok, the new fixed image is ready.
Don’t forget to remove the old one before testing the new one:

docker stop gladys
docker rm gladys
docker rmi atrovato/gladys:lan-manager

Thanks again.

Thanks — access to the Gladys interface is on which port :)? 8420?