jsimonetti / go-artnet Goto Github PK
View Code? Open in Web Editor NEWThis package attempts to implement the Art-Net 4 specification from (c) Artistic Licence Holding Ltd.
License: MIT License
This package attempts to implement the Art-Net 4 specification from (c) Artistic Licence Holding Ltd.
License: MIT License
Hi there,
I'm using you library to control lights on stage with my band, thanks a lot for building it! โค๏ธ As I'm running it as a subsystem of https://github.com/StageAutoControl/controller/ I'm experiencing some problems with debugging problems as I'm unfortunately unable to reduce the verbosity of go-artnet. I would like to suggest two changes:
Does this sound reasonable to ya? Looking forward to your feedback!
Cheers,
Alex
Edit:
I'll fork the project and gonna try this out ;)
Hey Jeroen,
Sorry for opening another PR to fix the UDP socket again. The issue is a bit more complex, so I'm opening an Issue for that.
When running a controller on a device (Notebook for example) that has multiple IP addresses in the ArtNet network (2.0.0.0/8) then the controller emits a ton of logs (excerpt attached). The issue is the controller emitting an empty ArtPollReply package to make the other controllers aware of the current one, wich is am "empty" package: https://github.com/jsimonetti/go-artnet/blob/master/controller.go#L146
I spend an hour trying to fix this, but didn't made it. Any chance you got some time to implement this? :O
๐ from hamburg
Alex
time="2019-04-21T21:20:50+02:00" level=debug msg="packet sent" bytes=14 dst="2.255.255.255:6454" module=artnet type=Node
time="2019-04-21T21:20:50+02:00" level=debug msg="packet sent" bytes=239 dst="2.255.255.255:6454" module=artnet type=Node
time="2019-04-21T21:20:50+02:00" level=debug msg="received packet" bytes=14 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:50+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:50+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: unexpected EOF" module=artnet type=Node
time="2019-04-21T21:20:50+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: invalid port: want: 6454, got: 0" module=artnet type=Node
time="2019-04-21T21:20:50+02:00" level=debug msg="received packet" bytes=14 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:50+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: unimplemented opcode 0x20 found" module=artnet type=Node
time="2019-04-21T21:20:50+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:50+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: invalid port: want: 6454, got: 0" module=artnet type=Node
time="2019-04-21T21:20:52+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.1.1.2:6454" type=Node
time="2019-04-21T21:20:52+02:00" level=debug msg="added node" ip=2.1.1.2 module=artnet node=light-02 type=Controller
time="2019-04-21T21:20:52+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.1.1.2:6454" type=Node
time="2019-04-21T21:20:52+02:00" level=debug msg="updated node" ip=2.1.1.2 module=artnet node=light-02 type=Controller
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.1.1.1:6454" type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="added node" ip=2.1.1.1 module=artnet node=light-01 type=Controller
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.1.1.1:6454" type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="updated node" ip=2.1.1.1 module=artnet node=light-01 type=Controller
time="2019-04-21T21:20:53+02:00" level=debug msg="packet sent" bytes=14 dst="2.255.255.255:6454" module=artnet type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="packet sent" bytes=239 dst="2.255.255.255:6454" module=artnet type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=14 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:53+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: unimplemented opcode 0x20 found" module=artnet type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:53+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: invalid port: want: 6454, got: 0" module=artnet type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=14 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:53+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: unimplemented opcode 0x20 found" module=artnet type=Node
time="2019-04-21T21:20:53+02:00" level=debug msg="received packet" bytes=239 module=artnet src="2.0.0.27:59775" type=Node
time="2019-04-21T21:20:53+02:00" level=info msg="failed to parse packet from 2.0.0.27:59775: invalid port: want: 6454, got: 0" module=artnet type=Node
Hi there! I stumbled upon this cool module and want to create a go application which acts as an Art-Net node to receive lighting packets.
I've used the example code and assembled the following:
l := artnet.NewDefaultLogger()
n := artnet.NewNode("node-1", code.StNode, net.ParseIP("_._._._"), l)
n.Start()
defer n.Stop()
// ...
Now I get some output in the command line but I've no idea how to extract the data to use it in my application.
Also I've tested with MQTT DMX Sequencer and Q Light Controller Plus as controllers but got the following errors:
With MQTT DMX Sequencer:
time="2019-09-12 18:49:22.8653" level=debug msg="received packet" bytes=42 src="_._._._:47894" type=Node
time="2019-09-12 18:49:22.8679" level=warning msg="failed to parse packet: unexpected EOF" data="[65 114 116 45 78 101 116 0 0 80 0 14 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]" src=_._._._ type=Node
With Q Light Controller Plus (enabling Art-Net outputting on universe):
time="2019-09-12 19:28:07.4199" level=debug msg="received packet" bytes=530 src="_._._._:6454" type=Node
time="2019-09-12 19:28:07.4276" level=debug msg="unknown packet type" packet="&{{[65 114 116 45 78 101 116 0] OpOutput [0 14]} 69 0 0 0 512 [123 197 96 60 194 79 28 121 77 104 132 0 107 0 109 0 96 0 0 119 119 108 0 0 117 0 84 0 128 133 0 143 0 111 149 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]}" type=Node
Do you need further informations?
Thanks in advance!
I look at simple dmx examples, but how i can change from 0 to 1 universe
Within the artpoll
, artpollreply
, header
and packet
files the opCode is converted from little to big endian and vice versa multiple times which makes it pretty confusing during development and debugging to understand when and why the conversion is done. I tried to start cleaning that up but wanted to hear your opinion on that before putting too much effort on that, as I would lean to refactor and centralise the generic packet handling. So, any thoughts on that?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.