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.

Tornado (webserver with WebSocket)

Questions and comments specific to a particular plugin should go here.
m19brandon
Experienced User
Posts: 177
Joined: Mon Feb 03, 2014 10:36 pm

Re: Tornado (webserver with WebSocket)

Post by m19brandon »

Pako, is the only change with 2.0 support for WebP?

Thanks,
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

m19brandon wrote:Pako, is the only change with 0.2 support for WebP?
Thanks,
Yes.
Pako
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Tornado (webserver with WebSocket)

Post by Sem;colon »

Hi everyone,

I just now tested the tornado plugin (I wanted to do that for months now, but I haven't found the time)
Besides some first difficulties, I finally managed to get it running - and it's awesome!

Anyway, my question is: Does somebody manage to get rid of this "it works!" page?
I don't want to type "ipToServer/index.html" to actually enter the site.

Thank you in advance!
If you like my work, Image me a drink :wink:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

Hi Sem;colon!
I was confused by your response to the Tornado plugin.
It seemed that you completely ignore it.
Sem;colon wrote:Hi everyone,
I think you could easily appeal directly to me.
It is very unlikely that someone else will respond.
Sem;colon wrote:I just now tested the tornado plugin (I wanted to do that for months now, but I haven't found the time)
Well, you did not have time.
Sem;colon wrote:Besides some first difficulties, I finally managed to get it running - and it's awesome!
I'm very pleased that you are so excited.
Sem;colon wrote:Anyway, my question is: Does somebody manage to get rid of this "it works!" page?
I don't want to type "ipToServer/index.html" to actually enter the site.
I'm sorry, that does not suit you, "It works !" page.
Well, I can add the optional parameter "Default document".
If it is filled, then just this one document will be open instead of "It works!".
It will be okay this way?

Pako
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

New version (0.3) released.
New:
  • "Default document:" optional parameter added
Pako
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Tornado (webserver with WebSocket)

Post by Sem;colon »

Hi Pako!
Pako wrote:I think you could easily appeal directly to me.
It is very unlikely that someone else will respond.
True, but I still wanted to give them the chance ;)
Pako wrote: Well, I can add the optional parameter "Default document".
If it is filled, then just this one document will be open instead of "It works!".
It will be okay this way?
That's exactly what I had in mind :D
Thank you, I'm sure others will appreciate this as well!

I spent the day yesterday trying to replace the webserver plugin in my config with the tornado plugin - but it wasn't successful, my web interface in quite complex and has lots of dependencies. It seems that some things are not working that worked with the webserver plugin (I don't get any errors, it's just not working) e.g. $.get() seems to not work at all.(jQuery v1.10.2)
The Tornado webserver also stops responding while loading the page. After all, the webserver plugin seems to be more stable...
If you like my work, Image me a drink :wink:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

Sem;colon wrote:It seems that some things are not working that worked with the webserver plugin (I don't get any errors, it's just not working) e.g. $.get() seems to not work at all.(jQuery v1.10.2)
Yes, it is more than likely that some query options are not functional.
It was impossible for me to try everything.
Can you please attach some files (as small as possible), so I could try dysfunctional query options?
I suppose it will be easy to fix the problem.
Sem;colon wrote:The Tornado webserver also stops responding while loading the page.
In this case, I'm not sure whether it will be possible to repair it.
You can also provide a concrete example, so that I might test?


EDIT:
It seems that I found the problem.
Can you please test the GET method?
Test version 0.3a attached.


Thanks, Pako
Attachments
__init__.py
(124.03 KiB) Downloaded 165 times
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Tornado (webserver with WebSocket)

Post by Sem;colon »

Pako wrote: Can you please attach some files (as small as possible), so I could try dysfunctional query options?
I suppose it will be easy to fix the problem.
Attached!
Pako wrote: In this case, I'm not sure whether it will be possible to repair it.
You can also provide a concrete example, so that I might test?
Not yet, I don't know where it stops working - I need to do more testing (it's not easy to debug this...)
Pako wrote: It seems that I found the problem.
Can you please test the GET method?
Test version 0.3a attached.
At least with this version $.get() seems to work with .html suffixed files (I didn't test that with version 0.3! Maybe it was working there as well)
I my case I have a file that's .json suffixed, here $.get() still isn't working. (the .json is not a most, but I was using it this way with the webserver plugin)

I attached some simple files with witch you can check that.
Attachments
test.zip
(32.33 KiB) Downloaded 150 times
If you like my work, Image me a drink :wink:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

Sem;colon wrote:I my case I have a file that's .json suffixed, here $.get() still isn't working.
So it was easy.
That was enough to add extension ".json" to mimetypes.

Pako
Attachments
__init__.py
Test version 0.3b
(124.18 KiB) Downloaded 183 times
Sem;colon
Plugin Developer
Posts: 625
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Tornado (webserver with WebSocket)

Post by Sem;colon »

ah, ok, thx!
...Then you should maybe add .htm as well, as this is a very common suffix - or make the mimetypes configurable.
If you like my work, Image me a drink :wink:
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

Sem;colon wrote:Then you should maybe add .htm as well
It's already there.
I checked it out.
Check is easy:
1) Open the PyCrust window (Python Shell)
2) Write the commands tp = eg.plugins.Tornado.plugin and em = tp.extensions_map
3) Now you can type print em or print ".htm" in em etc.

Pako
Fritte
Posts: 9
Joined: Sun Dec 29, 2013 7:29 pm

Re: Tornado (webserver with WebSocket)

Post by Fritte »

For some reasons I can't get the sliders to work correctly in chrome or stock browsers on my android devices. It does work perfectly in Dolphin browser thou.
If I use chrome or the stock browser the slider moves but no event is sent to EG. But if I manage to press just above or beneath the slider it registers and send a event to EG.
Do you have any idea what can cause this?
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

Unfortunately, I do not know what to do with it.
I have the best experience with UC Browser.

Pako
m19brandon
Experienced User
Posts: 177
Joined: Mon Feb 03, 2014 10:36 pm

Re: Tornado (webserver with WebSocket)

Post by m19brandon »

m19brandon wrote:With the Send Event to Another Eventghost server can I added a payload? I do not see it in the py either.

Thanks,
Pako, can this be done. I'm parsing the event currently but would prefer a payload. I'm sending longer search queries.

Thanks,
User avatar
Pako
Plugin Developer
Posts: 2294
Joined: Sat Nov 11, 2006 1:31 pm
Location: Czech Republic
Contact:

Re: Tornado (webserver with WebSocket)

Post by Pako »

New version (0.4) released.
News:
  • first version for release r1669 and later (no need to install libraries)
  • Common handler: get method fixed
  • mimetype >>> '.json': 'application/json' <<< added
Pako
Post Reply