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.
Spotify (api is partially broken)
Re: Spotify
Hi,
Really nice plugin!
Jostein, I saw in this post (http://www.eventghost.org/forum/viewtop ... ify#p12417) that you have configured a nice interface with the webserver plugin, based on paseant's application.
It would be great if you could share your xml file and your index.html. Indeed, I'm not able to return the song title and artist information to my iPod Touch.
Thanks,
Sheugel
Really nice plugin!
Jostein, I saw in this post (http://www.eventghost.org/forum/viewtop ... ify#p12417) that you have configured a nice interface with the webserver plugin, based on paseant's application.
It would be great if you could share your xml file and your index.html. Indeed, I'm not able to return the song title and artist information to my iPod Touch.
Thanks,
Sheugel
Re: Spotify
Hi.
I am not yet done with it. (Lots of stuff missing and half done.) And also lots of stuff in norwegian but if you want it i can post it as it is?
Also there is the catche problem still witch i dont now how to fix. I have to refresh the page to get the info. Hoping for a reply on how to avoid this.
To get the now playing status i use bitmonsters "new web plugin" not the one that comes with EG. Se this post in the midle by bitmonster: http://www.eventghost.org/forum/viewtop ... 8742#p8742
And under the stop command i use this phyton script:
To display the information in the web page i use the code posted before, here is just the info boxes:
I dont now how to master the sending of variables over the network event sender and am runing the webinterface on a diferent computer than the one i use spotify on. But i have a instance of spotify on that computer also that i use for the shower only. Here is the spotify EG layout from the computer runing the webinterface (just copy and paste in to EG tree.):
I am sure there is a way more neat/easy way to display it but this is the way that came to me. Happy if anybody else has a bether/smother way. Maby one that will update also when change is done from Spotify.
Best regards, Jostein.
I am not yet done with it. (Lots of stuff missing and half done.) And also lots of stuff in norwegian but if you want it i can post it as it is?
Also there is the catche problem still witch i dont now how to fix. I have to refresh the page to get the info. Hoping for a reply on how to avoid this.
To get the now playing status i use bitmonsters "new web plugin" not the one that comes with EG. Se this post in the midle by bitmonster: http://www.eventghost.org/forum/viewtop ... 8742#p8742
In Eg i run this phyton script under these comands: Play, Next Track and Previous Track:Bitmonster wrote:You need 0.3.7.r1016 or greater to get it working. Then replace plugins\Webserver\__init__.py with the attached version.
Code: Select all
nowplaying = eg.plugins.MySpotify.GetStatus()
nowplaying = nowplaying.split('!')
eg.globals.SpotifyStatus = nowplaying[1]
a = nowplaying[1]
b = a.strip("Now playing ")
c = b.split(" - ")
eg.globals.SpotifyArtist = c[0]
eg.globals.SpotifyTitle = c[1]Code: Select all
nowplaying = eg.plugins.MySpotify.GetStatus()
eg.globals.SpotifyStatus = nowplaying
eg.globals.SpotifyArtist = ""
eg.globals.SpotifyTitle = ""Code: Select all
<tr>
<td egevent="Spotify:Artist-status" colspan="4" >Artist: {{SpotifyArtist}}</td>
<tr>
<td egevent="Spotify:Title-status" colspan="4" >Title: {{SpotifyTitle}}</td>
<tr>
<td egevent="Spotify:status" colspan="4" >{{SpotifyStatus}}</td>
</tr>Code: Select all
<?xml version="1.0" encoding="UTF-8" ?>
<EventGhost Version="1194">
<Folder Name="Lyd" Expanded="True">
<Folder Name="Start" id="402" Enabled="False">
<Macro Name="Start Program: spotify.exe">
<Event Name="Main.VolDown" />
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'Spotify started', 0, 100)
</Action>
<Action>
System.Execute(u'C:\\Programfiler\\Spotify\\spotify.exe', u'', 2, False, 2, u'')
</Action>
<Action>
EventGhost.Wait(2.0)
</Action>
<Action>
MySpotify.GoToPlayList()
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(616))
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(624))
</Action>
</Macro>
<Macro Name="Speech: Speak: Spotify not started. Press Volume down to start.">
<Event Name="Main.Play" />
<Event Name="Main.Previous Track" />
<Event Name="Main.Next Track" />
<Event Name="Main.VolUp" />
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'Spotify not started. Press Volume down to start.', 0, 100)
</Action>
</Macro>
</Folder>
<Folder Name="Spotify" id="616">
<Folder Name="play" Expanded="True">
<Macro Name="Spotify: Play" id="618">
<Event Name="Main.Play" />
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'Spotify Play', 0, 100)
</Action>
<Action>
EventGhost.Wait(0.90000000000000002)
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(624))
</Action>
<Action>
MySpotify.Play()
</Action>
<Action Name="Status update spotify web">
EventGhost.PythonScript(u'nowplaying = eg.plugins.MySpotify.GetStatus()\nnowplaying = nowplaying.split(\'!\')\neg.globals.SpotifyStatus = nowplaying[1]\na = nowplaying[1]\nb = a.strip("Now playing ")\nc = b.split(" - ")\neg.globals.SpotifyArtist = c[0]\neg.globals.SpotifyTitle = c[1]\n')
</Action>
</Macro>
<Macro Name="Spotify: Stop" id="624" Enabled="False" Expanded="True">
<Event Name="Main.Play" />
<Action>
MySpotify.Stop()
</Action>
<Action Name="Status update spotify web">
EventGhost.PythonScript(u'nowplaying = eg.plugins.MySpotify.GetStatus()\neg.globals.SpotifyStatus = nowplaying\neg.globals.SpotifyArtist = ""\neg.globals.SpotifyTitle = ""\n\n\n\n\n')
</Action>
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'Spotify Pause', 0, 100)
</Action>
<Action>
EventGhost.Wait(0.5)
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(618))
</Action>
</Macro>
</Folder>
<Macro Name="Previous Track" Expanded="True">
<Event Name="Main.Previous Track" />
<Action>
MySpotify.PreviousTrack()
</Action>
<Action Name="Status update spotify web">
EventGhost.PythonScript(u'nowplaying = eg.plugins.MySpotify.GetStatus()\nnowplaying = nowplaying.split(\'!\')\neg.globals.SpotifyStatus = nowplaying[1]\na = nowplaying[1]\nb = a.strip("Now playing ")\nc = b.split(" - ")\neg.globals.SpotifyArtist = c[0]\neg.globals.SpotifyTitle = c[1]\n')
</Action>
</Macro>
<Macro Name="Next Track" Expanded="True">
<Event Name="Main.Next Track" />
<Action>
MySpotify.NextTrack()
</Action>
<Action Name="Status update spotify web">
EventGhost.PythonScript(u'nowplaying = eg.plugins.MySpotify.GetStatus()\nnowplaying = nowplaying.split(\'!\')\neg.globals.SpotifyStatus = nowplaying[1]\na = nowplaying[1]\nb = a.strip("Now playing ")\nc = b.split(" - ")\neg.globals.SpotifyArtist = c[0]\neg.globals.SpotifyTitle = c[1]\n')
</Action>
</Macro>
<Macro Name="Terminate Spotify">
<Event Name="Main.VolUp" />
<Action>
MySpotify.TerminateSpotify()
</Action>
<Action Name="Status update spotify web">
EventGhost.PythonScript(u'nowplaying = eg.plugins.MySpotify.GetStatus()\nnowplaying = nowplaying.split(\'!\')\neg.globals.SpotifyStatus = nowplaying[1]\na = nowplaying[1]\nb = a.strip("Now playing ")\nc = b.split(" - ")\neg.globals.SpotifyArtist = c[0]\neg.globals.SpotifyTitle = c[1]\n')
</Action>
<Action>
EventGhost.EnableExclusive(XmlIdLink(402))
</Action>
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'Spotify Terminated', 0, 100)
</Action>
</Macro>
<Macro Name="Speech: Speak: {TIME}">
<Event Name="Main.VolDown" />
<Action>
MySpotify.Stop()
</Action>
<Action>
EventGhost.Wait(1.0)
</Action>
<Action>
Speech.TextToSpeech(u'Microsoft Sam', 0, u'{TIME}', 0, 100)
</Action>
<Action>
EventGhost.Wait(4.0)
</Action>
<Action>
MySpotify.Play()
</Action>
</Macro>
<Macro Name="Restart">
<Event Name="MySpotify.Spotify Window was not found" />
<Action>
System.Execute(u'C:\\Programfiler\\Spotify\\spotify.exe', u'', 2, False, 2, u'')
</Action>
<Action>
EventGhost.Wait(3.0)
</Action>
<Action>
MySpotify.GoToPlayList()
</Action>
<Action>
MySpotify.MinimizeSpotify()
</Action>
</Macro>
</Folder>
</Folder>
</EventGhost>Best regards, Jostein.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Maybe this helps?
http://www.eventghost.org/forum/viewtop ... dfb#p11334
Code: Select all
<html>
<head>
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<title>Lys</title>
</head>
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
@Jostein
Thanks so much, it's working fine!
I had no luck with krambriw's trick to update the data.
With an automatic refresh (here every 30''), even if it's not a perfect solution, it works:
Thanks so much, it's working fine!
I had no luck with krambriw's trick to update the data.
With an automatic refresh (here every 30''), even if it's not a perfect solution, it works:
Code: Select all
<html>
<head>
<meta http-equiv="refresh" content="30" />
</head>Re: Spotify
Hi.
Yes this indeed work. But the catching of the whole page at the start gives it a lot qucker loading time when i switch from page to page inside the interface.
Best regards, Jostein
Yes this indeed work. But the catching of the whole page at the start gives it a lot qucker loading time when i switch from page to page inside the interface.
If i insert this it takes me straight back to the home screen every 30second. There must be some way to let the browser check only the one line without returning me to the home screen.Sheugel wrote:With an automatic refresh (here every 30''), even if it's not a perfect solution, it works:
Best regards, Jostein
Re: Spotify
Hi, I've recently bought a RF MCE Remote Control Model OR22V and trying to control Spotify with it using EventGhost and the Spotify plugin but I can't seem to get it to work. If have configured EventGhost (EG) so that it will start Spotify and then "Enable exclusive" the Spotify folder in EG. This works fine but when I try to control spotify nothing happens (if I try to execute the commands from EG it works fine), do I need to do some more setup?
Regards,
Fredrik
Regards,
Fredrik
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hi Fredrik,
Yes, have to map the remote button events to the corresponding macros
You can do it the following way: Press a button and you should see the event on the left side (in the EG log window). Drag that event to a macro on the right side for the corresponding function like volume up / volume down.
This picture shows a part of my configuration Best regards, Walter
Yes, have to map the remote button events to the corresponding macros
You can do it the following way: Press a button and you should see the event on the left side (in the EG log window). Drag that event to a macro on the right side for the corresponding function like volume up / volume down.
This picture shows a part of my configuration Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Thank you for the fast reply.
Thats what I thought and I tried to add a few events to the macros but i didn't work. But now I know I did right so I will keep on trying.
Thanks again!
/Fredrik
Thats what I thought and I tried to add a few events to the macros but i didn't work. But now I know I did right so I will keep on trying.
Thanks again!
/Fredrik
Re: Spotify
Hi again, I can't get it to work.
If I press a key on the remote control nothing happens, but if I execute a command from EventGhost it works. So it seems as my remote controller can't communicate right. (If I press a key on the remote controller it shows up in the Log so that shuldn't bee the problem.)
This is my configuration:
If I press a key on the remote control nothing happens, but if I execute a command from EventGhost it works. So it seems as my remote controller can't communicate right. (If I press a key on the remote controller it shows up in the Log so that shuldn't bee the problem.)
This is my configuration:
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
I think it might be worth trying to enable the "Context Folder" that is disabled (the one with the red cross over it)
Otherwise it will block the execution of everything below on events
If you need to have it disabled, you will instead have to move the Spotify folder up in the tree hierarchy
Best regards, Walter
Otherwise it will block the execution of everything below on events
If you need to have it disabled, you will instead have to move the Spotify folder up in the tree hierarchy
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Thank you, it worked!
I added the "Tabulator" simulation events to the Spotify to so I can tab between the playlists and songs.
Thanks again for the help!
/Fredrik
I added the "Tabulator" simulation events to the Spotify to so I can tab between the playlists and songs.
Thanks again for the help!
/Fredrik
Re: Spotify
Hi krambriw.
Have you seen this web interface it captures the images of the now playing. Is that possible to do with eventghost? Have it store a now playing image in the EG folder.
Also i have looked for a RF remote but cant find any i like. Where did you by the one from your later post in this thread?
Best regards, Jostein
Have you seen this web interface it captures the images of the now playing. Is that possible to do with eventghost? Have it store a now playing image in the EG folder.
Also i have looked for a RF remote but cant find any i like. Where did you by the one from your later post in this thread?
Best regards, Jostein
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hello,
but it is more expensive it seems than this one that Siernan is using
http://xbmc.org/forum/showthread.php?t=42341
Best regards, Walter
I can check if this is possibleHave you seen this web interface it captures the images of the now playing. Is that possible to do with eventghost? Have it store a now playing image in the EG folder.
At Kjell & Company: Datorer & kringutrustning / M├Âss & tangentbord / M├Âss / pekdon / Tr├Ñdl├Âst / Fj├ñrrkontroll / 66222Also i have looked for a RF remote but cant find any i like. Where did you by the one from your later post in this thread?
but it is more expensive it seems than this one that Siernan is using
http://xbmc.org/forum/showthread.php?t=42341
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
I can not find any RF remote at Kjell & Company can only find this IR one:krambriw wrote:At Kjell & Company: Datorer & kringutrustning / M├Âss & tangentbord / M├Âss / pekdon / Tr├Ñdl├Âst / Fj├ñrrkontroll / 66222
http://www.kjell.com/?item=66222
I want an IR remote as i have to go through a wall.
Yes this looks great. But i cant find it anywhere on ebay when searching for it. Can you tell me where you got it Siernan?krambriw wrote:but it is more expensive it seems than this one that Siernan is using
http://xbmc.org/forum/showthread.php?t=42341
Best regards, Jostein
Re: Spotify
I bought mine at Inet: http://www.inet.se/artikel/6101315/fjar ... -vista-mce.
I don't know if the can ship it outside Sweden but you can always ask them.
I can help you buy it and post it to you otherwise.
I don't know if the can ship it outside Sweden but you can always ask them.
I can help you buy it and post it to you otherwise.