Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - Avner

Pages: [1] 2 3 ... 6
1
Users / Re: MD on Zotac Zbox ID42 Plus not playing audio
« on: January 05, 2014, 09:33:47 am »
L3top, thanks for helping to solve this problem.

Now, I can play video and hear audio successfully via lmce.
I can still not mute from lmce, but I can live with that (decrease / increase is not expected to work anyways because the digital signal via hdmi can only be controlled to on/off).

To summarize, the relevant settings that eventually worked for me were:

Code: [Select]
cat /etc/pluto/xine.conf
...
audio.device.alsa_front_device:asym_hdmi
audio.device.alsa_default_device:asym_hdmi
audio.device.alsa_passthrough_device:plughw:1,3
audio.output.speaker_arrangement:Pass Through


Code: [Select]
cat /etc/asound.conf
</etc/pluto/alsa/virtual_cards.conf>

pcm_slave.hdmi_convert48k {
        pcm "plughw:1,3"
        rate 48000
}

pcm.hdmi_playback {
        type plug
        slave hdmi_convert48k
}

pcm.asym_hdmi {
        type asym
        playback.pcm "hdmi_playback"
        capture.pcm "plughw:1,3"
}

pcm.nvidia_hdmi {
        type hw
        card 1
        device 3
}

pcm.!default asym_hdmi


Code: [Select]
cat /usr/pluto/diskless/35/usr/share/alsa/alsa.conf
...
defaults.ctl.card 1
defaults.pcm.card 1
defaults.pcm.device 3
...


I also verified that /etc/pluto.conf does not contain the variable AlternateSC

The following tests / utilities helped me solve the problem:

1. Check the sound card
I used the following command to verify that nvidia hdmi maps to 1,3:
Code: [Select]
root@moon35:~# aplay -l
List of PLAYBACK Hardware Devices ****

