Skip to content

Conversation

@Paulchen-Panther
Copy link
Member

@Paulchen-Panther Paulchen-Panther commented Dec 2, 2018

The following changes have been made:

  • General:
    • Remove invalid iCCP chunk from hyperion icon
    • Fix timeout push and display with timeout 0
    • Added resources directory to share resources as code (static lib) e.g. systray icon for standalone capture implementations
    • Some polishing to CPack
    • Git remote path now embed in build id, to see faster the origin repository
    • Corrected some code indent
    • Set CMake QT version to 5.5 & python version to 3.5
    • Additions to .deb creation
    • Fix Aurora compiler warning (Issue Aurora compiler warning #527)
    • Removed some redundant code in ImageToLedsMap and reserved memory on the ledColors vector (MartB Commit: 1d9165f)
    • Docker compile script and instruction
    • Removed assets/webconfig/server_scripts/demo.py
    • Avoid compilation 'note' on GCC 6 ARM
    • Removed V4L2 warning for OSX build
    • LED device "PiBlaster" excluded from OSX build
    • Message forwarding implemented again
    • The information "available V4L2 devices" is now only displayed if the device list is not empty
  • Capture interfaces:
    • Search and connect to Hyperion server using ssdp discovery
    • Remove assert()
  • Platform Capture:
    • set inactive after 5s no input
  • Dispmanx:
    • Fix double free of _captureBuffer
  • V4L2:
  • QtGrabber:
    • New default capture implementation
  • LED Devices:
  • Flatbuffer:
  • Blackborder:
    • Fix Processor threshold calculation
    • Detector does not allocate all the images now if the first one already matches. (MartB Commit: 1d9165f)
  • WebUI:
    • Custom effects can now be deleted again
    • More i18n (translation files)
    • Speed improvements for live visualization
    • LED & IMAGE stream set to max 20hz
    • Remove restarts
    • UploadHandler added to Effects Configurator to allow uploading GIF files
    • Update entry is now disabled (https://hyperion-project.org/threads/update-to-2-1.3350/)
    • Smoothing type "linear" hidden in the WebUI, because there is currently only one
  • EffectEngine:
    • Python DeInit / Init is now globally managed
    • Modules separated from the actual sub-interpreter code, since they are already static (EffectModule.h)
    • Header files moved to include directory
    • New global effect file handler class
  • Effects:
    • New wave effect
    • Remove running dots effect
  • JSON Server:
    • Function sendMessage() moved to JsonAPI
  • Doxygen:
    • Add cmake option "BUILD_HYPERION_DOC"
  • WebServer:
    • Rename webconfig to webserver
    • Close client connection on stop
    • Webserver can be no longer disabled
    • Port number will now increment if port is not available for listening. To prevent total webui failure
    • WebSocket are now shared between WebServer and JsonAPI
  • SSDP:
    • As alternate to ZeroConf, will reflect changes to webserver port and whole interface address changes
  • Boblight:
    • Moved to hyperion class, as it can't live in global scope
  • PriorityMuxer:
    • The PriorityMuxer now simply accepted images (size should already be compressed)
  • JsonAPI:
    • Class replacement for JsonProcessor
    • Backwards compatibility ensured, to support hyperion classic remote control. The old transform commands are not supported yet.
    • The "clearall" command works again
    • The origin parameter is now optional (Thanks to penfold42 BugFixes ... #523 (comment))
    • Easy use of mutual exclusion with QMutexLocker for LED & IMAGE stream
  • BonjourBrowser:
    • BonjourServiceBrowsing moved to the daemon since globally valid. Interface of the register method slimmed down
  • SettingsManager:
    • New Class to manage the settings read write from/to config file

... and many small changes.

Notes: This PR is mostly from @brindosch's and @MartB's rework branch .
After a successful test I have taken over all important changes from Brindosch and MartB.
I will omit not fully functional changes such as the plugin system, the database,
the instance management and the API authentication for the moment.

@wolph, @RickDB, @penfold42, @SJunkies and all other People:

TESTERS WANTED

Build Status

@Paulchen-Panther Paulchen-Panther changed the title Bug fixes BugFixes, new Wave effect,.. Dec 20, 2018
@RickDB
Copy link

RickDB commented Dec 20, 2018

Awesome, let me know when ready and will merge it 👍

@janpfischer
Copy link
Contributor

I think he wants to say that we should edit this file
https://github.com/hyperion-project/hyperion.ng/blob/master/.travis/travis_deploy.sh
to deploy the builds here on github instead on sourceforge (which is not working atm anyways)

First, the other prs must be corrected. then we can work on the travis_deploy.sh. 😉 :

Why is it needed that the PRs will build? You mean open PRs?
Isn't it only important that our master will build?

@Paulchen-Panther
Copy link
Member Author

Why is it needed that the PRs will build? You mean open PRs?
Isn't it only important that our master will build?

Klar ist es wichtig, das der Master Branch erzeugt wird. Ich möchte aber auch nicht das Leute die vor mir PRs erstellt haben wegen mir das nachsehen haben. Deshalb hat @RickDB die Leute informiert.

@janpfischer
Copy link
Contributor

Klar ist es wichtig, das der Master Branch erzeugt wird. Ich möchte aber auch nicht das Leute die vor mir PRs erstellt haben wegen mir das nachsehen haben. Deshalb hat @RickDB die Leute informiert.

Ok, verstanden. Macht sinn, danke.

@RickDB
Copy link

RickDB commented Feb 7, 2019

Only 2PRs left to fix, @Paulchen-Panther any ideas what we need to correct for #530 ?

@RickDB
Copy link

RickDB commented Feb 7, 2019

@Paulchen-Panther Btw since you did a considerable amount of work on this would you like to get the team member status on Github and forum?

@Paulchen-Panther
Copy link
Member Author

@RickDB I would feel honored.

@Joeboyc2
Copy link
Contributor

Joeboyc2 commented Feb 7, 2019

I feel it's only right, you've done some great work @Paulchen-Panther

@RickDB
Copy link

RickDB commented Feb 7, 2019

@Paulchen-Panther Awesome, team invite sent 👍

@Paulchen-Panther
Copy link
Member Author

@RickDB Thank you very much! 😃

@RickDB
Copy link

RickDB commented Feb 8, 2019

@Paulchen-Panther Is there a way to include the CoreElec patch from PR #534 without it conflicting with our other platforms?

Patch is listed here: #534 (comment)

@Paulchen-Panther
Copy link
Member Author

@RickDB
Yes, it's possible. The global CMake variable ENABLE_AMLOGIC can be used to query whether hyperion is being build for the amlogic system and thus it is possible to add a bibliotek individually.

@brindosch
Copy link
Contributor

Hello @Paulchen-Panther,
thank you for all your hard work migrating also my stuff into it. So it isn't lost in .... space :)
I want to add a short comment on your comment :)

I will omit not fully functional changes such as the plugin system, the database,
the instance management and the API authentication for the moment.

The database itself seemed stable to me. With the signal/slot thing it should also work across threads. Actually you have seen a lot of segfaults for sure while saving/interacting. A reason is the direct access of the threaded webserver to the threaded Hyperion class which interrupts the Hyperion thread in a very dangerous way. You can see this at the stacktraces, it crashes everywhere with no reason (I had further issues with the LED device thread)

I implemented the database primarily to remove the need of config files. As a user wish was also to use multiple Hyperion instances at the same time (multiple led devices) with no hassle. After a lot of internal reorganizing the live apply of settings was simply part of it.

As i am a huge fan of addons and extensions, a database to save their state and settings was helpful. Especially as we are talking about multiple Hyperion instances which can run each addon on their own with own settings. That would be a mess without (You can handle this but...) :)

Was the api auth broken? Probably i didn't pushed the last changes to gh. The system itself is probably slighty oversized. On the other hand some default security might kill no one (for example just local network access to Hyperion by default)

I found a .gif of the token system
token-manage

And the state of the webapp (created with Quasar (Vue)), a simple control interface with multi instance support. The coolest thing from my view was the SSDP server detection when compiled for Android. Sadly the overall support of minimum required Android versions is critcal and the performance in a browser is better(!!!)
app

@Paulchen-Panther
Copy link
Member Author

Hallo @brindosch
Ein paar Punkte bezüglich deinem Projekt und Dir hätte ich auch noch.
Der erste Punkt geht an dich. Ist deine Anwesenheit von dauert oder nur ein Gast auftritt?
Der nächste Punkt betrifft deine Änderungen (Rework Branch). Es ist schön das du dich in dein Projekt so sehr vertieft hast aber es ist und bleibt nicht meins. Die neue WebUI lässt sich schön anschauen, die Instanzverwaltung sowie die Berechtigungsverwaltung sind garantiert auch nicht schlecht. Es steht dir jederzeit frei es selber zu veröffentlichen. Mehr habe ich nicht zu sagen.

@janpfischer
Copy link
Contributor

The database feature is indeed nice. But I remember that I was not able to compile your work because of a restriction in version compatibility with QT and your DB dirvers.

The Feature with the api is also nice and something we should add for security. I also think that the way you implemented the feature is good for us regarding the scope. I also think about setting a password for access the webui.

The Webapp is nice! Is there a way to test? This should not replace the webui right? It is more meant for an remote app, right?

@brindosch
Copy link
Contributor

Hallo @Paulchen-Panther ,
also das war keine Kritik an deiner Arbeit, sollte man das falsch verstanden haben. Ich kann aber nachvollziehen, dass die Migration super ärgerlich ist, weil es eigentlich unnötig wäre, hätte ich die Arbeiten abgeschlossen oder besser nur Stück für Stück übernommen. Du hast bei den Plugins ja noch mir ausgeholfen und nun konnte man es nicht übernehmen, weil es einfach immer verzwickter wurde/ schlicht zuviel. Was coden angeht kann ich nichts versprechen. Vielleicht packt es mich mal wieder. Auch wenn ich es zuletzt doch etwas übertrieben habe :)
Ich hatte zwischendrin noch einen ekelhaften Datenverlust bei dem leider einiges zur Hyperion webpage und co verloren gegangen ist. Hat die Motivation nicht unbedingt gesteigert, war aber eigenes verschulden nicht öfters backups angefertigt zu haben.

