BradyBrenot / huestacean

Philips Hue control app for desktop with screen syncing. C++ with Qt Quick GUI.
http://huestacean.com
Apache License 2.0
564 stars 54 forks source link

Forked to use local server, minimize at launch, show a task icon #141

Open sohsatoh opened 4 years ago

sohsatoh commented 4 years ago

Hi, actually this should not be posted here, but I have created the forked version. It contains the following changes.

https://github.com/sohsatoh/huestacean

UniCizin commented 4 years ago

what benefits do i get from a local server?

(i tried to compile it, but get the error " Could not find a package configuration file provided by "Qt5HttpServer" with any of the following names:

Qt5HttpServerConfig.cmake
qt5httpserver-config.cmake")
reefland commented 4 years ago

I got around this cmake issue above by installing package qthttpserver-git from AUR (Arch) https://github.com/qt-labs/qthttpserver with that build steps completes, but then make fails with a reference to framegrabber->setMipLevel() ... no member named 'setMipLevel'

bobi1024 commented 4 years ago

Little late to the party but better late than never.

I see the benefits and I was looking for something like this, since the program has no CLI interface, it is harder to be automated.

As @reefland mentioned though, there is an error during the make process.

huestacean.cpp: In member function ‘void Huestacean::runSync(EntertainmentGroup*)’: huestacean.cpp:629:19: error: ‘using element_type = class SL::Screen_Capture::IScreenCaptureManager’ {aka ‘class SL::Screen_Capture::IScreenCaptureManager’} has no member named ‘setMipLevel’ 629 | framegrabber->setMipLevel(static_cast<int>(std::min(log2(monitors[activeMonitorIndex]->width / WidthBuckets), log2(monitors[activeMonitorIndex]->height / HeightBuckets))));

I've managed to track down the error to a missing lines of code in the _'screen_capturelite' directory.

May be something went bizarre during the fork IDK, I guess @sohsatoh could take a look.

Workaround: Copy the 'screen_capture_lite' directory from the original 2.6 branch replacing the one in the 2.6f one, and then run cmake and make respectively.

reefland commented 3 years ago

@bobi1024 - Thanks for the tip. Got it to compile and work using the traditional start sync button. But the qthttpserver integration doesn't seem right. It defaults to port 0. I change it to something like 8989 click [Save Port] and get a segment fault:

qrc:/qml:Screensync.qml:150: Reference: i is not defined
qrc:/qml:Screensync.qml:149: Reference: i is not defined
qml: activeFocusItem QQucikTextField(0x55c8ee49b890)
qml: activeFocusItem Button_QMLTYPE (0x55c8ee49b890)
Segmentation fault (core dumped)

The port number is actually saved in the Huestacean.conf file, but upon manually restarting still shows port 0.

And I still get this:

$ wget localhost:8989/start
--2020-07-21 19:16:28--  http://localhost:8989/start
Resolving localhost (localhost)... 127.0.0.1
Connecting to localhost (localhost)|127.0.0.1|:8989... failed: Connection refused.

QT HTTP Server is built:

$ ls -l /usr/lib/x86_64-linux-gnu/libQt5HttpServer.*
-rw-r--r-- 1 root root     750 Jul 20 15:38 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.la
-rw-r--r-- 1 root root    1226 Jul 20 15:38 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.prl
lrwxrwxrwx 1 root root      26 Jul 20 15:38 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.so -> libQt5HttpServer.so.5.12.0
lrwxrwxrwx 1 root root      26 Jul 20 15:38 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.so.5 -> libQt5HttpServer.so.5.12.0
lrwxrwxrwx 1 root root      26 Jul 20 15:38 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.so.5.12 -> libQt5HttpServer.so.5.12.0
-rwxr-xr-x 1 root root 6597184 Jul 20 15:33 /usr/lib/x86_64-linux-gnu/libQt5HttpServer.so.5.12.0

Did you have to do anything special here to get the httpserver working?

sohsatoh commented 3 years ago

Sorry for the late reply. I'm not so familiar with C++, so there might be some shit code on my fork. I will look into it when I have plenty of time.

sohsatoh commented 3 years ago

Hi! I have just updated some codes, and uploaded the latest release which contains necessary frameworks.

reefland commented 3 years ago

@sohsatoh - great! will give it a try shortly. And thanks for enabling issues on your page.