Code Monkey home page Code Monkey logo

lxdmxwifi_library's Introduction

LXDMXWiFi_library

Library for ESP8266 implements Art-Net and sACN with example sketches showing both DMX input to and DMX output from network.

LXDMXWiFi encapsulates functionality for sending and receiving DMX over an ESP8266 WiFi connection It is a virtual class with concrete subclasses LXWiFiArtNet and LXWiFiSACN which specifically implement the Artistic Licence Art-Net and PLASA sACN 1.31 protocols.

Included examples of the library's use:

     DMX input to network using UART and MAX485 driver chip

     Test of receiving two universes of DMX data from network

     DMX output from network using UART and MAX485 driver chip
        This example includes Eagle files and photos of completed project using this example
        It also includes python script for remote management of protocol/wifi settings

Photo shows complete WiFi to DMX unit with RJ45 connector for DMX output: (not to be confused with ethernet)

Photo

On the left side is connector for external 5v power and default boot push button. (holding down default boot forces unit into access point mode allowing configuration via network using python tool.)

lxdmxwifi_library's People

Contributors

claudeheintz 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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

lxdmxwifi_library's Issues

WDT resets

loaded stock code for esp lxdmxwifi example and in AP mode im getting hard reset and WDT error on reboot

Wifi configuartion tool not working

Hello, I am trying to use the WiFi configuration tool with no luck.
I am running the java application in both Windows 10 and MacOs, however it is not working (no devices found).
This is on an ESP8266, not an ESP32.
If however, I try to use the python tool, I am getting an "exception reading packet" on the console log.
I have tried both in AP and Station mode. The wireless connection is working and the DMX changing (I am using "Art-net Controller" on Android)
Thank you for your time.

Configure sendind and receiving with d1 wemos

Hello,
This project is great for me, i want to delete dmx cable between midi foot module and light devices.
But I'm not sure to understand what I'm suppose to do... I have 4 lights with one d1 mini each and one d1 wemos to send dmx of the foot module.

  • you say :"you configure one microcontroller to convert DMX to Art-Net in access point WiFi mode" :
    so I put this line :

    strncpy((char*)_wifi_config, CONFIG_PACKET_IDENT, 8); //add ident
    _wifi_config->version = DMXWIFI_CONFIG_VERSION;
    _wifi_config->wifi_mode = LX_AP_MODE;
    _wifi_config->protocol_flags = INPUT_TO_NETWORK_MODE | RDM_MODE;

and you say "Then, you configure another to convert Art-Net to DMX in WiFi station mode. The second Art-Net receiver should be connected to the WiFi SSID created by the first (AP/sending) microcontroller."

so I put this line on the second :
strncpy((char*)_wifi_config, CONFIG_PACKET_IDENT, 8); //add ident
_wifi_config->version = DMXWIFI_CONFIG_VERSION;
_wifi_config->wifi_mode = LX_STATION_MODE;
_wifi_config->protocol_flags = INPUT_TO_NETWORK_MODE | RDM_MODE;

how configure receivers as "converting Art-Net to DMX in WiFi station mode." ?

Could anybody help me please ?

Thanks a lot

WiFi Manager

Hi Claude,
I'm quietly new to ESP and programming. I was looking for some sketches to build an RGBW Led Light with DMX serial capabilities and after trying different projects I found yours. I had to say it was perfect and quite simple to understand and I really congratulate you!
After that... I was wondering if it could not be more easy to add a Wifi manger to set Wifi settings and Artnet or sACN type of transmission instead of configuration utility? It could be added also, for example, a power sequence to reset it instead of placing things on the hardware... Obviously I'll try by myself to do that but I think it could be added to make it easear to change setting in a simple way.
Thanks a lot!

error class LX8266DMX

When I compile to upload on adafruit feather I have error:
'class LX8266DMX' has no member named 'numberOfSlots'

Artnet node not found in AP Mode

Hi Claude,
sorry, I know, I'm a pain in the ass...
I'm trying "Osram DMX WiFi controller" App to drive my Led light with your library with ESP32. To work you should Poll the Artnet node. When connected to a local network (static mode) Artnet node is found and I can drive my light but in AP mode Artnet node is not found or found as 0.0.0.0 IP Address and I can't control the light.
Is this correct? There's a way to solve this?
I found that also with a PC software (Chamsys for PC) in AP mode the Artnet node found is 0.0.0.0
Knowing in advance my AP IP Address maybe I can set the Artnet node IP Address?

Fastled

Hi,
I'm using this library with ESP32 and Fastled library. Everything work fine with at maximum 170 led and 1 universe:
for (int i = 0; i < NUM_LEDS; i++) {
leds[i] = CRGB(ESP32DMX.getSlot(i * 3 + 1), ESP32DMX.getSlot(i * 3 + 2), ESP32DMX.getSlot(i * 3 + 3));
}
FastLED.show();
There's a way to use Fastled with multiple universes, with more than 170 Led?

Thanks

DMX2WiFi not work

Hi

