Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

QT4 and Eventghost = Crashes

If you have a question or need help, this is the place to be.
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

kgschlosser wrote:and i am correct in saying that python is loading from a zip, it's using it as an image file
Ok, I had a look at this zip, too. But I do not think that there is any reason other than keeping the folder "clean" and maybe also preventing users from easily messing with it. This approach is still sort of exotic!

BTW: Thanks again for your help :) :)

But how to get around the crash when you say that the console itself CAN use QT but when using it in Eventghost it does no longer work...?

It's really driving me nuts that QT can't be used right away within this scenario...
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

life would be boring if it wasn't filled with adversity
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

what i did was

Code: Select all


import sys
sys.path += ['C:\\Program Files (x86)\\EventGhost\\Lib\\site-packages']

import PyQT4

i pointed the python system right to the folder where Qt4 is then imported

i was doing this from the py.exe located in the EG folder
If you like the work I have been doing then feel free to Image
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

OH yeah on the linkshell thing. i saw the link but didn't click it and didn't really process what i read i guess

LOL
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

kgschlosser wrote:what i did was

Code: Select all


import sys
sys.path += ['C:\\Program Files (x86)\\EventGhost\\Lib\\site-packages']

import PyQT4

i pointed the python system right to the folder where Qt4 is then imported

i was doing this from the py.exe located in the EG folder
Well this was how far I already came before posting this thread ;)

However the question now remains how to get it working inside Eventghost from an action?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: QT4 and Eventghost = Crashes

Post by jonib »

Just a thought but maybe PyQT4 and wxPython (that EventGhost uses) are not able to work at the same time in the same application.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

jonib wrote:Just a thought but maybe PyQT4 and wxPython (that EventGhost uses) are not able to work at the same time in the same application.

jonib
Hmmm, and why would that be so?
jonib
Plugin Developer
Posts: 1328
Joined: Thu Mar 26, 2009 9:33 pm
Location: Sweden

Re: QT4 and Eventghost = Crashes

Post by jonib »

masterjoe wrote:Hmmm, and why would that be so?
Well both are GUI frameworks that control windows and the controls in them, so maybe they are not designed to share that function.

I have no specific knowledge that there would be a problem, it is just an idea that might be the case.

Edit: Doing a search I only found this: Can wxpython and PyQt be used together in same GUI?

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

jonib wrote:
masterjoe wrote:Hmmm, and why would that be so?
Well both are GUI frameworks that control windows and the controls in them, so maybe they are not designed to share that function.

I have no specific knowledge that there would be a problem, it is just an idea that might be the case.

Edit: Doing a search I only found this: Can wxpython and PyQt be used together in same GUI?

jonib
Thanks, jonibm however the topic you found there is about using QT and wx TOGETHER in ONE dialog. That is not possible for sure. But what I really do is use QT and wx individually. I do not mix controls from one library with the other (yes, THAT is impossible). And my tests work well with Python standalone.

While there is no good reason why the two libraries should interfere it could still be true that they do not like each other for whatever reason. The problem however is that Eventghosts GUI needs wx so removing it will not be a solution at all.

Damn... what can be done to make QT work in this scenario?? I wanted to replace the OSD functionality by something much more flexible and therefore made my own widgets in QT.

I am currently thinking about not using Eventghost at all and porting the EG plugins that I need for my own Event Processor... Because the way it is currently Eventghost becomes more and more obsolete while my (rather huge) plugin does most work and it can even do some things a lot better than Eventghost itself. ATM I want them to work together...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: QT4 and Eventghost = Crashes

Post by krambriw »

Why don't you consider using EG as a kind of server and your QT for the GUI part. Exchange messages between them using MQTT.
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

krambriw wrote:Why don't you consider using EG as a kind of server and your QT for the GUI part. Exchange messages between them using MQTT.
Sure - that would be one way of solving this issue and I was already thinking in this direction for a second. But it feels like some undesired complexity just for displaying my widgets.
Well - maybe it is the quickest approach but porting some EG plugins for my Event Processor is not too much work either and then I do not need EG at all.

Hmm... :?:
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

i designed a whole menu system for my home automation. i have a central EG that runs everything and i have computers attached to each TV and if a button is pressed on a remote to bring up a system menu it sends the call to the EG server the server then sends the menu data to the computer for that TV and it also has EG running on it. and the menu is then displayed as an overlay on that screen and the remote controls the menu

it's nothing crazy fancy but it allows for variable data to be show, so like the state of devices and things of that nature, turning lights on and off and dim them

i converted everything over to xAP i wrote a plugin for it at the request of a user and i really liked the fact i can now have everything set up dynamically for IIP addresses because it broadcasts the messages

which is really nice if you have a whole tone of things going on at the same time like i do. makes it nice to be able to pull up information from say a touch screen about a different room then the one you are in without having to make a specific call for it. for things like what music is playing other things a call would have to be made but it's easier this way for my setup and the xAP protocol has almost no footprint to speak of
If you like the work I have been doing then feel free to Image
masterjoe
Posts: 20
Joined: Thu Oct 15, 2015 11:20 am

