Ubuntu, Wine, Pale Moon, ONVIF Device Manager, working with Hik NVR

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
255
Reaction score
82
Location
UK
This information may be of use to other Linux users with an interest in CCTV.
Until last week I had working Pale Moon and ONVIF Manger under Wine to access my Hikvision NVR, a DS7608NI-K2 8P on series 3 firmware. Looking back I am thinking it was an update to Wine that screwed things up.

To recover, first I uninstalled Wine and removed all I could find relating to Wine on my Ubuntu Mate 20.04 Desktop PC, this took a while.
Following the WineHQ Wiki I re-installed with the latest appropriate Wine deb, wine-6.0.2 Stable, not Staging, that didn't work for me here.
The default Wine is 64 bit which doesn't help, 32bit is needed. I did not want Winetricks to give me an option for a 32bit prefix. Try as I could it would keep installing software using 64bit. I wanted Wine 32bit.
So before I fired up Wine in the Terminal I set Wine for 32bit first, export WINEARCH=win32
I tested using Stuart Axon's bash script that I was running Wine in 32bit. (Incidentally, doubtless some have success with PlayOnLinux not me.)

I now downloaded Winetricks, and started it up which creates the hidden .wine directory in Home toastie. In Winetricks I see no option to select a 32bit prefix, good it's already been set at 32bit.
After a download I installed 32bit Pale Moon Windows version via the right click Wine Windows Program Loader.
Pale Moon installed and ran without errors. The plugin was installed to enable Live View stream of my Hikvision cameras. With my Dahua cameras I use the Hik NVR's Virtual host feature with an Ubuntu web browser.

Next. ONVIF Device Manager needs MS Net 4.0, this will not install properly under 64bit Wine, it will under 32bit. I first used Winetricks for the MS Net 4.0 install.
From the Terminal I installed the ONVIF Device manager, an msi file using, wine msiexec /i odm-v2.2.250.msi

Until another Wine update comes along I'm expecting things to continue to work.

I'll add a reminder here as I also have 3 Dahua cameras sending their feeds to my Hik NVR (none of these cameras now require a browser plugin with an Ubuntu web browser). The Virtual host feature on the NVR is flaky with my Dahua cameras, it sometimes stops working if I want to adjust a camera's setting via the NVR's Virtual Host on an Ubuntu browser.
If I de-select Virtual Host in the NVR, save, re-select Virtual Host, save, access to my Dahua cameras returns.

Edit: Just a note about what did not work.
After I removed all I could find associated from previous Wine installs, I following WineHQ Wiki, initially I installed the latest wine-staging version. Pale Moon was unstable and there was an issue with the Hikvision plugin, something about RegSvr registration. ONVIF Device Manager was also unstable. I decided to try wine-stable which eventually did work, and all I did was this to go from staging to stable. (In the Terminal slightly more packages were involved from what I was expecting to see.)
sudo apt install --install-recommends winehq-stable
sudo dpkg-reconfigure wine-stable-amd64 wine-stable wine-stable-i386
I see from Synaptic Package manager, stable was installed and staging was removed.

This may be helpful less with a wine staging but for the other information there.

Edit 2: I have decided for now to prevent a new version of wine-stable being installed using, sudo apt-mark hold wine-stable
Edit 3: I could already access and view my 3 Dahua camera's Live stream via the NVR's Virtual host feature on an Ubuntu web browser. I wondered if I could use Wine Pale Moon 32bit to get Live view too. I was slightly surprised that I could not. Fortunately I had previously downloaded the Dahua web browser plugin for Windows, LocalServiceComponets.exe. Once installed using Wine Windows Program Loader all 3 cameras worked with Wine Pale Moon 32bit. Incidentally the file LocalServiceComponets.exe:Zone identifier seems to be created.
 
Last edited:

toastie

Getting comfortable
Joined
Sep 30, 2018
Messages
255
Reaction score
82
Location
UK
Here is an update of my recent experience when I transitioned from using Ubuntu 20.04 to Debian 12 in reference to my earlier post.
Note that apart from a PC running Blue Iris with its two NICs, I also have a Hihvision NVR, it is just the way my CCTV system has evolved here.
What would happen if I did not have a PC running Windows and Blue Iris, just my Linux based PC?

My Debian 12 stable, and apparently recent versions of Ubuntu, give you a version of VLC that has had rtsp support withdrawn. Fortunately installing VLC via flatpak gets a working version. I have a VLC playlist on my desktop of my Hikvision NVR local host rtsp streams. Open my playlist text file with VLC and a keyboard press of p or n will select the next camera to view. This is helpful if using Linux as my older IP cameras from Hikvision need an ActiveX Windows browser plugin to play live video. Half my cameras are by Dahua they dont need a Window browser plugin.

So without resorting to Wine on my Debian 12 with flatpack VLC, I can at least view both video from my 8 cameras and configure each camera if needed by using a standard browser in Debian 12.
However, to view my Hikvision NVR video recordings I still needed something like Pale Moon running under Wine.

Again the version of Wine served up by Debian 12 stable did not work for me, but from advice on WineHQ I got 9.0.0.0~bookworm installed instead, this worked for me.

With winetricks I followed my previous advice to make sure the default was 32bit. After Pale Moon was installed, a loggin to my Hikvision NVR, the ActiveX browser plugin seemingly installed without any significant errors, I could then work as normal, play any camera's captured video recordings.

ONVIF Display Manager with Wine
Using winetricks I was surprised that using Wine 9 I could also install seemingly without error Windows dot Net 40 that odm-v.2.2.250.msi needs. I dont use this much, it's nice to know it works. Without Blue Iris management of my PTZs I might have used ONVIF Display Manager more.
 
Last edited:

ludshed

Getting comfortable
Joined
Sep 14, 2022
Messages
646
Reaction score
810
Location
Us
It’s mind boggling to me that every piece of cctv hardware is Linux based and Linux os won’t just work natively.
 
Top