Du kannst aber gerne jederzeit einen Gedankenaustausch anstoßen oder nachfragen, sollte was unklar sein. Du hast dich da allerdings schon sehr rein gehangen (Docker,Azure,Travis und co), da gehört schon viel Zeit dazu bis es Resultate gibt (Ich denke mal ich kann das so sagen - als ebenfalls Laie) und so wirklich dankt es keiner. Ich fand das mit redPanther immer ganz toll, ich hatte nur kaum ein Wort verstanden was redPanther immer schrieb, als redPanther ging bin ich mehr in C++ eingestiegen, hab ich davor ja nur etwas am Javascript gebastelt. Alleine programmieren ist ok. Gedankenaustausche oder gegenseitig nachfragen was so Sache ist, dient aber der zusätzlichen Unterhaltung und motiviert. (Damit ist nicht gemeint: Wie lange noch?) Zumindest sehe ich das so.

So, genug geplappert

@b1rdhous3
You might need another qt lib which wasn't installed. I noticed that also for the .deb package.
Regarding the webapp:
Yes, it is not a full configuration interface. But it would look very modern that way :)
It was a play around with Quasar and Vue. I had fun because the speed of results and debug possibility (with an additional Vue browser extension) is very enjoyable. Compared with pure Javascript or "simplicity extensions" like JQuery.