Re: QT4 and Eventghost = Crashes

Post by masterjoe »

I also designed my own home automation system ;) And this is now the second iteration which is dramatically more potent than the previous one. But my approach is different because I only have ONE central PC which controls everything and multiple displays, USB speakers, USB mirophones, sensors and some other devices which are used for I/O. Also my system can be controlled from simple and cheap IR remotes alone which can be used in every room. It allows non-visual interaction which is also supported by TTS. I also control my light with it.

My central part is now something I call "Eventmagic" which is almost a full replacement for Eventghost but works cascaded and multi level so that overlapping event chains and multiple simultaneous clients are much easier to do than within EG. My system has a completly different approach for how event-based scenarios are defined. The core of Eventmagic is > 15.000 LOC pure Python so it has become rather large and there is also an EG plugin which allows full integration with EG. Although EM controls most parts of EG so that I was thinking about getting rid of EG at some point in the future. The only thing that I still use are some plugins from EG but they could be ported to EM easily.

The QT based GUI system now is the final step and is used for multiple I/O applications for data visualization - similar to what you are describing. However my EM core is the most important part of the system and provides a huge amount of functionality which can either be purely data driven or fully program code driven and anything in between.

My system does data replication via UDP (TCP planned for future WAN support) and also communicates with some external hardware which delivers input data. I have a feature complete API integration for JRiver MC and also a fully programmable SIP client which can be used as telephone in any room having your hands free. CardDAV / CalDAV apps are integrated with alarm functionality and the data is also used for the phone.

My system can learn new remotes with an integrated interactive learn function, record and play macros and much more. I am currently in the final stages for this iteration and have already replaced many previously used EG plugins with Eventmagic equivalents. Sooner or later EG will become obsolete and the good thing is that I can run Eventmagic on almost any device like e.g. my Synology with nearly all features, too :)

I think I will go for the dedicated widget server for the moment. But I plan to integrate something similar directly in EM later. When EG is out of the way then Python 3.x would also be no problem which opens up new possibilities. Currently I am sort of bound to Python 2.6 due to EG...
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: QT4 and Eventghost = Crashes

Post by krambriw »

Sooner or later EG will become obsolete
That might happen...I am myself already half way leaning towards Node-RED since my main focus & interest is anyway automation and not entertainment systems. There is of course an advantage with a community & open source project like this, there are many forces working on various parts and you have a long term maintenance. Besides, if an original author leaves for whatever reason, there are others that can carry on the work.

To what I understand, you are so far all alone and that is not always the best situation even if it gives you full control. Unless you decide for an open source project and release your solution on git hub or similar I guess your situation will be just like this. But if it is good, it may attract other users.

Best regards, Walter
User avatar
kgschlosser
Site Admin
Posts: 5190
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: QT4 and Eventghost = Crashes

Post by kgschlosser »

we almost have identical systems in that i have the same thing with the remotes, but mine might one up ya in the remote department. i can carry a remote from room to room and it will control all the devices in that room without the press of a single button to notify the system that i changed rooms.

i hacked the IR codes on the remote so i am able to use all 336 buttons if i wanted. one for all remote 20 dollars.

has 42 buttons * 4 devices * 2 (the last 2 is because i can shift all the buttons) i also changed the IR codes to a sony 15 style code so i can pump out a remote press every 45 milliseconds

nice for guide surfing or turning the volume down

5 TV all running mediaportal (modified version of) with thousands of movies and thousands of video games, photos, MP3s, all the radio stations in the state i live streamed from the net but act like a radio station to media portal PVR server with network attached tv tuners

the on screen menu system with every action i could perform on every device in the house.

in the process of consolidating the computers into a single chassis (except server)

server is 2 raid 6 arrays totaling 16 TB storage with 2 intel iop 1.2ghz controllers running the hard drives, another 4 drive striped array 32 gig SSD's 8 core amd 3.2ghz 64 gigs ram
5000 VA 4000 watt APC battery backup (modified kevin style) will now support the load i have on it for almost 2 days and i have my sump pumps various lights throught the home as well as all the computers
APC step down for the battery backup
4 2000 amp batteries for the battery backup
cisco vpn router

and the 5 htpc vary in components

i am running out of room tho so i am putting 4 of the 5 htpc's into a single chassis where i will be able to slide the whole computer essentially out as one piece and have it occupy the space of 8U for all 4 machines with full height dual slot video cards HDD's BD drives and power supplies.

ring my doorbell it's mutes all active audio and pauses any active video. and pops up the camera on all active TV's of the front door

i have geofencing set up to control aspects of the home.

every light in the home is automated
hot tub
HVAC
security
and i am sure i am forgetting a whole lot

here are some photos of what i have going on. some of the photos are during the construction.
IMG_0114.JPG
IMG_0083.JPG
IMG_0069.JPG
i have done every aspect of this system to this home, including all of the construction and structured wiring. also redid the whole heating system as well as most of the electrical.
If you like the work I have been doing then feel free to Image
Post Reply