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.
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.
HTTP explorer
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
HTTP explorer
I created a new plugin.
You can download it here.
This is something like OSE, but the menu is displayed in a web browser.
I do not know whether it has any practical use (perhaps smart phones), but for me it was a nice introduction to the slightly different things.
I expect, that you will send me your ideas for improvements.
But I can not promise you that I will be able (or willing) to implement all the ideas.
--
Pako
You can download it here.
This is something like OSE, but the menu is displayed in a web browser.
I do not know whether it has any practical use (perhaps smart phones), but for me it was a nice introduction to the slightly different things.
I expect, that you will send me your ideas for improvements.
But I can not promise you that I will be able (or willing) to implement all the ideas.
--
Pako
Re: HTTP explorer
Hi Pako,
First of all, thank you very much for yet another very interesting plugin!!!!
I am playing around with this for a bit, as I am trying to find out if I can use this for selecting and adding music files to the playlist of my Logitech squeezebox.
The squeezebox takes its music from a Qnap NAS on my own LAN.
During the testing, I have enabled your plugin in Eventghost on my laptop locally. I created a new http server in your plugin, which I named muzica.
And sure enough, the music directory listing showed up in my webbrowser, when I pointed to 127.0.0.1:8080.
After fiddling around with file naming conventions in my Python script in EG, I was able to extract the path file from the event of your plugin and use it to start playing the song via my squeezebox. This is great! (for information: the squeezebox already has an 'out of the box webbased control interface', but that is a bit slow and it needs periodic refreshing, which does not look nice).
It would be nice if it was possible to select folder paths (currently, I think it is only possible to create an event when an individual file is clicked, correct?). This way, I could add an entire folder (=music album) to the current playlist at once.
I am not sure if this could be done, but it would be nice.
I have encountered a problem when the webpage went blank after a while of being idle It did not want to do anything more, until I stopped and restarted the HTTP server. The error message was as follows:
EDIT: It may be caused by opening a selected link in another tab. Is the server capable of using several tabs in a webbrowser at once?
16:29:17 ----------------------------------------
16:29:17 Exception happened during processing of request from ('127.0.0.1', 55139)
16:29:17 Traceback (most recent call last):
16:29:17 File "SocketServer.pyc", line 281, in _handle_request_noblock
16:29:17 File "SocketServer.pyc", line 307, in process_request
16:29:17 File "SocketServer.pyc", line 320, in finish_request
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 350, in __init__
16:29:17 server
16:29:17 File "SocketServer.pyc", line 615, in __init__
16:29:17 File "BaseHTTPServer.pyc", line 329, in handle
16:29:17 File "BaseHTTPServer.pyc", line 323, in handle_one_request
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 374, in do_GET
16:29:17 self.do_everything()
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 394, in do_everything
16:29:17 browser.GoTo(self.path[5:-5])
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 321, in GoTo
16:29:17 itm = self.ds[int(ix)]
16:29:17 IndexError: list index out of range
16:29:17 ----------------------------------------
Another question: does this interfere in a negative way with the original webserver within Eventghost?
Thanks again and best regards,
Perry
First of all, thank you very much for yet another very interesting plugin!!!!
I am playing around with this for a bit, as I am trying to find out if I can use this for selecting and adding music files to the playlist of my Logitech squeezebox.
The squeezebox takes its music from a Qnap NAS on my own LAN.
During the testing, I have enabled your plugin in Eventghost on my laptop locally. I created a new http server in your plugin, which I named muzica.
And sure enough, the music directory listing showed up in my webbrowser, when I pointed to 127.0.0.1:8080.
After fiddling around with file naming conventions in my Python script in EG, I was able to extract the path file from the event of your plugin and use it to start playing the song via my squeezebox. This is great! (for information: the squeezebox already has an 'out of the box webbased control interface', but that is a bit slow and it needs periodic refreshing, which does not look nice).
It would be nice if it was possible to select folder paths (currently, I think it is only possible to create an event when an individual file is clicked, correct?). This way, I could add an entire folder (=music album) to the current playlist at once.
I am not sure if this could be done, but it would be nice.
I have encountered a problem when the webpage went blank after a while of being idle It did not want to do anything more, until I stopped and restarted the HTTP server. The error message was as follows:
EDIT: It may be caused by opening a selected link in another tab. Is the server capable of using several tabs in a webbrowser at once?
16:29:17 ----------------------------------------
16:29:17 Exception happened during processing of request from ('127.0.0.1', 55139)
16:29:17 Traceback (most recent call last):
16:29:17 File "SocketServer.pyc", line 281, in _handle_request_noblock
16:29:17 File "SocketServer.pyc", line 307, in process_request
16:29:17 File "SocketServer.pyc", line 320, in finish_request
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 350, in __init__
16:29:17 server
16:29:17 File "SocketServer.pyc", line 615, in __init__
16:29:17 File "BaseHTTPServer.pyc", line 329, in handle
16:29:17 File "BaseHTTPServer.pyc", line 323, in handle_one_request
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 374, in do_GET
16:29:17 self.do_everything()
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 394, in do_everything
16:29:17 browser.GoTo(self.path[5:-5])
16:29:17 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 321, in GoTo
16:29:17 itm = self.ds[int(ix)]
16:29:17 IndexError: list index out of range
16:29:17 ----------------------------------------
Another question: does this interfere in a negative way with the original webserver within Eventghost?
Thanks again and best regards,
Perry
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
Thanks for the first response.
1. It is currently not possible to use a folder as an event payload, but I am thinking about it.
2. It is not possible to connect to a single server multiple times (for example, from different device, or from different tab). If you need it, you have to create another server (on a different port). Each server has its own virtual browser that allows you to browse PC. The browser remembers the folder in which it is located. Therefore it is not possible. Otherwise, it would have to do a lot more complicated.
3. This plugin has nothing to do with the current Webserver plugin. There should be no interference.
Pako
1. It is currently not possible to use a folder as an event payload, but I am thinking about it.
2. It is not possible to connect to a single server multiple times (for example, from different device, or from different tab). If you need it, you have to create another server (on a different port). Each server has its own virtual browser that allows you to browse PC. The browser remembers the folder in which it is located. Therefore it is not possible. Otherwise, it would have to do a lot more complicated.
3. This plugin has nothing to do with the current Webserver plugin. There should be no interference.
Pako
Re: HTTP explorer
points 1 and 2 relate to the same problem for me when selecting music.
My music is in folders by artist and then the songs are in folders per Album.
This means that, to select a song, I have to go multiple levels down, select the song and then go multiple levels up again to find another song to add.
I tried to make the process a bit faster by opening links in other tabs, but like you said this does not work.
If it were possible to select folders, this saves a bit of time, as I would not have to drill all the way down to the songs themselves (I found out how to select the folder a song is in by using some Python scripting. But for this, I still have to be inside the folder at song level).
BTW: I really like your choice of colours and size and font of the directory and song listing. Very clear and large. It looks like this would also work nicely on a tablet or even phone (have not tried these yet).
Best regards,
Perry
My music is in folders by artist and then the songs are in folders per Album.
This means that, to select a song, I have to go multiple levels down, select the song and then go multiple levels up again to find another song to add.
I tried to make the process a bit faster by opening links in other tabs, but like you said this does not work.
If it were possible to select folders, this saves a bit of time, as I would not have to drill all the way down to the songs themselves (I found out how to select the folder a song is in by using some Python scripting. But for this, I still have to be inside the folder at song level).
BTW: I really like your choice of colours and size and font of the directory and song listing. Very clear and large. It looks like this would also work nicely on a tablet or even phone (have not tried these yet).
Best regards,
Perry
Re: HTTP explorer
Pako,
As always, awesome plugin. Thank you!
I only played with it a little, but a couple of things:
1. Border Colour
I changed the Border Colour in Settings window, but border color stays black. Is it just me?
2. Suggestion to Add Action
If you are interested, it would be nice to have buttons next file names. For example, "OPEN", "DELETE"...
Thanks again.
As always, awesome plugin. Thank you!
I only played with it a little, but a couple of things:
1. Border Colour
I changed the Border Colour in Settings window, but border color stays black. Is it just me?
2. Suggestion to Add Action
If you are interested, it would be nice to have buttons next file names. For example, "OPEN", "DELETE"...
Thanks again.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: HTTP explorer
Dear Pako,
Tried it and it basically works fine but I saw one problem in my setup. See the log below
1) the http server starts correctly
2) I go to configure the plugin, then I get the errors below
Another question, in the browser when selecting a picture as in my example, an event is created in EG. Is something else suppose to happen, like picture being opened in separate tab of browser or similar or is it just the event in EG that should happen?
My best regards, Walter
Tried it and it basically works fine but I saw one problem in my setup. See the log below
1) the http server starts correctly
2) I go to configure the plugin, then I get the errors below
Code: Select all
08:58:48 HTTP server "MyPictures" started on host 0.0.0.0:8282
08:58:52 Traceback (most recent call last) (1544):
08:58:52 File "C:\Program Files\EventGhost\eg\Classes\TaskletDialog.py", line 59, in ProcessingTask
08:58:52 self.Configure(*args, **kwargs)
08:58:52 File "C:\Program Files\EventGhost\eg\Classes\ConfigDialog.py", line 165, in Configure
08:58:52 treeItem.Configure(*args)
08:58:52 File "C:\Program Files\EventGhost\eg\Classes\ActionItem.py", line 101, in Configure
08:58:52 return self.executable.Configure(*args)
08:58:52 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 1221, in Configure
08:58:52 serverListCtrl.InsertStringItem(0, maxStr([item.args[0] for item in servActions]))
08:58:52 IndexError: tuple index out of rangeMy best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
Thank you, it's nice to "hear".kalia wrote:Pako,
As always, awesome plugin. Thank you!
Thank you for the warning. You can download the new version in which the bug is fixed.kalia wrote:I only played with it a little, but a couple of things:
1. Border Colour
I changed the Border Colour in Settings window, but border color stays black. Is it just me?
There are also added option to select the font size and width of the border.
Attention! You have to open and resave the configuration dialogs of all "Start server" actions. Otherwise it will not work correctly.
Yes, this solution I was already thinking (especially in connection with folders). But I'm afraid the "DELETE" command, it's too dangerous.kalia wrote:2. Suggestion to Add Action
If you are interested, it would be nice to have buttons next file names. For example, "OPEN", "DELETE"...
Thanks again.
Yet I do not know how to handle it. I will return to this issue later. Now I'm working on HTTPmenu plugin.
I can not seem to evoke the same problem. You can attach your configuration file?krambriw wrote:Tried it and it basically works fine but I saw one problem in my setup. See the log below
1) the http server starts correctly
2) I go to configure the plugin, then I get the errors below
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: HTTP explorer
Dear Pako, attached as requested. I realize it is not tested with newest version of EG, I did not expect this was needed.
Best regards, Walter
EDIT: Now tested with latest version of EG (1582), problem is the same
Also, if I issue "Stop all HTTP servers" and then "Start all enabled HTTP servers" I get the following error:
Best regards, Walter
EDIT: Now tested with latest version of EG (1582), problem is the same
Also, if I issue "Stop all HTTP servers" and then "Start all enabled HTTP servers" I get the following error:
Code: Select all
14:05:31 Traceback (most recent call last) (1544):
14:05:31 File "C:\Program Files\EventGhost\eg\Classes\ActionBase.py", line 170, in CallWrapper
14:05:31 return self(*args)
14:05:31 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 1045, in __call__
14:05:31 self.plugin.StartAllServers()
14:05:31 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 1091, in StartAllServers
14:05:31 self.StartServer(*args)
14:05:31 TypeError: StartServer() takes exactly 20 arguments (1 given)My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
Dear Walter !
1. I found the cause.
The strange behavior caused by unused action "Start HTTP server" that has not been configured
(I've progressed somewhat unusual in programming).
I will try in some way to treat such cases.
As a workaround you can (yet) this action either delete or configure.
2. Please do not place the action into Autostart folder.
Instead, use a solution similar to the following picture:Pako
1. I found the cause.
The strange behavior caused by unused action "Start HTTP server" that has not been configured
(I've progressed somewhat unusual in programming).
I will try in some way to treat such cases.
As a workaround you can (yet) this action either delete or configure.
2. Please do not place the action into Autostart folder.
Instead, use a solution similar to the following picture:Pako
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
Available corrected version.
Now is not a problem, though (in your tree) is there any unconfigured action "Start server".
BTW - I've had almost completed a new plugin "HTTP menu", which works in a similar way. Now, I have yet to test.
Pako
Now is not a problem, though (in your tree) is there any unconfigured action "Start server".
BTW - I've had almost completed a new plugin "HTTP menu", which works in a similar way. Now, I have yet to test.
Pako
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: HTTP explorer
Great Pako, very good, I will test during weekend.
Wish you a very nice weekend,
Walter
Wish you a very nice weekend,
Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: HTTP explorer
Dear Pako,
I cannot see any of the previous problems anymore, I think they are fixed.
Just another observation. Do as follows:
1) start a server
2) start a browser to it and navigate to different paths
3) Leave the browser at any path
4) stop and start the server again without closing the browser
5) go back to browser and try navigate
In EG you get the below error messages (obviously because the browser lost connection). To make it work again. you have to do a refresh in the browser so that it connects again.
Do you think it could be possible to make a re-connection between browser and server Parent.html to happen automatically instead of creating error messages?
Best regards, Walter
I cannot see any of the previous problems anymore, I think they are fixed.
Just another observation. Do as follows:
1) start a server
2) start a browser to it and navigate to different paths
3) Leave the browser at any path
4) stop and start the server again without closing the browser
5) go back to browser and try navigate
In EG you get the below error messages (obviously because the browser lost connection). To make it work again. you have to do a refresh in the browser so that it connects again.
Do you think it could be possible to make a re-connection between browser and server Parent.html to happen automatically instead of creating error messages?
Best regards, Walter
Code: Select all
09:19:55 ----------------------------------------
09:19:55 Exception happened during processing of request from ('127.0.0.1', 62421)
09:19:55 Traceback (most recent call last):
09:19:55 File "SocketServer.pyc", line 281, in _handle_request_noblock
09:19:55 File "SocketServer.pyc", line 307, in process_request
09:19:55 File "SocketServer.pyc", line 320, in finish_request
09:19:55 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 356, in __init__
09:19:55 server
09:19:55 File "SocketServer.pyc", line 615, in __init__
09:19:55 File "BaseHTTPServer.pyc", line 329, in handle
09:19:55 File "BaseHTTPServer.pyc", line 323, in handle_one_request
09:19:55 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 380, in do_GET
09:19:55 self.do_everything()
09:19:55 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 402, in do_everything
09:19:55 browser.Execute(int(self.path[5:-5]))
09:19:55 File "C:\Program Files\EventGhost\plugins\HTTPExplorer\__init__.py", line 336, in Execute
09:19:55 itm = self.fs[int(ix)]
09:19:55 AttributeError: 'Browser' object has no attribute 'fs'
09:19:55 ----------------------------------------
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: HTTP explorer
I am very interested in your menu solution, Pako.kalia wrote:2. Suggestion to Add Action
If you are interested, it would be nice to have buttons next file names. For example, "OPEN", "DELETE"...
Thanks again.
Do you think it will be possible to add one or, preferably, more permanent hyperlinks to the http explorer page? This would allow someone to go from several folder levels deep to jump back to the top level immediately.
Another solution could be to have multiple 'jump levels up' instead of the current 'one folder up'. Especially in my case of music selection, where the main tree consists of artist folders, then album folders, then individual songs, two jumps up with one mouse press would be convenient.
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
Yes, I agree. I have to make it much more robust.krambriw wrote:Do you think it could be possible to make a re-connection between browser and server Parent.html to happen automatically instead of creating error messages?
But that means I'll have to do a fairly large code modifications.
Yes, these are options, of which I had previously thought.piert wrote:Do you think it will be possible to add one or, preferably, more permanent hyperlinks to the http explorer page? This would allow someone to go from several folder levels deep to jump back to the top level immediately.
Another solution could be to have multiple 'jump levels up' instead of the current 'one folder up'. Especially in my case of music selection, where the main tree consists of artist folders, then album folders, then individual songs, two jumps up with one mouse press would be convenient.
However, I did not know if anyone will be interested in this my new plugin.
And it was not necessary to do it perfectly right from the start.
Pako
- Pako
- Plugin Developer
- Posts: 2294
- Joined: Sat Nov 11, 2006 1:31 pm
- Location: Czech Republic
- Contact:
Re: HTTP explorer
I just released a new version.
I think now it's much better.
Changes:
- extensive reworking for increased stability
- added option to open a file using the default application
- added the possibility of triggering events for folders
- added option to return to any higher level
- incorporated limit - it is impossible to enter below the server root
Attention! You have to open and resave the configuration dialogs of all "Start server" actions.
Otherwise it will not work correctly !
Pako
I think now it's much better.
Changes:
- extensive reworking for increased stability
- added option to open a file using the default application
- added the possibility of triggering events for folders
- added option to return to any higher level
- incorporated limit - it is impossible to enter below the server root
Attention! You have to open and resave the configuration dialogs of all "Start server" actions.
Otherwise it will not work correctly !
Pako