Closed HorizonKane closed 2 years ago
Nevermind, got it working by adding the appropriate amount of zeros at baud rate :)
I'm having the same exact issue right now with my D1 mini. WLED works fine, HyperHDR works over network, but when I switch to adalight, I get no response. Looking at the logs, it looks like it's able to connect to the ESP. Logs attached below. I'm running HyperHDR on a Pi4 if that matters at all. Any help you could provide at all would be great! I've triple checked the number of zeros in the baud rate.
2021-05-16T04:33:20.611Z [SMOOTHING] (INFO) Clearing queued colors
2021-05-16T04:33:20.646Z [LEDDEVICE] (DEBUG) (ProviderRestApi.cpp:150:put()) PUT: [http://10.0.33.10/json/state] [{"on":false}]
2021-05-16T04:33:20.687Z [LEDDEVICE] (DEBUG) (ProviderRestApi.cpp:187:getResponse()) Reply.httpStatusCode [200]
2021-05-16T04:33:41.714Z [LEDDEVICE] (INFO) Stopped LedDevice 'wled'
2021-05-16T04:33:41.715Z [LEDDEVICE] (INFO) Start LedDevice 'adalight'.
2021-05-16T04:33:41.716Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:149:init()) deviceConfig: [{"awa_mode":true,"colorOrder":"rgb","currentLedCount":262,"delayAfterConnect":0,"hardwareLedCount":262,"latchTime":15,"lightberry_apa102_mode":false,"output":"auto","rate":2000000,"rewriteTime":1000,"type":"adalight"}]
2021-05-16T04:33:41.716Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:408:setLatchTime()) LatchTime updated to 15ms
2021-05-16T04:33:41.716Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:429:setRewriteTime()) Refresh interval = 1000ms
2021-05-16T04:33:41.716Z [LEDDEVICE] (DEBUG) (LedDevice.cpp:435:setRewriteTime()) RewriteTime updated to 1000ms
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:36:init()) DeviceType : adalight
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:37:init()) LedCount : 262
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:38:init()) ColorOrder : rgb
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:39:init()) RefreshTime : 1000
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:40:init()) LatchTime : 15
2021-05-16T04:33:41.717Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:52:init()) deviceName : auto
2021-05-16T04:33:41.718Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:53:init()) AutoDevice : 1
2021-05-16T04:33:41.718Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:54:init()) baudRate_Hz : 2000000
2021-05-16T04:33:41.718Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:55:init()) delayAfCon ms: 0
2021-05-16T04:33:41.718Z [LEDDEVICE] (DEBUG) (LedDeviceAdalight.cpp:64:CreateHeader()) Adalight driver with activated high speeed & data integration check AWA protocol
2021-05-16T04:33:41.718Z [LEDDEVICE] (DEBUG) (LedDeviceAdalight.cpp:74:CreateHeader()) Adalight header for 262 leds: Awa 0x01 0x05 0x51
2021-05-16T04:33:41.761Z [LEDDEVICE] (INFO) found serial device: ttyUSB0
2021-05-16T04:33:41.761Z [LEDDEVICE] (INFO) Opening UART: ttyUSB0
2021-05-16T04:33:41.762Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:141:tryOpen()) _rs232Port.open(QIODevice::ReadWrite): ttyUSB0, Baud rate [2000000]bps
2021-05-16T04:33:41.807Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:146:tryOpen()) portName: ttyUSB0
2021-05-16T04:33:41.807Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:147:tryOpen()) systemLocation: /dev/ttyUSB0
2021-05-16T04:33:41.808Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:148:tryOpen()) description: USB2.0-Ser
2021-05-16T04:33:41.808Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:149:tryOpen()) manufacturer: 1a86
2021-05-16T04:33:41.808Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:150:tryOpen()) productIdentifier: 0x7523
2021-05-16T04:33:41.808Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:151:tryOpen()) vendorIdentifier: 0x1a86
2021-05-16T04:33:41.808Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:152:tryOpen()) serialNumber:
2021-05-16T04:33:41.818Z [COMPONENTREG] (DEBUG) (ComponentRegister.cpp:36:setNewComponentState()) LED device: enabled
2021-05-16T04:33:41.819Z [SMOOTHING] (INFO) Using alternative smoothing input (0)
2021-05-16T04:33:41.820Z [SMOOTHING] (DEBUG) (LinearColorSmoothing.cpp:139:write()) Enabling timer. Now timer is active: 1, remaining time to run: 12
2021-05-16T04:33:41.832Z [SMOOTHING] (INFO) Using alternative smoothing procedure (0)
2021-05-16T04:33:42.202Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:33:43.197Z [IMAGETOLED] (INFO) Total index number for instance: 0 is: 50312. Sparse processing: disabled, image size: 640 x 480, area number: 261
2021-05-16T04:33:43.477Z [V4L2:/DEV/VIDEO0] (INFO) Video FPS: 30.02, av. delay: 1ms, good: 1801, bad: 0 (60.03,15)
2021-05-16T04:33:56.026Z [IMAGETOLED] (INFO) Total index number for instance: 0 is: 76456. Sparse processing: disabled, image size: 640 x 480, area number: 261
2021-05-16T04:34:12.215Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:34:15.985Z [COMPONENTREG] (DEBUG) (ComponentRegister.cpp:36:setNewComponentState()) LED device: disabled
2021-05-16T04:34:15.988Z [SMOOTHING] (INFO) Clearing queued colors
2021-05-16T04:34:16.331Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:93:close()) Flush was successful
2021-05-16T04:34:16.332Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:95:close()) Close UART: ttyUSB0
2021-05-16T04:34:30.311Z [LEDDEVICE] (INFO) Opening UART: ttyUSB0
2021-05-16T04:34:30.314Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:141:tryOpen()) _rs232Port.open(QIODevice::ReadWrite): ttyUSB0, Baud rate [2000000]bps
2021-05-16T04:34:30.385Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:146:tryOpen()) portName: ttyUSB0
2021-05-16T04:34:30.386Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:147:tryOpen()) systemLocation: /dev/ttyUSB0
2021-05-16T04:34:30.386Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:148:tryOpen()) description: USB2.0-Ser
2021-05-16T04:34:30.387Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:149:tryOpen()) manufacturer: 1a86
2021-05-16T04:34:30.388Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:150:tryOpen()) productIdentifier: 0x7523
2021-05-16T04:34:30.388Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:151:tryOpen()) vendorIdentifier: 0x1a86
2021-05-16T04:34:30.389Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:152:tryOpen()) serialNumber:
2021-05-16T04:34:30.395Z [COMPONENTREG] (DEBUG) (ComponentRegister.cpp:36:setNewComponentState()) LED device: enabled
2021-05-16T04:34:30.396Z [SMOOTHING] (INFO) Clearing queued colors
2021-05-16T04:34:30.398Z [SMOOTHING] (INFO) Using alternative smoothing input (0)
2021-05-16T04:34:30.399Z [SMOOTHING] (DEBUG) (LinearColorSmoothing.cpp:139:write()) Enabling timer. Now timer is active: 1, remaining time to run: 12
2021-05-16T04:34:30.412Z [SMOOTHING] (INFO) Using alternative smoothing procedure (0)
2021-05-16T04:34:32.259Z [IMAGETOLED] (INFO) Total index number for instance: 0 is: 68024. Sparse processing: disabled, image size: 640 x 480, area number: 261
2021-05-16T04:34:35.392Z [IMAGETOLED] (INFO) Total index number for instance: 0 is: 76456. Sparse processing: disabled, image size: 640 x 480, area number: 261
2021-05-16T04:34:42.209Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:34:43.505Z [V4L2:/DEV/VIDEO0] (INFO) Video FPS: 30.02, av. delay: 5ms, good: 1801, bad: 0 (60.03,15)
2021-05-16T04:35:12.215Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:35:42.218Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:35:43.533Z [V4L2:/DEV/VIDEO0] (INFO) Video FPS: 30.02, av. delay: 5ms, good: 1801, bad: 0 (60.03,15)
2021-05-16T04:36:12.212Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:36:17.209Z [V4L2:/DEV/VIDEO0] (INFO) Signal lost
2021-05-16T04:36:18.777Z [V4L2:/DEV/VIDEO0] (INFO) Signal detected
2021-05-16T04:36:42.231Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:36:43.534Z [V4L2:/DEV/VIDEO0] (INFO) Video FPS: 30.00, av. delay: 5ms, good: 1800, bad: 0 (60.00,15)
2021-05-16T04:37:12.229Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:37:42.244Z [HTTPJSONRPC] (DEBUG) (JsonAPI.cpp:85:handleInstanceSwitch()) Client '::ffff:10.0.1.10' switch to HyperHDR instance 0
2021-05-16T04:37:43.562Z [V4L2:/DEV/VIDEO0] (INFO) Video FPS: 30.02, av. delay: 5ms, good: 1801, bad: 0 (60.03,15)```
productIdentifier & vendorIdentifier indicate that it's some kind of ch340 family serial chip but verify that with your own eyes on the board because you can't trust them (as in my following logs with fake ID). You could try to limit for a test led number in HyperHDR to 100 but I doubt it can help. My logs for d1 mini are quite different, using different driver and that may cause the trouble in your case and don't allow to use 2Mb serial mode: 2021-05-15T22:29:43.144Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:146:tryOpen()) portName: ttyUSB0 2021-05-15T22:29:43.144Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:147:tryOpen()) systemLocation: /dev/ttyUSB0 2021-05-15T22:29:43.144Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:148:tryOpen()) description: FT232R USB UART 2021-05-15T22:29:43.145Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:149:tryOpen()) manufacturer: FTDI 2021-05-15T22:29:43.145Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:150:tryOpen()) productIdentifier: 0x6001 2021-05-15T22:29:43.145Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:151:tryOpen()) vendorIdentifier: 0x403 2021-05-15T22:29:43.145Z [LEDDEVICE] (DEBUG) (ProviderRs232.cpp:152:tryOpen()) serialNumber: A50285BI (which indicate fake chip but it's CH340G and it works)
Thanks so much for your response. I tried to troubleshoot today and have made some progress. The chip does indeed say CH340G so I think it's right. Limiting the led number to 100 didn't change anything. I had been playing around with the Arduino IDE a couple weeks ago for another project, so I thought I would try out a small test program to see if it was capable at communicating at 2000000 baud. Serial monitor was just showing scrambled data at 2000000 but it did work at 1000000. I was able to change HyperSerialEsp8266 to 1000000 and that worked somewhat for my LEDs but gave me other issues with my capture card, not sure if it's related or not. I was also able to get the standard WLED instance working at 115200 baud rate, but that seemed too slow to look good. I tried looking into compiling my own WLED at 1000000 but it seemed much over my head since I'm still new to all this. Is there any make to make your version of HyperSerialWLED have a variable for the baud rate so we could set it ourselves through the WLED UI? Sorry if that's an ignorant question, I'm not really sure how the baud rate actually works. I might shop for some more d1 minis to see if I can find any better ones, but I'm not real sure what to look for.
You may experience more or less troubles using standard WLED at 1 000 000 speed and above but I think it's no it fault. Rather it's the limitation of the standard adalight protocol which assumes perfect, error free transmission. It has protection only for a tiny bit of the frame. You can easily change the HyperSerialWLED speed in https://github.com/awawa-dev/HyperSerialWLED/blob/master/wled00/wled.cpp in setup() and compile the project with Code Studio (perfect instruction is at the WLED project's wiki).
Thanks so much for pointing me in the right direction! I'll give it a shot. Thanks for all your work on HyperHDR, I'm excited to get it up and running!
Do you have another D1 (different manufacturer) available to try? I would give it a try. As it is working on 1000000, maybe your chip is just not doing it right and they are cheap enough to try another and maybe save a lot of time.
Mine for example are from AZ delivery and work great with HyperSerialWLED.
I first bought a five pack of them off Amazon and two of them tested the same, but presumably they're the same manufacturer since they came together. I ordered some more off of Amazon that look slightly different in hopes they'll work at 2000000. They arrive tomorrow, so we'll see. I was able to get WLED working at 1000000 today, so right now it's functional, but I want the best performance I can get, so I'll try the new D1s tomorrow.
Hi,
I flashed HyperSerialWLED ony my 340G AZ Delivery D1 mini v3. It is working good as WLED and also with HyperHDR over network. However, when I connect it to the Pi through USB and enable adalight with awa option in HyperHDR, just nothing happens. Do I miss anything?
Kind regards