# Manage Devices and Device Groups

This topic describes general device handling as well as common use cases in device management.

#### Device Drivers (Models)

There are several device types available in the Macula model list:

* emulation
* generic
* models by vendor

Each group of models is further explained in more details. The selected model affects device-specific functionality; server-side functions (e.g., motion detection, Open VCA) will be available regardless of the device model.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FSZuvjguKm43A5L9HAlRy%2Fimage.png?alt=media&#x26;token=d6e013f2-4d0e-4cef-8912-40d54ecd54ec" alt="" width="563"><figcaption></figcaption></figure>

#### Emulation From File

**Emulation** devices allow using a video/image file as the video source. This is an auxiliary driver often used for demo purposes, or when configuring/troubleshooting license plate or facial recognition. Still images must be in JPG/JPEG format. Video files must be in AVI format, encoded as MPEG4 AVC h.264; video files exported from Macula Monitor or Portable Player will work, too, provided that they were exported as AVI with JPEG compression.

After creating an emulation device, go to its channel's properties and specify the full local path to the target video/image file (*Channels* > open channel for editing > *Channel configuration* tab > *Channel properties* > *Settings* > *Location*). If you move such a device to another server, make sure to copy the file to the new server, or adjust the path in the channel settings.

#### Generic Streaming Drivers

Generic drivers are based on common video transfer protocols, so these can be used for legacy hardware, non-integrated cameras/video servers, or non-traditional video sources (e.g., screen capturing software).

RTSP uses **generic RTSP** streaming over TCP/UDP, and includes two video streams and also audio (G.711). After adding this kind of device, go to its channel properties and specify the RTSP tag for both main and secondary video streams (*Channels* > open channel for editing > *Channel configuration* tab > *Channel properties* > *RTSP > Path to Session Description Protocol File*). The RTSP tag is the URL part after the IP address, so it should look something like */mpeg4/media.amp* or */videostream.cgi*. You can find this information in the device HTTP/CGI documentation provided by the manufacturer. You can also specify a **custom RTSP port** here, in case the device configuration uses a non-standard port, or if port forwarding is set up.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FscdL3kwJEcScSq90qWp6%2Fimage.png?alt=media&#x26;token=9e11b871-2c89-41e4-ad4e-56be09a34618" alt=""><figcaption></figcaption></figure>

**Custom configuration** driver is similar to the generic RTSP driver, but it allows adding RTSP flags and PTZ commands via .INI file (text file with configuration, formatted in a special way). The file should contain the desired HTTP/CGI commands and URLs, according to the device documentation. The path to the configuration file is also specified in the channel properties, in the *Configuration* tab. Browse for the file, then hit *Apply*: you should see the configuration details appear above. If there are no details and the date is incorrect, the file has incorrect extension, or is not formatted properly.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F5fYdvl9WF5uVIfl7yJlR%2Fimage.png?alt=media&#x26;token=2bbb3fdb-da1e-4841-a5d8-bf8d8e945ad1" alt=""><figcaption></figcaption></figure>

JPEG/MJPEG driver is also similar to the generic RTSP driver, the only difference being that the transport here will use HTTP instead of RTSP. This model is rarely used, mostly for legacy devices not supporting RTSP/ONVIF.

#### ONVIF Driver

This driver can be used for all devices that are ONVIF Profile S conformant. By default, the *ONVIF Compatible* model is recommended (and it is also used when auto-detecting devices). If it does not work with older cameras, try the *ONVIF Compatible (legacy)* driver.

{% hint style="danger" %}
Due to extensive changes in ONVIF standards, older ONVIF driver marked as Deprecated - named (Generic) ONVIF Compatible (Deprecated) - has reached its end of life. It will still be available if you have cameras configured to use this driver, but no new devices can be created with this driver starting from the software version 1.23.1.

Starting from the software version 1.24, channel settings are disabled for devices that use the legacy ONVIF driver. This means, you can change the settings on the camera side, but the software will only be able to read them.

Please switch to the newest, *ONVIF Compatible* device driver wherever possible. If your ONVIF cameras do not operate correctly with this latest driver (e.g., some features are unavailable), kindly contact <support@gsfcorp.com> with details.
{% endhint %}

In device autodiscovery, this model will be used alongside with the native integrations: for not-yet-integrated brands/models, ONVIF model will be assigned wherever possible (i.e., if device responds properly to the ONVIF communication).

#### External Source

This device type is reserved for receiving streams from the Macula Mobile applications. Channels belonging to such devices are only counted by the license when the app streaming is active.

After adding this device, copy the *Code* from its properties to your Macula Mobile app to enable streaming from the app to the Macula server. You will find more details in the mobile app section of this document.

#### HTML Source