Today I tried the code DMX2WiFi which I have chosen ArtNet protocol but it does not work for me as I have chosen the input signal from FTDI as (Entec Open DMX) do not know where could be the problem ? when you connect a DMX signal LED flashes quickly but on the other device nothing happens.

ESP-DMX IP report porblem

Hi,
Firts of all very nice project!

I try to use Unicast.

I noticed a problem with some programs. The IP address was not recognised correctly.

The software I use is Lightjams.
The IP address in the programm is recognised as 0.0.0.0 ; When I change it to the correct IP it works.
The problem is when a node disconnects and reconnect the IP is changed to 0.0.0.0 and the system stops working.

I analyzed the problem in DMX workshop and noticed the following:

Artnet Report node:

esp-artnet3

In the node status and output routing it works ok.

esp-artnet

esp-artnet2

esp-artnet4

I suspect that the IP is not defined in the node report.
Can I fix this in some way?

ESP32-DMX_rdm STATION_MODE

hello i have a problem with esp32dmxrdm when i go in station mode
the esp32 ce connect to the network then shows me this error:

config read OK.
wifi connecting to RIRI-DMX-WiFi... wifi started 2.0.0.111
starting DMX
interfaces created, udp started listening, setup complete.
number of tasks is 13
E (117455) esp_pthread: pthread_getspecific: not supported!
E (117455) esp_pthread: pthread_setspecific: not supported!
abort() was called at PC 0x400d6593 on core 1

Backtrace: 0x40087650:0x3ffd6360 0x4008774f:0x3ffd6380 0x400d6593:0x3ffd63a0 0x400d65da:0x3ffd63c0 0x400d6cde:0x3ffd63e0 0x400d6d67:0x3ffd6400 0x400d6232:0x3ffd6420 0x400d61e9:0x3ffd6440 0x400d3ad8:0x3ffd6460 0x400d4da5:0x3ffd64a0 0x400d4ddf:0x3ffd64c0 0x400d1b11:0x3ffd64e0 0x4011b9b0:0x3ffd6500

Rebooting...
ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0010,len:4
load:0x3fff0014,len:572
load:0x40078000,len:0
load:0x40078000,len:9880
entry 0x400789d8

config read OK.
wifi connecting to RIRI-DMX-WiFi... wifi started 2.0.0.111
starting DMX
interfaces created, udp started listening, setup complete.
number of tasks is 13
E (126324) wifi: error malloc bcn_param

I just changed that in LXDMXWIFIConfig.cpp in line 76
_wifi_config->wifi_mode = STATION_MODE ; // AP_MODE or STATION_MODE
_wifi_config->protocol_flags = MULTICAST_MODE; // sACN multicast mode
// optional: | INPUT_TO_NETWORK_MODE specify ARTNET_MODE or SACN_MODE
// optional: | STATIC_MODE to use static not dhcp address for station
// eg. _wifi_config->protocol_flags = MULTICAST_MODE | INPUT_TO_NETWORK_MODE | SACN_MODE;
strncpy(_wifi_config->ssid, "RIRI-DMX-WiFi", 63);
strncpy(_wifi_config->pwd, "riridmxwifi", 63);

it connect this on another esp32 in ap mode with ssid and pwd, of course with esp32-dmx_rdm

Light flashes with "Changes only" output protocol

