No, that's a different problem. I only get that error when I disconnect the USB cable. I also see RX/TX leds light up when hyperiond is started so it is sending data to the correct device.
Beiträge von DominicM
-
-
Hmm. whats the [WIKI="Android Remote"]Android Remote app[/WIKI] do when trying to connect or control Hyperion.
Can you post a Hyperion log?
Forgot about the app, but still no luck. I see JSON connected in hyperiond log when app starts but nothing else.When I use HyperCon to connect via SSH and hit Get Log I only get this. Same if hyperiond is started or not.
ssh out: sudo journalctl -u hyperion.service 2>/dev/nullRunning command manually from the terminal I get the following log:
Code
Alles anzeigenApr 03 13:44:02 Server hyperiond[31108]: Opening UART: /dev/ttyUSB0 Apr 03 13:44:02 Server hyperiond[31108]: Unable to open RS232 device (IO Exception (2): No such file or directory, file /home/sascha/hyperion/dependencies/build/serial/src/impl/unix.cc, line 100.) Apr 03 13:44:02 Server hyperiond[31108]: Device blocked for 3000 ms Apr 03 13:44:05 Server hyperiond[31108]: Device unblocked Apr 03 13:44:05 Server hyperiond[31108]: Opening UART: /dev/ttyUSB0 Apr 03 14:08:41 Server systemd[1]: Stopping Hyperion Systemd service... Apr 03 14:08:41 Server hyperiond[31108]: INFO: Application closed with code 0 Apr 03 14:08:42 Server hyperiond[31108]: EFFECTENGINE INFO: Cleaning up Python interpreter Apr 03 14:08:42 Server systemd[1]: Stopped Hyperion Systemd service. Apr 04 16:19:53 Server systemd[1]: Started Hyperion Systemd service. Apr 04 16:19:53 Server hyperiond[27524]: Hyperion Ambilight Deamon (27524) Apr 04 16:19:53 Server hyperiond[27524]: Version : master (brindosch-709faea/49a9ca9-1508693345 Apr 04 16:19:53 Server hyperiond[27524]: Build Time: Apr 2 2018 11:24:30 Apr 04 16:19:53 Server hyperiond[27524]: INFO: Selected configuration file: /etc/hyperion/hyperion.config.json Apr 04 16:19:53 Server hyperiond[27524]: HYPERION INFO: ColorTransform 'default' => [0; 435] Apr 04 16:19:53 Server hyperiond[27524]: HYPERION INFO: ColorCorrection 'default' => [0; 435] Apr 04 16:19:53 Server hyperiond[27524]: HYPERION INFO: ColorAdjustment 'default' => [0; 435] Apr 04 16:19:53 Server hyperiond[27524]: LEDDEVICE INFO: configuration: Apr 04 16:19:53 Server hyperiond[27524]: { Apr 04 16:19:53 Server hyperiond[27524]: "colorOrder" : "rgb", Apr 04 16:19:53 Server hyperiond[27524]: "delayAfterConnect" : 0, Apr 04 16:19:53 Server hyperiond[27524]: "name" : "WA-42-Monitor", Apr 04 16:19:53 Server hyperiond[27524]: "output" : "/dev/ttyUSB0", Apr 04 16:19:53 Server hyperiond[27524]: "rate" : 460800, Apr 04 16:19:53 Server hyperiond[27524]: "type" : "adalight" Apr 04 16:19:53 Server hyperiond[27524]: } Apr 04 16:19:53 Server hyperiond[27524]: Opening UART: /dev/ttyUSB0 Apr 04 16:19:53 Server hyperiond[27524]: INFO: Creating linear smoothing Apr 04 16:19:53 Server hyperiond[27524]: HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0 Apr 04 16:19:53 Server hyperiond[27524]: EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects Apr 04 16:19:53 Server hyperiond[27524]: EFFECTENGINE INFO: Initializing Python interpreter Apr 04 16:19:53 Server hyperiond[27524]: INFO: Hyperion started and initialised Apr 04 16:19:53 Server hyperiond[27524]: INFO: Boot sequence 'Strobe blue' EFFECTENGINE INFO: run effect Strobe blue on channel 0 Apr 04 16:19:53 Server hyperiond[27524]: BLACKBORDER INFO: threshold set to 0 (0) Apr 04 16:19:53 Server hyperiond[27524]: BLACKBORDER INFO: mode:default Apr 04 16:19:53 Server hyperiond[27524]: started Apr 04 16:19:53 Server hyperiond[27524]: INFO: Kodi checker created and started Apr 04 16:19:53 Server hyperiond[27524]: INFO: Json server created and started on port 19444 Apr 04 16:19:53 Server hyperiond[27524]: INFO: Proto server created and started on port 19445 Apr 04 16:19:53 Server hyperiond[27524]: FRAMEBUFFERGRABBER INFO: opened with resolution: 1920x1200@32bit Apr 04 16:19:53 Server hyperiond[27524]: BLACKBORDER INFO: threshold set to 0 (0) Apr 04 16:19:53 Server hyperiond[27524]: BLACKBORDER INFO: mode:default Apr 04 16:19:53 Server hyperiond[27524]: INFO: Framebuffer grabber created and started Apr 04 16:19:53 Server hyperiond[27524]: KODICHECK INFO: Kodi Connected Apr 04 16:19:53 Server hyperiond[27524]: KODICHECK INFO: switching to VIDEO mode Apr 04 16:19:54 Server hyperiond[27524]: BORDER SWITCH REQUIRED!! Apr 04 16:19:54 Server hyperiond[27524]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0 Apr 04 16:19:58 Server hyperiond[27524]: EFFECTENGINE INFO: effect finished Apr 04 16:20:08 Server hyperiond[27524]: PROTOSERVER INFO: New connection Apr 04 16:20:08 Server hyperiond[27524]: BLACKBORDER INFO: threshold set to 0 (0) Apr 04 16:20:08 Server hyperiond[27524]: BLACKBORDER INFO: mode:default Apr 04 16:20:08 Server hyperiond[27524]: PROTOSERVER INFO: New connection Apr 04 16:20:08 Server hyperiond[27524]: BLACKBORDER INFO: threshold set to 0 (0) Apr 04 16:20:08 Server hyperiond[27524]: BLACKBORDER INFO: mode:default Apr 04 16:20:10 Server hyperiond[27524]: BORDER SWITCH REQUIRED!! Apr 04 16:20:10 Server hyperiond[27524]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0 Apr 04 16:20:10 Server hyperiond[27524]: BORDER SWITCH REQUIRED!! Apr 04 16:20:10 Server hyperiond[27524]: CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0 Apr 04 16:20:34 Server hyperiond[27524]: INFO: Application closed with code 0 Apr 04 16:20:34 Server hyperiond[27524]: KODICHECK INFO: Kodi Disconnected Apr 04 16:20:34 Server systemd[1]: Stopping Hyperion Systemd service... Apr 04 16:20:34 Server hyperiond[27524]: PROTOSERVER INFO: Connection closed Apr 04 16:20:34 Server hyperiond[27524]: EFFECTENGINE INFO: Cleaning up Python interpreter Apr 04 16:20:34 Server systemd[1]: Stopped Hyperion Systemd service.
First 5 lines repeat ~20k times. btw, the hardcoded home dir is a bug in hyperiond. I have systemd service disabled since a couple of days ago and have been running hyperiond manually to see the log so that's expected. I don't see much difference between this log and what I get from hyperiond. Is there a way to specify any debug options when running hyperiond? Help page indicates that the only option is the config path.
Also is it expected behavior for arduino to reset on hyperiond start and stop? I am assuming arduino is resetting as it runs the boot effect.
-
Not sure, a couple of thoughts however.
Make sure the arduino is on ttyUSB0, it could be on another port.From 436 leds to 50?
you need to match the "rate" in your hyperion.config.json, It was 460800 in the first config.
That's just for testing, LED count shouldn't matter anyways. I tried both 115200 and 460800 (matches config) baud rate. ttyUSB0 is definitely correct as like I mentioned before I see data leds blinking on the ftdi programmer when I run hyperiond.
-
Tried it now with the new code only changing the following:
Still the same issue, arduino boot sequence but not a different boot sequence set in hyperiond config or any other output. Any other ideas what could be causing this?
In Kodi debug log I see only these messages relating to hyperion:
CodeDEBUG: ### [Hyperion Ambilight] - Reading settings DEBUG: ### [Hyperion Ambilight] - Entering disconnected state DEBUG: ### [Hyperion Ambilight] - Entering connected state DEBUG: ### [Hyperion Ambilight] - Entering error state DEBUG: ### [Hyperion Ambilight] - Entering disconnected state DEBUG: ### [Hyperion Ambilight] - Entering connected state DEBUG: ### [Hyperion Ambilight] - Entering error state DEBUG: ### [Hyperion Ambilight] - Entering disconnected state
Connected/disconnected states correspond to pause/play, I also do see an error notif in Kodi sometimes but not 2 times like in the log.
-
Nah, it's only 42", I just went with very dense LED strips, 144 per 1m. It will be bit less to leave room for wires. and it's a good thing as Arduino is running out of memory with 436 LEDs.
Here is the Arduino code, I commented the magic word parts afterwards for troubleshooting:
Code
Alles anzeigen#include "FastLED.h" // How many leds in your strip? #define NUM_LEDS 432 // For led chips like Neopixels, which have a data line, ground, and power, you just // need to define DATA_PIN. For led chipsets that are SPI based (four wires - data, clock, // ground, and power), like the LPD8806 define both DATA_PIN and CLOCK_PIN #define DATA_PIN 2 #define CLOCK_PIN 13 #define COLOR_ORDER RGB // Adalight sends a "Magic Word" (defined in /etc/boblight.conf) before sending the pixel data uint8_t prefix[] = {'A', 'd', 'a'}, hi, lo, chk, i; // Baudrate, higher rate allows faster refresh rate and more LEDs (defined in /etc/boblight.conf) #define serialRate 460800 // Define the array of leds CRGB leds[NUM_LEDS]; void setup() { // Uncomment/edit one of the following lines for your leds arrangement. // FastLED.addLeds<TM1803, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1804, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<TM1809, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2811, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2812, DATA_PIN, RGB>(leds, NUM_LEDS); FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<NEOPIXEL, DATA_PIN>(leds, NUM_LEDS); // FastLED.addLeds<UCS1903, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<UCS1903B, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<GW6205, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<GW6205_400, DATA_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2801, RGB>(leds, NUM_LEDS); // FastLED.addLeds<SM16716, RGB>(leds, NUM_LEDS); // FastLED.addLeds<LPD8806, RGB>(leds, NUM_LEDS); // FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<SM16716, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); // FastLED.addLeds<LPD8806, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS); // initial RGB flash LEDS.showColor(CRGB(10, 0, 0)); delay(500); LEDS.showColor(CRGB(0, 10, 0)); delay(500); LEDS.showColor(CRGB(0, 0, 10)); delay(500); LEDS.showColor(CRGB(1, 1, 1)); //Serial.begin(serialRate); //Serial.print("Ada\n"); // Send "Magic Word" string to host } void loop() { // wait for first byte of Magic Word /*for(i = 0; i < sizeof prefix; ++i) { waitLoop: while (!Serial.available()) ;; // Check next byte in Magic Word if(prefix[i] == Serial.read()) continue; // otherwise, start over i = 0; goto waitLoop; }*/ // Hi, Lo, Checksum /* while (!Serial.available()) ;; hi=Serial.read(); while (!Serial.available()) ;; lo=Serial.read(); while (!Serial.available()) ;; chk=Serial.read(); // if checksum does not match go back to wait if (chk != (hi ^ lo ^ 0x55)) { i=0; goto waitLoop; } */ memset(leds, 0, NUM_LEDS * sizeof(struct CRGB)); // read the transmission data and set LED values for (uint8_t i = 0; i < NUM_LEDS; i++) { byte r, g, b; while(!Serial.available()); r = Serial.read(); while(!Serial.available()); g = Serial.read(); while(!Serial.available()); b = Serial.read(); leds[i].r = r; leds[i].g = g; leds[i].b = b; } // shows new values FastLED.show(); }
-
I am using WS2812b, the single data wire type.
Config was generated by HyperCon: [MEDIA=pastebin]yuZuj7Eq[/MEDIA]
Type values seem broken as WS2801 and few other types available in hyperCon throw an error in hyperiond complaining that type is not valid. Only with type: adalight could I even start hyperiond.
I used exact arduino code from here:
https://hyperion-project.org/t…-ws2801-ws2812b-apa102.8/Here is the output after running hyperiond: sudo hyperiond /etc/hyperion/hyperion.config.json
Code
Alles anzeigenHyperion Ambilight Deamon (30191) Version : master (brindosch-709faea/49a9ca9-1508693345 Build Time: Apr 2 2018 11:24:30 INFO: Selected configuration file: /etc/hyperion/hyperion.config.json HYPERION INFO: ColorTransform 'default' => [0; 435] HYPERION INFO: ColorCorrection 'default' => [0; 435] HYPERION INFO: ColorAdjustment 'default' => [0; 435] LEDDEVICE INFO: configuration: { "colorOrder" : "rgb", "delayAfterConnect" : 0, "name" : "WA-42-Monitor", "output" : "/dev/ttyUSB0", "rate" : 460800, "type" : "adalight" } Opening UART: /dev/ttyUSB0 INFO: Creating linear smoothing HYPERION (CS) INFO: Created linear-smoothing(interval_ms=50;settlingTime_ms=200;updateDelay=0 EFFECTENGINE INFO: 27 effects loaded from directory /usr/share/hyperion/effects EFFECTENGINE INFO: Initializing Python interpreter INFO: Hyperion started and initialised INFO: Boot sequence 'Strobe blue' EFFECTENGINE INFO: run effect Strobe blue on channel 0 BLACKBORDER INFO: threshold set to 0 (0) BLACKBORDER INFO: mode:default started INFO: Kodi checker created and started INFO: Json server created and started on port 19444 INFO: Proto server created and started on port 19445 FRAMEBUFFERGRABBER INFO: opened with resolution: 1920x1200@32bit BLACKBORDER INFO: threshold set to 0 (0) BLACKBORDER INFO: mode:default INFO: Framebuffer grabber created and started KODICHECK INFO: Kodi Connected KODICHECK INFO: switching to MENU mode BORDER SWITCH REQUIRED!! CURRENT BORDER TYPE: unknown=0 hor.size=0 vert.size=0 EFFECTENGINE INFO: effect finished
I get a rainbow when arduino is reset AND when hyperiond is started or stopped. I do not however get a different boot effect if I set it in the hyperiond config so hyperiond isn't actually controlling arduino, it's just the default boot effect programmed in arduino. Serial data is being sent as I can see flashing TX/RX lights on the ftdi programmer connected to Arduino. If I stop hyperiond I get a notification in kodi from the Add-on. I also see "Switching to PAUSE" or "VIDEO mode" when I pause/resume in Kodi so it seems it is connected to the hyperiond service properly. It is also sending serial data so unless the date being sent is invalid in some way then it leave the issue with Arduino code.
Should arduino code wait for the magic word? I tried commenting the wait section out but it did not make a difference. Maybe someone can see an issue with the code or provide a working sample?
Why aren't the LEDs turning on? What am I missing?