Closed vanvught closed 6 years ago
Thanks @vanvught . Can we have some detail of what sensors the device has, or perhaps easiest an rdm_model_collector dump of the device please?
Is this 0.10.6 branch, 0.10 branch or master? Actually it's probably not master looking at the source.
Looking at the source, I think this would have to be a device with no sensors returned, but the SENSOR_DEFINITION PID supported, is that a correct assessment?
The model collector dump will still help though...
Peter, your assessment is correct; the device has no sensors and E120_SENSOR_DEFINITION PID is in the supported parameters list.
Background: I am writing a cross-platform RDM Handler. There is a hardware abstraction layer which implementsfloat GetCoreTemperature(void)
. This is working fine on Raspberry Pi baremetal, Raspberry Pi Raspbian and Linux distributions on Intel (for example Debian and Ubuntu). However there is no CPU temperature sensor available in Cygwin, hence the sensor initialize on Cygwin returns false. And the device sensor count is 0.
I grab the source code from GitHub using the following command:
wget https://github.com/OpenLightingProject/ola/archive/0.10.6.tar.gz
For completeness, herewith the rdm_model_collector.py output:
pi@openlighting-3:~ $ rdm_model_collector.py --universe 1
{32752: [{'device_model': 0,
'model_description': '',
'product_category': 32767,
'software_versions': {1520277091: {'label': '1.5',
'languages': ['en'],
'manufacturer_pids': [],
'personalities': [{'description': 'Real-time DMX Monitor',
'index': 1,
'slot_count': 8,
'slots': {0: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
1: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
2: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
3: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
4: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
5: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
6: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0},
7: {'label_id': 1,
'name': {'en': 'Intensity'},
'type': 0}}}],
'sensors': [],
'supported_parameters': [32,
112,
128,
129,
130,
144,
160,
176,
193,
194,
224,
225,
288,
289,
512,
513,
514,
1024,
1539,
4097,
4112,
4160]}},
'sub_device_count': 0}]}
pi@openlighting-3:~ $
and the application output on Cygwin:
$ ./linux_artnet.exe 192.168.2.136 8
[V1.5] CYGWIN_NT-6.1 2018-02-02 15:16 Compiled on Mar 5 2018 at 20:11:31
Art-Net 3 Node - Real-time DMX Monitor
Network configuration
Interface : 192.168.2.136
Netmask : 255.255.255.0
Hostname : Laptop-i7
-------------------------------------------------------------------------------------------
Node configuration
Firmware : 1.19
Short name : AvV Art-Net Node
Long name : CYGWIN_NT-6.1 Open Source Art-Net 3 Node
Net : 0
Sub-Net : 0
Universe : 1
Active ports : 1
-------------------------------------------------------------------------------------------
RDM Responder configuration
Protocol Version 1.0
DMX Address : 1
DMX Footprint : 8
Personality 1 of 1 [Real-time DMX Monitor]
Sub Devices : 0
Sensors : 0
UUID : 7ff0:19bfb7e4
Device Label : Cygwin RDM Responder
-------------------------------------------------------------------------------------------
06-03-2018 17:51:39.649534 Start
Great thanks @vanvught . I'll try and get that fixed soon for you to test.
Could you not detect Cygwin and ifdef out the support of that PID on that platform? I don't believe it's against the specs, but may be a slightly confusing edge case for some controllers?
A fairly easy fix in the end. See https://github.com/OpenLightingProject/ola/pull/1392 if you fancy giving it a test run @vanvught .
@peternewman Peter, I've got an exception again.
An error has occurred: 'max() arg is an empty sequence'
Traceback (most recent call last): File "/usr/local/bin/rdm_test_server.py", line 274, in _RunTests tests, device = runner.RunTests(test_filter, False, self._UpdateStats) File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestRunner.py", line 339, in RunTests test.Run() File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 290, in Run self._wrapper.Run() File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 278, in Run self._ss.Run() File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 198, in Run self._CheckDescriptors(i, self._read_descriptors) File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 233, in _CheckDescriptors runnable() File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 730, in SocketReady self._channel.SocketReady() File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 84, in SocketReady self._ProcessIncomingData() File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 258, in _ProcessIncomingData self._HandleNewMessage(data) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 272, in _HandleNewMessage self.MESSAGE_HANDLERS[message.type](self, message) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 316, in _HandleResponse self._InvokeCallback(response) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 359, in _InvokeCallback response.callback(response.controller, response.reply) File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 1291, in lambda x, y: self._RDMCommandComplete(callback, x, y)) File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 1469, in _RDMCommandComplete callback(RDMResponse(controller, response)) File "/usr/local/lib/python2.7/dist-packages/ola/RDMAPI.py", line 238, in lambda response: self._GenericHandler(callback, uid, response), File "/usr/local/lib/python2.7/dist-packages/ola/RDMAPI.py", line 266, in _GenericHandler callback(response, obj, unpack_exception) File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 551, in _HandleResponse self._PerformMatching(response, unpacked_data, unpack_exception) File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 694, in _PerformMatching result.action() File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2810, in _AddToHoles self._CheckForSensor() File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2790, in _CheckForSensor self._MissingSensorWarning() File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2766, in _MissingSensorWarning max_sensor = max(self._sensors.keys()) ValueError: max() arg is an empty sequence
Please report this bug so it can be fixed. Clicking 'Report Bug' will open a new window and prompt you to sign in with your Google account. Only the information you see here will be sent.
I have used a different ubuntu system with a new build with:
git clone https://github.com/OpenLightingProject/ola.git ola
First used a reference RDM Responder with a sensor :
------------------- Summary --------------------
OLA Version: 0.10.6
Test Run: 2018-03-10 11:25:58 AM
UID: 7ff0:ebe0e82f
Manufacturer: http://www.raspberrypi-dmx.org
Model Description: Raspberry Pi 3 Model B Rev 1.2
Software Version: 1520677448
------------------- Warnings --------------------
RDM Controller does not support DISCOVERY commands
------------------ Advisories -------------------
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SET POWER_STATE was write protected, try changing the lock mode if enabled
----------------- By Category -------------------
Configuration: 7 / 7 100%
Control: 21 / 21 100%
Core Functionality: 2 / 2 100%
DMX512 Setup: 23 / 23 100%
Dimmer Settings: 13 / 13 100%
Display Settings: 2 / 2 100%
Error Conditions: 312 / 312 100%
IP and DNS Configuration: 5 / 5 100%
Network Management: 4 / 4 100%
Power / Lamp Settings: 8 / 8 100%
Product Information: 19 / 19 100%
RDM Information: 0 / 0 -%
Sensors: 7 / 7 100%
Status Collection: 3 / 3 100%
Sub Devices: 76 / 76 100%
-------------------------------------------------
502 / 580 tests run, 502 passed, 0 failed, 0 broken
There are now 580 tests instead of the 426 in my previous build. So I am working with new OLA code.
Hi @vanvught ,
This fix is currently only in the 0.10 branch ( https://github.com/OpenLightingProject/ola/tree/0.10 ) and hence will be in the 0.10.7 release when it comes out. Or you can wait until https://github.com/OpenLightingProject/ola/pull/1393 gets merged, then it will be in master too.
That's now merged, so this is now in master too, so a pull should resolve the issue.
Works like a charm. Thank you @peternewman
pi@nuc-i5:~$ ola_rdm_get --universe 1 --uid 7ff0:19bfb7e4 device_label Cygwin RDM Responder
------------------- Summary --------------------
OLA Version: 0.10.6
Test Run: 2018-03-11 08:21:08 PM
UID: 7ff0:19bfb7e4
Manufacturer: http://www.raspberrypi-dmx.org
Model Description: Unknown
Software Version: 1520795727
------------------- Warnings --------------------
RDM Controller does not support DISCOVERY commands
------------------ Advisories -------------------
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SET DEVICE_HOURS was write protected, try changing the lock mode if enabled
SENSOR_DEFINITION (0x0200) supported but sensor count was 0
SENSOR_VALUE (0x0201) supported but sensor count was 0
RECORD_SENSORS (0x0202) supported but sensor count was 0
SET POWER_STATE was write protected, try changing the lock mode if enabled
----------------- By Category -------------------
Configuration: 7 / 7 100%
Control: 21 / 21 100%
Core Functionality: 2 / 2 100%
DMX512 Setup: 23 / 23 100%
Dimmer Settings: 13 / 13 100%
Display Settings: 2 / 2 100%
Error Conditions: 312 / 312 100%
IP and DNS Configuration: 5 / 5 100%
Network Management: 4 / 4 100%
Power / Lamp Settings: 8 / 8 100%
Product Information: 19 / 19 100%
RDM Information: 0 / 0 -%
Sensors: 7 / 7 100%
Status Collection: 3 / 3 100%
Sub Devices: 76 / 76 100%
-------------------------------------------------
502 / 580 tests run, 502 passed, 0 failed, 0 broken
pi@openlighting-3:~ $ uname -a Linux openlighting-3 4.9.59-v7+ #1047 SMP Sun Oct 29 12:19:23 GMT 2017 armv7l GNU/Linux
pi@openlighting-3:~ $ olad --version OLA olad version: 0.10.6
Error: max() arg is an empty sequence
Traceback (most recent call last): File "/usr/local/bin/rdm_test_server.py", line 274, in _RunTests tests, device = runner.RunTests(test_filter, False, self._UpdateStats) File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestRunner.py", line 333, in RunTests test.Run() File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 261, in Run self._wrapper.Run() File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 278, in Run self._ss.Run() File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 198, in Run self._CheckDescriptors(i, self._read_descriptors) File "/usr/local/lib/python2.7/dist-packages/ola/ClientWrapper.py", line 233, in _CheckDescriptors runnable() File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 730, in SocketReady self._channel.SocketReady() File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 84, in SocketReady self._ProcessIncomingData() File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 258, in _ProcessIncomingData self._HandleNewMessage(data) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 272, in _HandleNewMessage self.MESSAGE_HANDLERS[message.type](self, message) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 316, in _HandleResponse self._InvokeCallback(response) File "/usr/local/lib/python2.7/dist-packages/ola/rpc/StreamRpcChannel.py", line 359, in _InvokeCallback response.callback(response.controller, response.reply) File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 1291, in
lambda x, y: self._RDMCommandComplete(callback, x, y))
File "/usr/local/lib/python2.7/dist-packages/ola/OlaClient.py", line 1469, in _RDMCommandComplete
callback(RDMResponse(controller, response))
File "/usr/local/lib/python2.7/dist-packages/ola/RDMAPI.py", line 238, in
lambda response: self._GenericHandler(callback, uid, response),
File "/usr/local/lib/python2.7/dist-packages/ola/RDMAPI.py", line 266, in _GenericHandler
callback(response, obj, unpack_exception)
File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 475, in _HandleResponse
self._PerformMatching(response, unpacked_data, unpack_exception)
File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/ResponderTest.py", line 618, in _PerformMatching
result.action()
File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2566, in _AddToHoles
self._CheckForSensor()
File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2546, in _CheckForSensor
self._MissingSensorWarning()
File "/usr/local/lib/python2.7/dist-packages/ola/testing/rdm/TestDefinitions.py", line 2522, in _MissingSensorWarning
max_sensor = max(self._sensors.keys())
ValueError: max() arg is an empty sequence