I copied the app to the hyperion-project server. But due to nginx settings it won't work, but i didn't contacted @RickDB. The solution is for sure very simple to adapt the settings for a vue app in a subfolder.
But the app was for the rework branch and it also needs a Qusasar update. They evolved alot during the year(s)
And i don't know how the current Android state is :)

All in all. The webapp was much more stable than my rework branch 😆 Probably i should start there :)

@RickDB
Copy link

RickDB commented Jun 23, 2019

With our new server nginx is running with kaltura modifications which can a bit shitty to deal with but know that @wolph wants to run vanilla nginx on it again at some point, can of course make any config changes if needed to it or add additional domains if you want as we have plenty of resources on it :)

@brindosch We did do some cleaning in the user rights area a while back (forum and github) for inactive admins, if you want to work on Hyperion again just let me know and will restore those 👍

@Paulchen-Panther
Copy link
Member Author

@brindosch Ich hätte mal eine frage bezüglich der HardwareLedCount Angabe in der config. Für was ist diese Angabe da? Es gibt doch schon ein LED Array in der Config. Warum dann noch mal dieser Wert?

@brindosch
Copy link
Contributor

Gerne, der hardwareLedCount wurde eingeführt um LED-Streifen die länger sind als nötig auf schwarz zu setzen (die LEDs die man nicht nutzen will). Das war von jemandem ein Anliegen und redPanther hat es so integriert. Über den Nutzen dieses sehr speziellen falls darf gestritten werden.
Ist der hardwareLedCount kleiner als der echte LED count wird es ignoriert.

