Code Monkey home page Code Monkey logo

go-artnet's People

Contributors

72nd avatar aklinkert avatar bmurray avatar dependabot-preview[bot] avatar dependabot[bot] avatar h3ndrk avatar jh0ker avatar jsimonetti avatar stickler-ci[bot] avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

go-artnet's Issues

Make Logger configurable

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:

  • change log entries to be debug entries, normally you won't need them I guess. I'm seeing the following entries a lot:
    • "node started"
    • "packet send"
    • "received packet"
    • "added node"
  • Make the package logger either injectable or configurable, for example as a exported variable that is accessible.

Does this sound reasonable to ya? Looking forward to your feedback!

Cheers,
Alex

Edit:
I'll fork the project and gonna try this out ;)

Controller emits empty ArtPollReply package

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

How to use the node for receiving Art-Net packets?

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!

choose universe

I look at simple dmx examples, but how i can change from 0 to 1 universe

Confusing endian handling

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.