OpenLightingProject / ola

The Open Lighting Architecture - The Travel Adaptor for the Lighting Industry
https://www.openlighting.org/ola/
Other
641 stars 204 forks source link

make check error of OlaClientTester / there is no reaction to Python API #1509

Closed soutaroumaejima closed 5 years ago

soutaroumaejima commented 5 years ago

I have two questions.

First question is make check error of OlaClientTester with Python API. I want to use Python API and I run ./configure --enable-python-libs. After that, I did make and make check. At that time, error occurred. This is test-suite.log.

test-suite.log is here

==================================
   OLA 0.10.7: ./test-suite.log
==================================

# TOTAL: 88
# PASS:  87
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: ola/OlaClientTester
=========================

.F.olad/OlaDaemon.cpp:121: Using configs in /home/maejima-i3/.ola
common/thread/Thread.cpp:200: Thread pref-saver, policy SCHED_OTHER, priority 0
olad/OlaServer.cpp:194: Server UID is 7a70:030aa8c0
olad/OlaServer.cpp:206: Server instance name is OLA Server
olad/AvahiDiscoveryAgent.cpp:201: Client state changed to AVAHI_CLIENT_S_RUNNING
olad/OlaServer.cpp:481: Updated PID definitions.
olad/OlaServer.cpp:489: PID store is at 0xa527e0
common/thread/Thread.cpp:200: Thread , policy SCHED_OTHER, priority 0
olad/PluginManager.cpp:73: Skipping SPI native DMX because it was disabled
olad/PluginManager.cpp:73: Skipping StageProfi because it was disabled
olad/PluginManager.cpp:73: Skipping FTDI USB DMX because it was disabled
olad/PluginManager.cpp:73: Skipping UART native DMX because it was disabled
olad/PluginManager.cpp:195: Trying to start Dummy
olad/plugin_api/DeviceManager.cpp:105: Installed device: Dummy Device:1-1
olad/PluginManager.cpp:200: Started Dummy
olad/PluginManager.cpp:195: Trying to start ArtNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: Art-Net [192.168.10.3]:2-1
olad/PluginManager.cpp:200: Started ArtNet
olad/PluginManager.cpp:195: Trying to start ShowNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: ShowNet [192.168.10.3]:3-1
olad/PluginManager.cpp:200: Started ShowNet
olad/PluginManager.cpp:195: Trying to start ESP Net
olad/plugin_api/DeviceManager.cpp:105: Installed device: ESP Net [192.168.10.3]:4-1
olad/PluginManager.cpp:200: Started ESP Net
olad/PluginManager.cpp:195: Trying to start Serial USB
common/thread/Thread.cpp:200: Thread , policy SCHED_OTHER, priority 0
plugins/usbpro/WidgetDetectorThread.cpp:215: Found potential USB Serial device at /dev/ttyUSB0
common/io/Serial.cpp:170: Device /dev/ttyUSB0 locked by PID 9009 and process exists, failed to acquire lock
plugins/usbpro/WidgetDetectorThread.cpp:215: Found potential USB Serial device at /dev/ttyUSB0
common/io/Serial.cpp:170: Device /dev/ttyUSB0 locked by PID 9009 and process exists, failed to acquire lock
olad/PluginManager.cpp:200: Started Serial USB
olad/PluginManager.cpp:195: Trying to start Enttec Open DMX
common/io/IOUtils.cpp:39: open(/dev/dmx0): No such file or directory
plugins/opendmx/OpenDmxPlugin.cpp:81: Could not open /dev/dmx0 No such file or directory
olad/PluginManager.cpp:200: Started Enttec Open DMX
olad/PluginManager.cpp:195: Trying to start SandNet
olad/plugin_api/DeviceManager.cpp:105: Installed device: SandNet [192.168.10.3]:7-1
olad/PluginManager.cpp:200: Started SandNet
olad/PluginManager.cpp:195: Trying to start Pathport
olad/plugin_api/DeviceManager.cpp:105: Installed device: Pathport [192.168.10.3]:9-1
olad/PluginManager.cpp:200: Started Pathport
olad/PluginManager.cpp:195: Trying to start E1.31 (sACN)
olad/plugin_api/DeviceManager.cpp:105: Installed device: E1.31 (DMX over ACN) [192.168.10.3]:11-1
olad/PluginManager.cpp:200: Started E1.31 (sACN)
olad/PluginManager.cpp:195: Trying to start USB
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 2:8 @0x7f4b080290e0 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 2:2 @0x7f4b08036ad0 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 2:1 @0x7f4b0803df10 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 4:1 @0x7f4b0803de50 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 3:1 @0x7f4b0803cad0 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 1:4 @0x7f4b0803e430 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 1:3 @0x7f4b08021d70 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 1:2 @0x7f4b0802af50 [add]
libs/usb/HotplugAgent.cpp:172: USB hotplug event: 1:1 @0x7f4b08025340 [add]
libs/usb/LibUsbThread.cpp:50: -- Starting libusb thread
common/thread/Thread.cpp:200: Thread , policy SCHED_OTHER, priority 0
libs/usb/LibUsbThread.cpp:35: ----libusb event thread is running
olad/PluginManager.cpp:200: Started USB
olad/PluginManager.cpp:195: Trying to start OSC
plugins/osc/OSCDevice.cpp:88: No targets specified for OSC Output port 0
plugins/osc/OSCDevice.cpp:88: No targets specified for OSC Output port 1
plugins/osc/OSCDevice.cpp:88: No targets specified for OSC Output port 2
plugins/osc/OSCDevice.cpp:88: No targets specified for OSC Output port 3
plugins/osc/OSCDevice.cpp:88: No targets specified for OSC Output port 4
olad/plugin_api/DeviceManager.cpp:105: Installed device: OSC Device:14-1
olad/PluginManager.cpp:200: Started OSC
olad/PluginManager.cpp:195: Trying to start SPI
olad/PluginManager.cpp:200: Started SPI
olad/PluginManager.cpp:195: Trying to start KiNET
olad/plugin_api/DeviceManager.cpp:105: Installed device: KiNet Device:16-1
olad/PluginManager.cpp:200: Started KiNET
olad/PluginManager.cpp:195: Trying to start KarateLight
common/io/IOUtils.cpp:39: open(/dev/kldmx0): No such file or directory
plugins/karate/KaratePlugin.cpp:80: Could not open /dev/kldmx0 No such file or directory
olad/PluginManager.cpp:200: Started KarateLight
olad/PluginManager.cpp:195: Trying to start Milford Instruments
olad/PluginManager.cpp:200: Started Milford Instruments
olad/PluginManager.cpp:195: Trying to start Renard
olad/PluginManager.cpp:200: Started Renard
olad/PluginManager.cpp:195: Trying to start Open Pixel Control
olad/PluginManager.cpp:200: Started Open Pixel Control
olad/PluginManager.cpp:195: Trying to start GPIO
olad/PluginManager.cpp:200: Started GPIO
olad/PluginManager.cpp:195: Trying to start Nanoleaf
olad/PluginManager.cpp:200: Started Nanoleaf
libs/usb/LibUsbThread.cpp:55: -- Stopping libusb thread
libs/usb/LibUsbThread.cpp:45: ----libusb thread exiting
ola/StreamingClient.cpp:172: The RPC socket has been closed, this is more than likely due to a framing error, perhaps you're sending too fast?
common/network/TCPSocket.cpp:158: connect(127.0.0.1:38246): Connection refused