Choose this model to add streaming emulation from a **website** UI. The contents rendered from the specified URL will be displayed as a single, **static** (non-interactive) live **video stream**, with an option to record it. You can use this device driver for streaming from public services, monitoring web services, sites with dynamic contents etc.

Unlike for the generic RTSP driver (where you set the device IP and then add the RTSP URL in the channel properties), here you need to specify the full URL in the device settings at once. Channel properties for webpages will have a separate tab, *Web page configuration* (*Channels* > open channel for editing > *Web page configuration*).

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FsgmgZMvuxBYz5D3k4HNf%2Fimage.png?alt=media&#x26;token=8c678ca4-f0f9-480a-a393-9debfa2ea68b" alt=""><figcaption></figcaption></figure>

The device settings include full resource URL (mandatory) and username/password (optional, you only need to specify the user account is the target web service requires it).

As the webpage contents will be static in the Macula Monitor application, you need to take care of the contents transition. To force refresh contents from the Macula side, use the auto refresh parameter in the channel properties. In the example here with YouTube streaming, the video is looped by adding URL parameters; the final link will look as follows:

<https://www.youtube.com/embed/VIDEOID?autoplay=1\\&mute=1\\&loop=1\\&playlist=VIDEOID> – video added in such a way will be played on repeat indefinitely.

Please note that this type of device uses Macula channel license as any other regular IP camera.

#### CrossLink Devices

Two types of devices are available here: interactive Web pages and interactive remote desktop applications. Both are fully functional server-side devices that provide live and recorded contents. All interactive items require a special license type called CrossLink.

#### Models by Brand

Native device integrations are available for over 140 manufacturers and their 5000+ device models. This list includes cameras, NVRs, video encoders, and I/O modules. Models from this list are used when running device autodiscovery, and you can also use them when manually adding devices.

If you cannot find your exact device model in the list, try the closest available model: quite often, cameras within a series are intercompatible. Also, if you know the device's OEM brand, you can try models from that manufacturer.

#### Manage Devices

Device management is accessible via Macula Console *Configuration* section, under *Devices* category in the menu on the left.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F2fxMIQcGWbVWzljTvKdB%2Fimage.png?alt=media&#x26;token=3b1d3a82-e525-45e7-8673-df4b35acf507" alt=""><figcaption></figcaption></figure>

Upper panel items allow you to add devices automatically or manually, edit, view and   remove them, as well as quickly assign groups and servers. Double-click any device to open it for editing; click *View channels* on the upper panel to open channel-specific controls in the same window. If device has multiple channels, all of them will be listed.

{% hint style="info" %}
If you have opened a device for editing but there is a need to open the associated channel's properties at the same time, use the *Related items* buttons in the bottom left corner of the *Edit device* dialog box.
{% endhint %}

Please refer to the *Add Devices Manually* section of this document for detailed description of all available tabs and settings.

Use bottom panel buttons to quickly filter recently added/updated devices, choose groups only or solely devices not assigned to any of the servers.

#### Remove Devices

To remove a device, select it in the item list and use the ![](https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F4gObG8v9mYPcezvKcZ8V%2Fimage.png?alt=media\&token=5f961e12-f582-4ccc-9991-21e1ff52a5f9) *Recycle bin* button on the upper panel to delete the target device. Use *Shift+click* or *CTRL+click* to select multiple devices, or *CTRL+A* to select all.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FYiNaS2OjekyxleIcebEO%2Fimage.png?alt=media&#x26;token=7e9d22b8-aaa4-4d82-b5ea-45feae2881b8" alt="" width="563"><figcaption></figcaption></figure>

You will be offered to remove all the attached channels together with the device(s). Press *Yes* to delete the channels or choose *No* to leave the channels: they will appear as detached in the channel list then and you will be able to re-attach them to other devices, keeping the channel recording configuration. If you choose *Yes*, all existing shared channels based on the channels of the target device will be removed automatically as well.

{% hint style="danger" %}
If you try deleting a device that has associated rules in the Event & Action Configurator, you will get a warning dialog box with those rules listed. You can either proceed with removing the target device, its channel(s) and its rule(s), or cancel the deletion.
{% endhint %}

#### Add Device Groups

As with other resources, devices can be grouped together for easier management. Click the little arrow near *+ New device* button and select *New device group.*

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FbK66JUDOhkLOnvBrzmQB%2Fimage.png?alt=media&#x26;token=d4d4799c-3c09-4fa0-aa86-41910e8d3317" alt="" width="563"><figcaption></figcaption></figure>

Enter a name for the device group in the *Details* tab, then switch to the *Members* tab and choose devices to join this group. Double-click items or use the *Add/Remove* buttons below to select and deselect devices.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FaeXUNiRAPTxwZJxt7roF%2Fimage.png?alt=media&#x26;token=0a212d14-d8d6-46dc-a964-84fbd50169b2" alt="" width="563"><figcaption></figcaption></figure>