@Paulchen-Panther
Copy link
Member Author

Viel Dank für die Erklärung. So ähnlich dachte ich mir das. Entweder hat es nie oder nur kurz funktioniert. Es verhält sich nämlich genau andersrum. Ist der Wert größer, schmiert Hyperion ab und ist der Wert kleiner oder gleich startet Hyperion.

@brindosch
Copy link
Contributor

brindosch commented Jun 26, 2019

Wo crasht es denn spezifisch? Hab im code nichts gesehen, aber läuft wahrscheinlich irgendwo über den vector index raus? In jedem Fall Hyperion::update() oder eine Initialisierung/settings update das iwas zerhaut

Edit: Könnte auch im einem LED Device passieren. Sollte der ledcolor vector größer sein als die ursprünglich angenommene Größe

PhilipsHue hatte auch so einen lustigen Fehler. Da hat man sich an der ledconfig entlang geloopt. Wenn die bridge weniger lampen zurück gab als die config, lief der halt ausm index hehe

@Paulchen-Panther
Copy link
Member Author

Paulchen-Panther commented Jun 26, 2019

Also wie gesagt, wenn die Anzahl der LEDs größer ist im hardwareLedCount chrasht es.
Hier mal die Fehlermeldung:

[hyperiond EFFECTFILES] 36 effects loaded from directory :/effects/
[hyperiond EFFECTFILES] 19 effect schemas loaded from directory :/effects/schema/
[hyperiond EFFECTFILES] 0 effects loaded from directory /home/paulchen/.hyperion/custom-effects
[hyperiond SettingsManager] Selected configuration file: /home/paulchen/.hyperion/config/hyperion_main.json
[hyperiond SettingsManager] SettingsManager.cpp:73:SettingsManager() Settings database initialized
[hyperiond BLACKBORDER] BlackBorderProcessor.cpp:65:handleSettingsUpdate() Set mode to: default
[hyperiond ComponentRegister] ComponentRegister.cpp:67:componentStateChanged() Blackborder detector: enabled
[hyperiond FLATBUFCONNECTION] Connecting to Hyperion: 127.0.0.1:19401
[hyperiond ComponentRegister] ComponentRegister.cpp:67:componentStateChanged() LED device: enabled
[hyperiond LEDDEVICE] latchTime(0) is bigger/equal rewriteTime(0)
[hyperiond LEDDEVICE] LedDevice 'fadecandy' configured.
[hyperiond ComponentRegister] ComponentRegister.cpp:67:componentStateChanged() Smoothing: enabled
[hyperiond EFFECTENGINE] run effect Rainbow swirl fast on channel 0
[hyperiond HYPERION] PriorityMuxer.cpp:153:registerInput() Register new input 'System/EFFECT' with priority 0 as inactive
[hyperiond HYPERION] Inital foreground effect 'Rainbow swirl fast' started
[hyperiond EFFECTENGINE] run effect Warm mood blobs on channel 254
[hyperiond HYPERION] PriorityMuxer.cpp:153:registerInput() Register new input 'System/EFFECT' with priority 254 as inactive
[hyperiond HYPERION] Inital background effect 'Warm mood blobs' started
[hyperiond HYPERION] PriorityMuxer.cpp:153:registerInput() Register new input 'System/GRABBER' with priority 250 as inactive
[hyperiond ComponentRegister] ComponentRegister.cpp:67:componentStateChanged() Framegrabber: enabled
[hyperiond BOBLIGHT] BoblightServer.cpp:24:BoblightServer() Instance created
[hyperiond DAEMON] Hyperion initialized
[hyperiond DAEMON] set screen capture device to 'x11'
[hyperiond X11GRABBER] Grabber.cpp:33:setVideoMode() Set videomode to 0
[hyperiond DAEMON] X11 grabber created
[hyperiond V4L2:auto] Grabber.cpp:33:setVideoMode() Set videomode to 0
[hyperiond V4L2:auto] Signal threshold set to: {12, 12, 12}
[hyperiond V4L2:auto] Signal detection is now disabled
[hyperiond V4L2:auto] Signal detection area set to: 0.250000,0.250000 x 0.750000,0.750000
[hyperiond DAEMON] hyperiond.cpp:412:handleSettingsUpdate() V4L2 grabber created
[hyperiond JSONSERVER] JsonServer.cpp:23:JsonServer() Created instance
[hyperiond JSONSERVER] Started on port 19444
[hyperiond MAIN] start systray
[hyperiond PROTOSERVER] Started on port 19445
[hyperiond FLATBUFSERVER] Started on port 19400
[hyperiond WEBSERVER] WebServer.cpp:96:handleSettingsUpdate() Set document root to: :/webconfig
[hyperiond WEBSERVER] Started on port 8090 name 'Hyperion Webserver'
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTcpSocket(0xf244e0), parent's thread is QThread(0xbd5620), current thread is QThread(0xf1fd30)
QObject: Cannot create children for a parent that is in a different thread.
(Parent is QTcpSocket(0xf244e0), parent's thread is QThread(0xbd5620), current thread is QThread(0xf1fd30)
[hyperiond X11GRABBER] Update of screen resolution: [0x0] to [1920x1080]
[hyperiond X11GRABBER] Using XRender for grabbing
[hyperiond X11GRABBER] Update output image resolution: [0x0] to [240x135]
[hyperiond X11GRABBER] Capture interface is now enabled
[hyperiond HYPERION] PriorityMuxer.cpp:231:setInputImage() Priority 250 is now active
[hyperiond HYPERION] PriorityMuxer.cpp:330:setCurrentTime() Set visible priority to 250
[hyperiond HYPERION] ImageToLedsMap.h:93:getMeanLedColor() ImageToLedsMap: colorsMap.size != ledColors.size -> 166 != 167
Qt has caught an exception thrown from an event handler. Throwing
exceptions from an event handler is not supported in Qt. You must
reimplement QApplication::notify() and catch all exceptions there.

[hyperiond MAIN] Hyperion aborted:
vector::_M_range_check: __n (which is 166) >= this->size() (which is 166)
[hyperiond FLATBUFSERVER] Stopped
[hyperiond PROTOSERVER] Stopped
[hyperiond WEBSERVER] Stopped Hyperion Webserver
[hyperiond V4L2:auto] GrabberWrapper.cpp:36:~GrabberWrapper() Close grabber: V4L2:auto
QObject::killTimer: Timers cannot be stopped from another thread
QObject::~QObject: Timers cannot be stopped from another thread
QSocketNotifier: Socket notifiers cannot be enabled or disabled from another thread
*** Error in `./hyperiond': double free or corruption (fasttop): 0x00007fd82c002e10 ***

Abgesehen davon gibt es auch eine Fehler im WebUI. Wenn der Device type geändert wurde und man startet Hyperion neu, wird immer "file" als type angezeigt. Also Fehler hat NG noch genug.

EDIT: Sehe auch gerade in deinem Branch "Rework" ist da auch noch eine Lücke.
https://github.com/brindosch/hyperion.ngBeta/blob/rework/libsrc/hyperion/Hyperion.cpp#L223
https://github.com/brindosch/hyperion.ngBeta/blob/rework/libsrc/hyperion/Hyperion.cpp#L256

@brindosch
Copy link
Contributor

Als wäre es erst gestern gewesen. Die Asserts hab ich rausgeworfen und gegen debug statements ersetzt. Da die Methoden nen void zurückgeben, geht ein return. Ich hab den Fehler entweder gefunden oder er ist noch da.
Hier der code: https://github.com/brindosch/hyperion.ngBeta/blob/rework/include/hyperion/ImageToLedsMap.h#L90
Achtung: Da sind 2 asserts drin.

Gut wäre es wohl du lässt dir in der Hyperion::update() mal die vector size(s) ausgeben, vielleicht sieht man da was komisches. Eventuell fehlt da ein vector update(), welches nicht auf die ImageToLeds übertragen wird

Was das file device angeht. Ich hab jetzt nichts gesehen was auf einen Fehler offenbart. Konntest du eingrenzen ob Hyperion die richtigen Daten liefert oder die ui Blödsinn macht?

Ich hab gesehen du hast das signal vom settingsManager auf config Änderung angezapft. In der API ist aber noch der reload drin. Fehlt noch was zur vollständigen live Anwendung der Einstellungen?

@Paulchen-Panther
Copy link
Member Author

Kann sein das du dich da vertan hast? im assert ist es == und im debug statment ist es != ???

@brindosch
Copy link
Contributor

ImageToLedsMap.h:93:getMeanLedColor()
Passt schon, ist eine visuelle Auswertung. Ich weiß, man ist immer wieder verblüfft, wenn man von C/++ mehr bekommt als Datensalat - man kennt es einfach nicht anders... :)

@Paulchen-Panther
Copy link
Member Author

Passt schon, ist eine visuelle Auswertung. Ich weiß, man ist immer wieder verblüfft, wenn man von C/++ mehr bekommt als Datensalat - man kennt es einfach nicht anders... :)

Verstehe ich nicht. Sorry.
Ich habe 166 Leds. (Siehe oben) Wenn ich 167 im hardwareLedCount angeben dann passiert folgendes:
Du vergleichst colorsMap (166) mit ledColors (167) auf Ungleichheit, gibst wenn beide werte ungleich sind ein debug log aus und kehrst mit einem return zurück. ?!?!?!?!?

@brindosch
Copy link
Contributor

Das ist natürlich nicht die Lösung, aber Hyperion läuft weiter und mit zusätzlichem debug findet man evtl die Lösung. Die Frage ist, tritt das einmal auf oder immer.
Da der debug output in meinem code noch drin ist, kann es kein dauerhaftes Problem gewesen sein (Sonst wäre das log ja immer zugespamt).

Ich wollte nur sagen, versuch den assert raus zu machen und so ggf besser das Problem einkreisen zu können.

@Paulchen-Panther
Copy link
Member Author

So, ich habe den Fehler gefunden.
In der Hyperion.cpp:534:update() wurde geschrieben das der "ledbuffer" vector wieder zurück gesetzt werden muss. Diese Vorgehensweise verstehe ich auch. Den Absturzt verursacht die "Color byte order schleife in Zeile 581", weil der ledbuffer vector im zweiten Durchgang NICHT zurück gesetzt wird. Es wird geprüft ob der _hwLedCount größer ist als der ledbuffer. Das ist er auch im ersten Durchlauf so, bis er in Zeile 610 angeglichen wird. Somit ist die Bedingung im zweite Durchlauf nicht mehr gegeben.

@brindosch
Copy link
Contributor

brindosch commented Jun 28, 2019

Glückwunsch, vielleicht wäre es sinnvoll, das komplett aus Hyperion::update zu werfen und im handleSettingsUpdate einmalig zu verarbeiten. Die loops dürfen aber nicht mit falschem ledCount laufen :)

Da die update() methode ständig aufgerufen wird, wäre das sogar eine kleine Verbesserung in der Leistung.
Was hältst du davon?
Edit: Smoothing, adjustments etc sollten allerdings ebenfalls gecapt werden. Ok, der Aufwand vielleicht größer als der Nutzen :)
Edit: Vielleicht das feature einfach nur edge edge edge case und sollte ...

SJunkies pushed a commit to SJunkies/hyperion.ng that referenced this pull request Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants