hideakitai / ArtNet

Art-Net Sender/Receiver for Arduino (Ethernet, WiFi)
MIT License
257 stars 52 forks source link

Change Artnet node name programmatically? #30

Closed tomtomhoward closed 2 years ago

tomtomhoward commented 2 years ago

Hi Apologies for a possible feature request as I know you must be inundated and your library is fantastic. Is there way to change the node name without editing the library? I have multiple nodes running and it would be great to be able to identify between them. If I could change the name in the sketch it would be a bit help as I can change via editing the library but I have to do it every time between programming different nodes. Apologies if there is already a way to do this and I haven't found it Many thanks Tom

hideakitai commented 2 years ago

Hi, have you tried ArtPollReplySetting?

You can configure the information of ArtPollReply as follows void shortname(const String& sn) void longname(const String& ln) void nodereport(const String& nr)

tomtomhoward commented 2 years ago

Apologies but how would you code that from within Arduino IDE? artnet.ArtPollReplySetting(name) or similar?

hideakitai commented 2 years ago

Please call the methods listed above. First, please try it.

hideakitai commented 2 years ago

artnet.shortname("foo");

tomtomhoward commented 2 years ago

Thanks so much for that I couldn't get it right I was using artnet.short_name("") Sorry for wasting your time I've found it was there now in the readme via your copy above, I was searching short_name as that's the default string in the library so I couldn't find it by searching. Many thanks, I have the hostname of the devices set and just want to duplicate it onto the artnet poll.

I am reusing some old analogue pre-DMX dimmers by fitting ESPs to fire the triacs and control them over artnet. I am a theatre technician by trade building stages and carpentry so apologies a lot of this is not natural to me

hideakitai commented 2 years ago

No problem. I hope your project goes well!