OlaClientWrapperTest.cpp:53:Assertion
Test name: OlaClientWrapperTest::testNoAutoStartNoOlad
assertion failed
- Expression: !(ola_client.Setup())
- Check for another instance of olad running

Failures !!!
Run: 2   Failure total: 1   Failures: 1   Errors: 0
FAIL ola/OlaClientTester (exit status: 1)

This problem is similar to #1165, but I didn't solve it. In addition, error have remained in spite of running command ./configure --disable-python-libs. If you know about that, please let me know.

soutaroumaejima commented 5 years ago

Second question is that there are no reaction controlled by Python API.

I tried to set same OLA environment on virtual machine(ubuntu 16.04 on host ubuntu 16.04 sharing USB device using Vagrant and Virtualbox). I don't really know why, but on this VM, above-mentioned problem didn't occure and make, make check, make install went well. After that, I had run Python API test code(https://www.openlighting.org/ola/developer-documentation/python-api/). This VM share USB device connected to host machine so that It should work in theory. Actuary, there are no error when had run test code. However, DMX device didn't move. I have tried ola_dmxconsole, but this result is same. Maybe, DMX device didn't catch signal correctly. To control device, what is that I have to confirm?

Using devices

Using DMX test code is here

import array
from ola.ClientWrapper import ClientWrapper

def DmxSent(state):
  wrapper.Stop()

universe = 1
data = array.array('B', [10, 50, 255])
wrapper = ClientWrapper()
client = wrapper.Client()
client.SendDmx(universe, data, DmxSent)
wrapper.Run()

peternewman commented 5 years ago

Hi @soutaroumaejima ,

As per the failure message, have you done a "Check for another instance of olad running"? Can you show us the output of ps aux | grep -i ola when it's failing please?

Regarding your second failure, have you patched the Enttec device to universe 1?

soutaroumaejima commented 5 years ago

As per the failure message, have you done a "Check for another instance of olad running"? Can you show us the output of ps aux | grep -i ola when it's failing please? Sorry, I overlooked that message. This is the result of ps aux | grep -i ola


maejima-i3@maejimai3-DS61:~/ola$ ps aux | grep -i ola
maejima+  2871  0.0  0.0 542444 14556 ?        Sl   15:06   0:00 olad --daemon --syslog
maejima+  5759  0.0  0.0  13980   936 pts/6    S+   15:15   0:00 grep --color=auto -i ola

I have kill PID 2871 and retried `make check`. Then, error had not occured. Is this operation correct?
soutaroumaejima commented 5 years ago

Regarding your second failure, have you patched the Enttec device to universe 1?

Yes. This is the result of ola_dev_info.


maejima-i3@maejimai3-DS61:~/ola/python/examples$ ola_dev_info
common/network/TCPSocket.cpp:158: connect(127.0.0.1:9010): Connection refused
Device 1: Enttec Usb Pro Device, Serial #: 02246372, firmware 1.44
  port 0, IN, priority 100
  port 0, OUT, patched to universe 1

And I'm sorry, I had forgotten operation of olad -l 4 when running python code. This is the result of python ola_send_dmx.py.

maejima-i3@maejimai3-DS61:~/ola/python/examples$ python ola_send_dmx.py
Success!

After that, DMX light was operated successfully. Thank you for promptly handling the matter with care.

peternewman commented 5 years ago

I have kill PID 2871 and retried make check. Then, error had not occured. Is this operation correct?

Yes, it can't launch the test copy of olad during make check if olad is already running elsewhere, so that's working as expected.

peternewman commented 5 years ago

After that, DMX light was operated successfully. Thank you for promptly handling the matter with care.

Excellent, glad to hear you've got it working now. I'll close this issue.