In the *Membership* tab, you can select 'higher' level groups to contain this device group (nested architecture).

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2Fgo9L08fqyPRxhjjaiXEJ%2Fimage.png?alt=media&#x26;token=8e3d00e3-e68a-4b68-97c4-ce8fe98efa1d" alt=""><figcaption></figcaption></figure>

Finally, open the *Permissions* tab to assign user privileges for this device groups: check at least one permission to select the user or user group, uncheck all or use the *Clear* button below to deselect. When you have finished, click *OK*; the newly created group will then appear in the item list.

Double-click any group to open its contents in the same window; use the buttons on the upper panel to edit/remove it. Click *Edit* to adjust group settings: procedure is similar to that of creating a new device group.

#### Copy Device\*

\*Feature is subject to license limitations and may be unavailable in some software editions.

Starting from the Macula version 1.11.0, it is possible to copy an existing device and its channel(s). To copy a device, click the little arrow next to the + New device button on the upper panel and choose *Create copy* from the drop-down list. The related channel(s) will be copied automatically.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FuYEsXq9zkkGQRyfEH3tR%2Fimage.png?alt=media&#x26;token=30750b62-3b0c-405e-87b5-5837d8dc839b" alt=""><figcaption></figcaption></figure>

In the dialog box that appears, you can create one or multiple copies of any device(s) currently present in the Macula server configuration. In the list on the left, all existing devices will be listed; in the list on the right, your copies will appear.

First, choose the source for the copy in the *Add devices* tab:

* select one of the existing devices in the list on the left (a single device can be selected at a time),
* set the number of target copies below,
* when ready, click the *+ Add* button to create the selected copies,
* repeat previous steps with other devices, if required.

To add a single device copy, you can simply double-click it in the list.

Use the search fields on top of the lists to find the necessary item in a long list. If you no longer wish to add any of the created copies, you can select multiple items using *CTRL+left* click or *Shift+click* and remove them using the *Recycle bin* icon above.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2F7mKwkP2acdMJDQ43VhdG%2Fimage.png?alt=media&#x26;token=de25ae47-9ae2-4c6f-9671-68fc47117d42" alt=""><figcaption></figcaption></figure>

In the Device parameters tab, you can adjust:

* the name(s) of the target copy (copies),
* their IP addresses, with an option to select multiple with CTRL+left click and then assign a range of IP addresses using auto increment with the specified step,
* HTTP port and user credentials.

After you have altered any settings here, do not forget to hit the *Apply* button to save them, otherwise the changes will be discarded when you deselect the device(s) or switch to a different tab. Use the *Reset* button to roll back to the original settings (this works if you have not applied the settings yet).

Note that, at this step, the new device model remains the same as the source device model and it cannot be changed at this point. This is necessary for the Macula engine to successfully create a duplicate. You will be able to change the model later via editing the desired device.

The same applies to the server where the device is attached: at the moment of cloning, the new devices are created on the same server. If you are using Macula Enterprise, you will be able to move the devices to a different server after you have added the copies by editing the target device(s).

In the *Channel settings* tab, the only available parameter at this point is the channel name. You will be able to edit other settings after creating the copy (copies) by editing the target channel(s).

When finished with the settings, click the *OK* button to save your newly created device+channel copies. They will be automatically added into the server configuration database.

{% hint style="danger" %}
After you have added new devices using this method, please allow some minutes for the configuration to be saved. After that, you will be able to change the newly created device and channel settings.
{% endhint %}

The associated channel(s) will be added automatically with all the existing settings, including the assigned recording configuration.

#### Replace Camera

In the Macula versions up to 1.11.0, it was impossible to alter the device model, so a special procedure was foreseen if the camera needed a replacement.

Now, if you replace the hardware, you can simply change the device model by opening the target device for editing - either by double-clicking it in the device list, or by using the *Edit* button on the upper panel. Note that, when you change the model of an existing device, you will only see model suggestions with the same number of channels, and not the whole list of available devices.

<figure><img src="https://412599993-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FeNXnJx0OpvxnmpWqOBNm%2Fuploads%2FgBaGZHbJWHcqX3KdNtEX%2Fimage.png?alt=media&#x26;token=f1519269-4627-41d5-b404-db8c875cd07f" alt=""><figcaption></figcaption></figure>

To quickly open the associated channel settings without closing this dialog box, use the *Related items* button in the bottom left corner.

{% hint style="danger" %}
When you change the device model, all the channel settings that are configured via Channel properties dialog box are discarded. These settings include video stream properties, audio, DI/DO etc.

Channel settings that are preserved are: motion detection, dewarp, data source, user permissions and recording configuration.
{% endhint %}