card 0: Intel [HDA Intel], device 0: ALC892 Analog [ALC892 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: Intel [HDA Intel], device 1: ALC892 Digital [ALC892 Digital]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 0/1
  Subdevice #0: subdevice #0

2. Generate some audio signal in the TV
I used the following command to verify that the moon can generate sound in the TV
Code: [Select]
speaker-test -t sine -D plughw:1,3

3. Play xine via KDE
I used xine directly to see that I can play a video/audio using xine outside lmce.
Code: [Select]
root@moon35:~# xine /home/public/data/videos/movie.avi


Setting of moon MD in webadmin

# In Wizard / devices / Media Directors
moon MD is set to:
Code: [Select]
Hardware accelaration: vdpau
Deinterlace quality: vdpau
Video Card : Geoforce or TNT2

Audio settings
Selecting HDMI (or anyhting other than "Manual") causes to execute Setup_AsoundConf in /usr/pluto/bin/SetupAudioVideo.sh
Ideally this should set e.g. asound.conf, xine.conf correctly but, for some reasons it replaces the good settings with settings that break Xine_Player.
So instead, use:
Code: [Select]
Audio settings: Manual Settings (M)This prevents /usr/pluto/bin/SetupAudioVideo.sh from overwriting (returns from Setup_AsoundConf)

2
Users / MD on Zotac Zbox ID42 Plus not playing audio [SOLVED]
« on: December 25, 2013, 09:05:19 pm »
I am trying to configure a new Zotac Zbox ID42 Plus.
It is PXE booting from the core.
At the audio / video setup stage in audio settings (step 5) the list of audio output connectors is empty.

The device has audio on board:
Code: [Select]
root@moon63:~#  lspci | grep -i audio
00:1b.0 Audio device: Intel Corporation 7 Series/C210 Series Chipset Family High Definition Audio Controller (rev 04)
01:00.1 Audio device: NVIDIA Corporation GF119 HDMI Audio Controller (rev a1)

aplay can not recognize the sound card
Code: [Select]
root@moon63:~# aplay -l
aplay: device_list:240: no soundcards found...
The instructions in http://wiki.linuxmce.org/index.php/Audio_in_1004
talk about alternate sound configuration settings in:
/etc/pluto.conf
/etc/asound.conf
/etc/pluto/alsa/virtual_cards.conf

In: /etc/pluto.conf there is no flag named "AlternateSC"

I the MD, there is no file or directories for:
/etc/pluto/alsa/virtual_cards.conf, /etc/pluto/alsa/, /etc/asound.conf, /etc/asound/

Code: [Select]
root@moon63:~# ll /etc/pluto/alsa/virtual_cards.conf
ls: cannot access /etc/pluto/alsa/virtual_cards.conf: No such file or directory

root@moon63:~# ll /etc/pluto/alsa/
ls: cannot access /etc/pluto/alsa/: No such file or directory

root@moon63:~# ll /etc/asound.conf
ls: cannot access /etc/asound.conf: No such file or directory

root@moon63:~# ll /etc/asound/
ls: cannot access /etc/asound/: No such file or directory

Any advice?
Thanks,
Avner

3
Users / Re: Orbiter on the Core not showing up
« on: December 23, 2013, 06:30:05 am »
Just to close this thread, this was a headless installation, so no Core orbiter is expected. What mislead me is that webadmin shows the following orbiters:
in "show device tree" view:

Code: [Select]
CORE

The core/hybrid
   The core 53
      OnScreen orbiter 55

Generic PC as MD 65
   OnScreen orbiter 67

Generic PC as MD 75
   OnScreen orbiter 77
It turns out that in a headless (core only) installation, "The core/hybrid" is just a skeleton structure but does not contain instances,
i.e. "OnScreen orbiter 55" does not exist.
Both CORE and The core/hybrid are installed, but the 'hybrid' portion will not run on a 'core only' install

4
Users / Orbiter on the Core not showing up [SOLVED]
« on: December 21, 2013, 05:38:19 pm »
Hi,

After upgrading my lmce 1004 to the latest (apt-get upgrade), I don't get an Orbiter for the core.
Looking at the log file I see the following message repeating over and over again.

Code: [Select]
tail -f /var/log/pluto/23_LaunchProxy_Orbiter.sh.log
...
05      12/21/13 0:43:49.195            Received ANYNEWS? 10149, but device hasn't identified itself yet. <0xb4bb3b70>
05      12/21/13 0:43:49.195            Received: ANYNEWS? 10149 <0xb4bb3b70>
05      12/21/13 0:43:49.196            Socket::ReceiveData 0xadc2638 failed, bytes left 0 start: 4970000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 28 Incoming_Conn Socket 28 ::ffff:192.168.80.1 <0xb4bb3b70>
05      12/21/13 0:43:49.196            Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 28 ::ffff:192.168.80.1 <0xb4bb3b70>
05      12/21/13 0:43:49.196            TCPIP: Closing connection to -1 (Proxy_Orbiter) 0xadc2638 m_Socket: -1 <0xb4bb3b70>
...

05      12/21/13 8:33:20.435            Received ANYNEWS? 10296, but device hasn't identified itself yet. <0xb4bb4b70>
05      12/21/13 8:33:20.436            Received: ANYNEWS? 10296 <0xb4bb4b70>
05      12/21/13 8:33:20.436            Socket::ReceiveData 0x921c460 failed, bytes left 0 start: 15720000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 11 Incoming_Conn Socket 11 ::ffff:192.168.80.1 <0xb4bb4b70>
05      12/21/13 8:33:20.436            Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 11 ::ffff:192.168.80.1 <0xb4bb4b70>
05      12/21/13 8:33:20.436            TCPIP: Closing connection to -1 (Proxy_Orbiter) 0x921c460 m_Socket: -1 <0xb4bb4b70>

...

How come I'm getting a negative ID? (-1 Proxy_Orbiter)
Any ideas how to fix this problem?

Thanks,
Avner

5
OK, I found the problem.

To debug the problem, I did the following:
1. Removed Motion_Wrapper (33) from the list of running services in /usr/pluto/locks/pluto_spawned_local_devices.txt
2. Invoke screen in a non "detached" mode (i.e. without the parameters "-d -m") so I can see the messages
Code: [Select]
screen -S Motion_Wrapper33 /usr/pluto/bin/Spawn_Device.sh 33 localhost Motion_Wrapper
From the log messages I realized that the environment variable LD_PRELOAD was not set.
The executable motion needs to run with the environment variable LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so in order to acquire the images properly.
When running Motion_Wrapper through the lmce mechanism, it is invoked via screen which fails to pass the environment variable.
(Motion_Wrapper was successful when executed manually from the command line, because the environment variable in the terminal session was set properly)

The solution is to set the environment variable in .screenrc as follows:
Code: [Select]
dcerouter_1035867:~# cat ~/.screenrc
setenv LD_PRELOAD "/usr/lib/libv4l/v4l1compat.so"
Now I'm getting correct images.

6
Quote
My first, last, and only guess is permissions. Who is the original task running as? I can imagine a scenario where the capture thread does not have permissions to access the USB camera.
I think you are right in that the problem has to do something with permissions.
Notice, however that I changed the uid inside /etc/init.d/motion from motion to root so I expect no permission issues

Quote
Yeah, that looks like it is running as root so it should have permissions. Do a ps and look for the motion executables and check who they are running as. That's odd.
When I do ps and look for the motion executables, I get the following list with user root. That is why I also ran the same Motion_Wrapper executable from the command line as root (where it succeeded).
Code: [Select]
dcerouter_1035867:~# ps aux | grep -i motion
root      9675  0.0  0.0   3036  1096 ?        Ss   08:07   0:00 /usr/bin/SCREEN -d -m -S Motion_Wrapper33 /usr/pluto/bin/Spawn_Device.sh 33 localhost Motion_Wrapper
root      9677  0.0  0.0   3120  1632 pts/20   Ss+  08:07   0:00 /bin/bash /usr/pluto/bin/Spawn_Device.sh 33 localhost Motion_Wrapper
root      9742  0.0  0.1  69788  3016 pts/20   Sl+  08:07   0:00 /usr/pluto/bin/Motion_Wrapper -d 33 -r localhost -l /var/log/pluto/33_Motion_Wrapper.log
root      9749  2.4  0.1  15408  2588 pts/20   Sl+  08:08   0:11 [motion]

I am trying to resolve the problem by tracking the log messages.
When I run Motion_Wrapper from the command line, the correct output images have image size of 352x292, and I see log messages such as:
Code: [Select]
[1] Adjusting resolution from 640x480 to 352x292.I think that these are messages written to stdout by the motion process.

When running via lmce the (grey) incorrect output image is 640x480 - probably the resizing does not happen.
So I want to track the log messages when Motion_Wrapper is ran via lmce.
How can I see these messages, when Motion_Wrapper is running via the lmce mechanism?
(I added related log levels to /etc/pluto.conf (17 LV_CAMERA, 35 LV_DEBUG), but the messages still don't show up in /var/log/pluto/33_Motion_Wrapper.log)

Thanks,
Avner

7
My camera is a USB camera (Logitec QuickCam Express). The camera is connected through usb to my core. I followed the instructions in http://wiki.linuxmce.org/index.php/USB_Surveillance_Camera to install the usb camera, which instructs to create a motion wrapper device.

8
posde, Motion_Wrapper runs by default and manages the utility motion to acquire images from the webcam.
Because it fails to acquire the images I ran the same Motion_Wrapper command from the command line and there it succeeds.

9
Hi,

I want to operate a webcam in a Core only (no MD) in a lmce-1004.
I had problems in the past to run Motion_Wrapper in a Hybrid environment but solved it by changing the following lines in /etc/init.d/motion (see http://forum.linuxmce.org/index.php/topic,13292.0.html) from
Code: [Select]
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; thento:
Code: [Select]
if LDPRELOAD=/usr/lib/libv4l/v4l1compat.so start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid root ; then
I now have the same setting in a Core only (no MD) environment.
Motion_Wrapper fails to acquire images. The images fail to acquire - the image files are grey 640x480.
The related processes that run are:

Code: [Select]
dcerouter_1035867:~# ps aux | grep -i motion
root      9675  0.0  0.0   3036  1096 ?        Ss   08:07   0:00 /usr/bin/SCREEN -d -m -S Motion_Wrapper33 /usr/pluto/bin/Spawn_Device.sh 33 localhost Motion_Wrapper
root      9677  0.0  0.0   3120  1632 pts/20   Ss+  08:07   0:00 /bin/bash /usr/pluto/bin/Spawn_Device.sh 33 localhost Motion_Wrapper
root      9742  0.0  0.1  69788  3016 pts/20   Sl+  08:07   0:00 /usr/pluto/bin/Motion_Wrapper -d 33 -r localhost -l /var/log/pluto/33_Motion_Wrapper.log
root      9749  2.4  0.1  15408  2588 pts/20   Sl+  08:08   0:11 [motion]


I tried to invoke the same Motion_Wrapper related command, i.e.
Code: [Select]
/usr/pluto/bin/Motion_Wrapper -d 33 -r localhost -l /var/log/pluto/33_Motion_Wrapper.log
from the command line. In this case, the frames are acquired succesfully - I get image files 352x292.

I cannot understand why the same Motion_Wrapper command fails when executed via lmce but succeeds when executed the command line.

Also can someone explain the command /usr/bin/SCREEN ? I cannot find such executable but all the respawning services have this associated SCREEN command.

Regards,
Avner

10
I suggest that you first verify that you can see the video with other means, e.g. via cheese

11
WhiteHatHacker,
In lmce-08 (Intrepid) there is a single line with start-stop-daemon as stated above.

In lmce-1004, I changed the following line from:
Code: [Select]
if start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid motion ; thento:
Code: [Select]
if LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so start-stop-daemon --start --oknodo --exec $DAEMON -b --chuid root ; then
Hope this helps
Avner

12
Code: [Select]
Hello,

I'm trying to stabilize an lmce1004 system which I just installed.

With every bootup I get a flood of Media Plug-in scripts that are running and overloading the system.
Scripts like HAI_Omni_RS232.sh
I want to stabilize the boot up sequence by disabling these scripts first. Later on, I can add them as needed.
I tried to disable some of services by doing:

Code: [Select]
update-rc.d -f mediatomb remove
update-rc.d -f update-media remove
update-rc.d -f asterisk remove
(I could not find a mythtv-backend service in /etc/init.d/)

But the Plug and play detection scripts keep running with every bootup.
How can I disable the plug and play devices / services and the mythtv-backend service, so that they don't run during bootup?

Thanks,
Avner

13
I solved the problem by making 2 changes to the file: /etc/init.d/motion
1. Add the path to the dynamic library v4l1compat.so
2. Change the uid of the process from: motion to root

In /etc/init.d/motion I changed the following line from:
Code: [Select]
start-stop-daemon --start --exec $DAEMON -b --chuid motion || trueto:
Code: [Select]
LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so start-stop-daemon --start --exec $DAEMON -b --chuid root || true
After making the change, Motion_Wrapper automatically creates images without having to manually invoke the service motion. The following gets updated automatically as expected:
  • The last snapshot file in /home/cameras/53/lastsnap.jpg
  • The displayed image in LinuxMCE web admin: Security -> View cameras -> preview checked cameras
  • The displayed image via Orbiter (when selecting the camera)

I am not sure if this workaround is has side effects.
What are the consequences of running the service motion with uid root (instead of uid motion)?

14
I have a camera connected through usb to my core. I followed the instructions in http://wiki.linuxmce.org/index.php/USB_Surveillance_Camera to install the usb camera.

The camera is operating in the OS. I can see the video using e.g. cheese, and invoke motion from the command line. When I invoke motion from the command line
Code: [Select]
sh-3.2# LD_PRELOAD=/usr/lib/libv4l/v4l2convert.so motionthe images are stored to the directory /home/cameras/53 and the file /home/cameras/53/lastsnap.jpg is updated regularly.
I can then view the images correctly using the LinuxMCE web admin via: Security -> View cameras -> preview checked cameras

However, if I don't invoke motion manually from the command line I don't see any images.
The log file /var/log/pluto/52_Motion_Wrapper.log shows the following error messages:
Code: [Select]
sh-3.2# tail -f /var/log/pluto/52_Motion_Wrapper.log
...
========== NEW LOG SECTION ==========
1       06/13/13 10:06:16       52 (spawning-device)    Starting... 2
1       06/13/13 10:06:16       52 (spawning-device)    Found /usr/pluto/bin/Motion_Wrapper
05      06/13/13 10:06:16.941           Creating child 53 <0xb71ef6c0>
05      06/13/13 10:06:16.941           Note: Device manager has attached a device of type 66 that this has no custom event handler for.  It will not fire events. <0xb71ef6c0>
05      06/13/13 10:06:16.941           Note: Device manager has attached a device of type 66 that this has no custom handler for.  This is normal for IR. <0xb71ef6c0>
05      06/13/13 10:22:12.864           Could not take snapshot, fail sending SIGALRM signal... <0xb59ebb90>
05      06/13/13 10:22:18.072           Could not take snapshot, fail sending SIGALRM signal... <0xb59ebb90>
05      06/13/13 10:36:44.637           Could not take snapshot, fail sending SIGALRM signal... <0xb59ebb90>
...

For each error message: Could not take snapshot, fail sending SIGALRM signal... there is an error message in /var/log/pluto/DCERouter.log
Code: [Select]
h-3.2# tail -f /var/log/pluto/DCERouter.log
...
08      06/13/13 12:56:03.707           Received Message from 0 (unknown / ) to 53 (webcam2 / Entertainment Room1), type 1 id 84 Command:Get Video Frame, retry none, parameters: <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 19(Data): 0 <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 20(Format): jpg <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 23(Disable Aspect Lock): 0 <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 31(): 0 <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 60(Width): 100 <0x7d2adb90>
08      06/13/13 12:56:03.707             Parameter 61(Height): 100 <0x7d2adb90>
05      06/13/13 12:56:03.868           Socket::ReceiveData 0x88329b8 failed, bytes left 0 start: 3460000 1: 0 1b: 0 2: 0 2b: 0 m_Socket: 135 Incoming_Conn Socket 135 127.0.0.1 <0x7d2adb90>
05      06/13/13 12:56:03.869           Socket::ReceiveString2 ReceiveData failed m_Socket: -1 Incoming_Conn Socket 135 127.0.0.1 <0x7d2adb90>
05      06/13/13 12:56:03.869           TCPIP: Closing connection to -1003 (Router Dev #0) 0x88329b8 m_Socket: -1 <0x7d2adb90>
05      06/13/13 12:56:03.869           Router::RemoveAndDeleteSocket 0x88329b8 -1003 <0x7d2adb90>
The attributes of the process Motion_Wrapper are:
Code: [Select]
sh-3.2# ps aux | grep -i motion
root     19268  0.1  0.0   3000   992 ?        Ss   00:16   1:04 /usr/bin/SCREEN -d -m -S Motion_Wrapper52 /usr/pluto/bin/Spawn_Device.sh 52 localhost Motion_Wrapper
root     19269  0.0  0.0   2872  1452 pts/16   Ss+  00:16   0:00 /bin/bash /usr/pluto/bin/Spawn_Device.sh 52 localhost Motion_Wrapper

I changed the values in /etc/motion/motion.conf via LinuxMCE web admin via Advanced -> Configuration -> Devices. In the Motion Device (Logitec webcam) in Device Data -> Motion Parameters and restarted the core.
Code: [Select]
sh-3.2# cat /etc/motion/motion.conf
...
minimum_motion_frames 2
snapshot_interval 2

This did not help. I suspect that the problem is in file permissions or in using a wrong device number

Permissions on the directory /home/cameras/53 are:
Code: [Select]
drwxr-xr-x 3 root root 4096 Jun 12 23:27 /home/cameras/53/
The device tree looks like this:
Code: [Select]
CORE
  (
   Device #1: CORE
   Using Device Template: Generic PC as Core #7
  )

  Logitec webcam
    (
     Device #52: Logitech webcam
     Using Device Template: Motion Wrapper #64
    )

    webcam2
      (
       Device #53: webcam2
       Using Device Template: Generic Analog Camera #66
      )


I am running that latest update of 8.10
Code: [Select]
sh-3.2# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 8.10
Release:        8.10
Codename:       intrepid

sh-3.2# uname -a
Linux dcerouter 2.6.27-17-generic #1 SMP Fri Mar 12 03:09:00 UTC 2010 i686 GNU/Linux

Thanks in advance for any help
Avner

15
Users / Vera3 vs lmce
« on: June 09, 2013, 09:21:13 am »
The LMCE Compatible store (http://lmcecompatible.com/#!/~/category/id=280103&offset=0&sort=normal) lists the controller Vera3.
From what I read, Vera3 is a lightweight alternative to lmce.

A friend of mine wants to control electricity, light, temperature, door lock, security (door sensor, motion sensor, smoke detector) using z-wave devices. He is not interested in media control.

Two questions:
1) Is it fair to say that for this purpose, I could use Vera3 instead of lmce?
2) Why is Vera3 specified in the LMCE Compatible store? Can it be added to lmce in anyway instead of replacing it?

Regards,
Avi

Pages: [1] 2 3 ... 6