jsimonetti / go-artnet

This package attempts to implement the Art-Net 4 specification from (c) Artistic Licence Holding Ltd.
MIT License
33 stars 20 forks source link

Controller emits empty ArtPollReply package #7

Closed aklinkert closed 5 years ago

aklinkert commented 5 years ago

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
jsimonetti commented 5 years ago

You are probably hitting the limit of my Controller implementation here. ๐Ÿคจ

Could you give me some detail on how I can reproduce this on my laptop?

Id be happy to try and tackle this, I just never had the need to do more than is currently implemented. (I run this for my lighting at home, so never ran multiple controllers)

Ps it is very possible that I missed something about controllers in the official spec.

aklinkert commented 5 years ago

Could you give me some detail on how I can reproduce this on my laptop?

Sure thing, i found this by accident while being connected to a router with both WLAN and LAN at the same time, so the laptop has two IP addresses. ๐Ÿค”

Id be happy to try and tackle this, I just never had the need to do more than is currently implemented. (I run this for my lighting at home, so never ran multiple controllers)

Hehe, I'm using this package to build a fully automated light controller to be used on stage while playing a gigs and tours with by band, so I'm right now heavily relying on it ๐Ÿ˜… ๐Ÿ™ˆ