jokob-sk / NetAlertX

πŸ–§πŸ” WIFI / LAN intruder detector. Scans for devices connected to your network and alerts you if new and unknown devices are found.
GNU General Public License v3.0
2.98k stars 179 forks source link

Multi-Site UNIFIMP for Importing Hosts in a Multi-Site Unifi Infrastructure #858

Open Disciplus86 opened 2 hours ago

Disciplus86 commented 2 hours ago

Is there an existing issue for this?

Is your feature request related to a problem? Please describe

Hi,

I have two sites, each with its own cloud key, but currently, UNIFIMP can only import one site.

Describe the solution you'd like

Do you think it’s possible to duplicate the UNIFIMP plugin to create a second or third UNIFIMP module (e.g., UNIFIMP1, UNIFIMP2)?

Describe alternatives you've considered

What would be easier: modifying the existing module or duplicating it?

Anything else?

nothing

Am I willing to test this? πŸ§ͺ

Can I help implement this? πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

jokob-sk commented 1 hour ago

Hi @Disciplus86,

The plugin should allow you to add multiple sites.

https://github.com/jokob-sk/NetAlertX/blob/05e4de0dc80f86c8ccc99a687a137875429b5d7e/front/plugins/unifi_import/script.py#L89

The code loops thru all sites and collects devices. Have you tried adding more sites in the setting UNIFI_SITES?

jokob-sk commented 1 hour ago

If you have different log ins and or controllers you can potentially run multiple NAX instances and synchronize them with the sync plugin: https://github.com/jokob-sk/NetAlertX/tree/main/front/plugins/sync