Problem integrating LAN Manager

Hello,
I’m new to home automation with Gladys.
I installed the Gladys container on a VM running Debian12.
I can’t list LAN devices with lan manager.
Here is the log report:

2024-11-27T13:03:16+0100 \u003cinfo\u003e lan-manager.scan.js:19 (LANManager.scan) LANManager starts scanning devices…
2024-11-27T13:04:18+0100 \u003cerror\u003e lan-manager.scan.js:58 (NmapScan.onError) LANManager fails to discover devices over network - Over scan timeout 60000
2024-11-27T13:04:18+0100 \u003cinfo\u003e lan-manager.stop.js:12 (LANManager.stop) LANManager stops scanning devices

From the report I deduce that nmap is used to list devices.
So I decide to run nmap directly via ssh from the container.
Failure.
I decide to run nmap from the VM.
Failure. nmap not installed.
I install nmap on the VM.
I run nmap again from the VM.
Success.
I run nmap again from the Gladys container.
Success.
I restart the scan with Gladys.
Failure.

If anyone has any idea, it would help me because I just bought a few Shelly 1PM.

Thanks in advance.

Hi @l.dolle :slight_smile:

Nmap is already installed in the Gladys container, so normally there’s nothing to do.

Did you install the container using the command from the site (Installation avec Docker | Gladys Assistant)?

  • Your container must be in network mode = host (as in the command)
  • Your VM must have proper access to all devices on your network (maybe it’s on an isolated network?)
  • Have you correctly defined your CIDRs?

Out of curiosity, why do you need the LAN Manager integration?

I don’t know why, but I have the impression that everyone tests Gladys by trying this integration first, and often gets very bad results (which is normal — to me, presence detection via Wi-Fi scanning is a bad idea), and I don’t understand why everyone insists on this integration :joy:

LAN Manager won’t let you use your Shelly 1PM.

To control your Shelly, you can do it via MQTT, or via HTTP in scenes

Edit: There’s a feature request for a native Shelly integration, but so far few requests; you can vote for this request here :

I tried to improve the translations of the integration to make them clearer:


Hi @pierre-gilles,
Thanks for taking care of my case.
I used the docker-compose provided on your site.
I set the CIDR to 10.42.0.1/24 (by default the CIDR was 10.42.0.94/24).
The IP of my VM is 10.42.0.94.
What strikes me is that now nmap works fine from the command line both in the VM and in the container.

I wanted to use lan manager to detect my Shelly modules which are marked as wifi but there may be another technique less costly in bandwidth than scanning the LAN every two minutes (if I understood correctly).
.

I’m going to invest in this:
https://www.domadoo.fr/fr/soldes/7146-smlight-adaptateur-usb-ethernet-poe-zigbee-30-cc2652p7-zigbee2mqtt.html
and move towards Zigbee.

Thanks again for your information.

But why would you want to detect your Shelly modules every 2 minutes? I don’t understand the use case ^^

That’s exactly what I said above. There must be another way to integrate these modules.

Ah yes, absolutely :slight_smile:

Shelly modules have an HTTP and MQTT API, and can be used in scenes.

Example to receive a status change from a Shelly module:

If you tell me what you want to do, I can point you in the right direction