RESOLVED I have the plugin changing my dmx lighting!Hi all,
I've got Indio talking to my enttec serial dmx lighting controller using jims pluggin. The indigo log is stating:
- Code: Select all
Simple Serial Plugin Debug <<-- entering deviceStopComm, Device: serialdeviceDMX; ID=205500296, Type=simpleSerialCommunicator
Simple Serial Plugin Debug Initiating stop of concurrent thread.
Simple Serial Plugin Debug exiting deviceStopComm -->>
Simple Serial Plugin Debug <<-- entering deviceStartComm, Device: serialdeviceDMX; ID=205500296, Type=simpleSerialCommunicator
Simple Serial Plugin Debug Serial Port Name is /dev/cu.usbserial-EN095395
Simple Serial Plugin Debug Serial Port Baud Rate is 57600
Simple Serial Plugin Debug Serial Port Parity is N
Simple Serial Plugin Debug Serial Port Data Bits are 8
Simple Serial Plugin Debug Serial Port Stops Bits are 1
Simple Serial Plugin Debug Device name is serialdeviceDMX
Simple Serial Plugin Debug Started concurrent thread.
Simple Serial Plugin Debug exiting deviceStartComm -->>
Simple Serial Plugin Debug Starting concurrent serial communications.
I presume all is well above?
I am sending Hand calculated hex data as follows:
7E,06,08,FF,01,50,02,50,03,50,04,50,E7
This is based on the following code from manufacturers:
OUTPUT_ONLY_SEND_DMX_LABEL = 6
SOM_VALUE = 0x7E
EOM_VALUE = 0xE7
def test_dmx_send():
print "Sending 512 DMX data bytes: 00 01 02 ... FF 00 01 02 ... FF"
int_data = [0] + range(0,256) + range(0,256)
msg_data = [chr(int_data[j]) for j in range(len(int_data))]
transmit_to_widget(OUTPUT_ONLY_SEND_DMX_LABEL, msg_data, len(msg_data))
def transmit_to_widget(label, data, data_size):
ser.write(chr(SOM_VALUE))
ser.write(chr(label))
ser.write(chr(data_size & 0xFF))
ser.write(chr((data_size >>
& 0xFF))
for j in range(data_size):
ser.write(data[j])
ser.write(chr(EOM_VALUE))
I have tried the plugin on all options for the EOL commands, but get the following error after a reboot:
Trigger serial test
Simple Serial Plugin Debug Queue has 1 command(s) waiting.
Error XML Parse Error: not well-formed
Error On character 188 of line number 1.
Error XML Parse Error: not well-formed
Error On character 184 of line number 1.
Simple Serial Plugin Response from serial device (text): , of length 0 characters
Error XML Parse Error: not well-formed
Error On character 168 of line number 1.
Simple Serial Plugin Debug Decimal string is
Simple Serial Plugin Debug Decimal string is
Two questions, plus a couple of minor ones if anyone could assist please:
Is my serial device connected?
If so, presumably my data being transmitted is incorrect? The data I want to send (excluding the control information) is (in decimal) 1, 80, 2, 80, 3, 80, 4, 80 - not the full string shown in the manfacturers example.
I'm not sure I have the 3rd (data length) argument correct!? Is the new line char interfering?
This is my first attempt at serial communications since the early 80's, so any pointers would be most welcome.
Thanks
Mat