Hi Claude,
I found this problem. Trying to control my light with Aurora DMX (App on Google store) my light start flashing instead of staying always on.
When i tried with other software same result. At the end I discovered that they both use the "Changes only" transmission type. It means that controller only outputs data on changes exept one per second (that's why my light flashes).
This is done to reduce the output data on heavily loaded network.
For better compatibility this could be corrected in the library? Or I have to write corrections needed on my firmware to not have my light flash?

Serial output gibberish in INPUT_TO_NETWORK_MODE and dropped fames

This is kind of 2 issues, but they might be related. I have 2 identical ESP-12N development boards each with it's own MAX485 driver. I am trying to set up one as a transmitter and the other as a receiver. I am using the ESP-DMX example code. I am not using the configuration utility, but instead changing the values in DMXwifiConfig::initConfig. I can get the boards to talk to each other, however I cannot check any debug information on the transmitter.

The only differences between the 2 in code is the following lines.
Receiver:
_wifi_config->wifi_mode = STATION_MODE;
_wifi_config->protocol_flags = MULTICAST_MODE | STATIC_MODE;
Transmitter:
_wifi_config->wifi_mode = AP_MODE;
_wifi_config->protocol_flags = MULTICAST_MODE | INPUT_TO_NETWORK_MODE | SACN_MODE;

I have uploaded the same code onto both boards to check if it was a hardware issue, but it makes no difference. If the board has the flag INPUT_TO_NETWORK_MODE the serial monitor no longer works, just outputs garbage. I also ruled out AP_MODE, the following outputs correctly:
_wifi_config->wifi_mode = AP_MODE;
_wifi_config->protocol_flags = MULTICAST_MODE | STATIC_MODE;
But this does not work for transmitting over the network.

Despite the serial monitor not working, the code appears to be functioning correctly (or at least partially). The transmitter does set up an access point with the correct parameters, and the receiver connects to it instantly. It seems to be dropping frames though.

I am using qlcplus and a DIY OpenDMX USB device that is transmitting at 30 frames/sec. The ESP transmitter LED is blinking steadily when data is present. The receiver LED is completely sporadic, and the DMX data coming out of it is as well. Both units are running at 160 MHZ, and are located ~10cm apart. They are running off the same 2 amp 5v power supply. I have tested using both SACN_MODE and ARTNET_MODE and neither seem to work better. I have not tried unicast yet, and would prefer to stick with multi if possible.

Has a similar setup worked successfully for anyone else? Wondering if there's something that i am overlooking?

EDIT:
Suspecting the dropped frames were an issue with the AP_MODE, I set up a consumer router as an access point and ran both the transmitter and receiver in STATION_MODE. The transmission became much more stable, and is actually usable now. I suspect that there is some overhead in the softAP that is unable to handle DMX.

I still cannot use the serial monitor, but the system is functioning.

bool DMXwifiConfig::artnetMode(void)

hello claude, i have some problem with esp32-dmx_rdm.
I would like to convert my entry dmx to artnet.
I do not understand : ligne 138 to LXDMXWIFIConfig.cpp
bool DMXwifiConfig::artnetMode(void) {
return ( ( _wifi_config->protocol_flags & SACN_MODE ) == 0 );
}
i tried to change it on:
return ( _wifi_config->protocol_flags & ARTNET_MODE ) ;

but it does not work. still no artnet on the network.

NeoPixel example: inconsistent function declaration

Hi!

First of all, thank you for making this great lib available!

I seems that there's an inconsistent function declaration since the last commit:
prototype for 'void DMXwifiConfig::readFromPersistentStore()' does not match any in class 'DMXwifiConfig'
in the NeoPixel example.

I think
uint8_t readFromPersistentStore(void);
should be
void readFromPersistentStore(void);

in examples/ESP-DMXNeoPixels/LXDMXWiFiConfig.h.

regards
Leonhard

Dmx wifi transmit & received.

I see that there are many projects, but it is not clear.
I'd like to send dmx siglal 20 meters.
Would be to do a DMX transmitter and one DMX receiver .
It is not clear to me if it adjusts in the projects?
greeting

Frame rate

Hi!
Thanks for making this library available! I tried the ESP-DMX example using an ESP8266 12F.
It does work, however the frame rate seems to be pretty low. Fades are not continuous and stuttering in my test setup. Is this a general limitation of the ESP8266 or is there something wrong with my setup?
Thanks!

Best, Leonhard

Better Documentation

Could we get some better documentation? At minimum some better labels for what the examples actually are?

This library seems like it does exactly what I need but the documentation is a joke.

Add another ports

Hi

Please can you tell me how I could add another port to this library, therefore, that I would need to operate more than 512 channels thanks.

#f4e7ae4 | Compat

Hi!

Using the library today, I had to make changes to

if ( interfaceAddr != 0 ) {

into if ( interfaceAddr ) { due to compiler errors


Secondly, after investigating why my ArtNet packets weren't being received
I changed

if ( (uint32_t)_dmx_sender_a == 0 ) { //if first sender, remember address

to if ( _dmx_sender_a == INADDR_NONE ) {
(and likewise for _dmx_sender_b)

It seems that INADDR_NONE is equal to -1, not 0.

but, I've previously used this library in late 2017/early 2018 and it worked.

Just wondering if you were aware of this, or it's some misconfiguration on my end

PR: #19


Commit f4e7ae4
NodeMCU V1 ESP8266
Arduino 1.8.9

esp-dmx configuration utility

hello claude,
i followed your instructions.i managed to connect with esp-dmx configuration utility
I had to make a mistake because since I upload.impossible to reconnect to esp32 .I have therefore taken your example esp32-dmx-rdm and load in the sp.
but still nothing .esp-dmx configuration utility finds nothing.
the serial monitor:

ands Jun 8 2016 00:22:57

rst: 0x10 (RTCWDT_RTC_RESET), boot: 0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP: 0xee
clk_drv: 0x00, q_drv: 0x00, d_drv: 0x00, cs0_drv: 0x00, hd_drv: 0x00, wp_drv: 0x00
mode: DIO, clock div: 1
load: 0x3fff0010, len: 4
Load: 0x3fff0014, len: 572
load: 0x40078000, len: 0
Load: 0x40078000, len: 9880
entry 0x400789d8

config read OK.
AP_MODE ESP-DMX-WiFi created access point at 10.110.115.10 accessPoint SSID ESP-DMX-WiFi,
wifi started 0.0.0.0
starting DMX input
interfaces created, setup complete.
number of tasks is 13

.
the status led (pin 19) flashes well when I come back from the dmx

still no artnet on are network.

how should i do to be able to find esp with esp-dmx configuration utility?

thank you
richard

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.