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
Hey so once you get the "Get Track" and " Get Artist" information how do you send that to a broadcast event? I would like to broadcast this to my phone. Is there a python code?
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Currently this is given as a simple print statement in the log if you just execute the macro but you can easily use the action result in a python script code.
You have so many options, almost unlimited. To send information to a phone, I am personally using Growl for Windows and "Prowl" on my iPhone ("Notify my Android" for those devices).
First thing I would do is to make a little macro with a script for each info I am interested in. This is a sample for "Get Current Song Title" using Growl :
When I run it, it sends the track name to my phone. That's it, very simple.
Best reg Walter
You have so many options, almost unlimited. To send information to a phone, I am personally using Growl for Windows and "Prowl" on my iPhone ("Notify my Android" for those devices).
First thing I would do is to make a little macro with a script for each info I am interested in. This is a sample for "Get Current Song Title" using Growl :
Code: Select all
theTrack = eg.plugins.MySpotify.GetCurrentTrack()
eg.plugins.Growl.Notify(u'EventGhost', u'Spotify', theTrack, u'', True, 0, None, False)
Best reg Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Thats almost what Im looking for, but is there a way to do this with python. I tried modifing your code to no avail. Thank you for the response, Im so close to the answer!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
If you could be more precise, we could give you some hints but we are not interested in guessing games.
Specify your target (phone type, os, phone app etc etc).
Specify your target (phone type, os, phone app etc etc).
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Im sorry...ill try to explain better. Im linking an Android phone (Atrix) with the event ghost app and the amazing TerREmote. They talk to the eventghost broadcaster event, or even better the Android Plugin for EventGhost. I have recently downloaded the Spotify Plugin and love the simplicity. When I include "Get Track" in a macro, I notice that in the "Viewer" window i can see the correct track. What I would like help with is the code to take that "i" (information) that is received by running "Get Track" and broadcast that to my Android Phone. The code written before seemed very close but you used the plugin notify, which confused me.
I hope this helps, and sorry for being vague, but i do appreciate the time!
I hope this helps, and sorry for being vague, but i do appreciate the time!
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
OK, I see now, you have an Android phone. This python script uses the Android plugin for EG. Try this in a macro:
The script above will assume that Spotify is running and playing something. To handle situations when this is not the case, the script could be extended with various checks. But it should work to start from...
BR
Code: Select all
theTrack = eg.plugins.MySpotify.GetCurrentTrack()
eg.plugins.Android.plugin.Send(theTrack)BR
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
If Spotify is started when evenghost is running it does not work for me.
I have to exit and restart eventghost.
Is there a way to make shure the plugin works when spotify is started later?
a timer that does the start thing every x minutes.
Or a action I can trigger by pressing a button.
I have to exit and restart eventghost.
Is there a way to make shure the plugin works when spotify is started later?
a timer that does the start thing every x minutes.
Or a action I can trigger by pressing a button.
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
That is strange, when I test it, it works without problem if Spotify is started before or not. Try the macros "Terminate Spotify" and "Start Spotify" if they works. Here they works fine. (I'm running the test with Vista)If Spotify is started when evenghost is running it does not work for me
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Looks like its only not working after I put my system in standby.
Now when its not working I try to disable the spotify plugin:
Spotify plugin stopped
Spotify monitor thread has stopped
When I then enable it, nothing happens and it still does not work.
I can restart spotify, it still does not work.
When I then restart Eventghost it works.
Spotify found
Spotify object created
Now if I can just do some reload action, I could run this action when the system comes from standby.
Now when its not working I try to disable the spotify plugin:
Spotify plugin stopped
Spotify monitor thread has stopped
When I then enable it, nothing happens and it still does not work.
I can restart spotify, it still does not work.
When I then restart Eventghost it works.
Spotify found
Spotify object created
Now if I can just do some reload action, I could run this action when the system comes from standby.
Re: Spotify
Hi!
This is my first post in this forum.
As my maincontrol i use CommandFusion + iTach IP2IR + http.
Have just found Eventghost, excellent software!
My problem is that i want to use Spotify plugin to control Spotify at the same pc as as i have Eventghost and control spotify works fine.
In the spotify plugin there is funktions to get song title, artist and here i get trouble.
I want eventghost to send song title as feedback to CommandFusion (iViewer 4).
Is that posible without python script/command?
If so, how???
If python script/command i a must, how should that look like?
Thank's
Latest Eventghost
Win7
This is my first post in this forum.
As my maincontrol i use CommandFusion + iTach IP2IR + http.
Have just found Eventghost, excellent software!
My problem is that i want to use Spotify plugin to control Spotify at the same pc as as i have Eventghost and control spotify works fine.
In the spotify plugin there is funktions to get song title, artist and here i get trouble.
I want eventghost to send song title as feedback to CommandFusion (iViewer 4).
Is that posible without python script/command?
If so, how???
If python script/command i a must, how should that look like?
Thank's
Latest Eventghost
Win7
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hi husa550,
It is not possible without work, most likely python scripts are needed. I have showed some examples of the same but then sending to an android phone. It all depends how Command Fusion can receive information. Maybe the author of Command Fusion will care to help you out.
Best regards, Walter
It is not possible without work, most likely python scripts are needed. I have showed some examples of the same but then sending to an android phone. It all depends how Command Fusion can receive information. Maybe the author of Command Fusion will care to help you out.
Best regards, Walter
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Does someone have an idea how i could send the info after "Spotify Get current status" to commandfusion?
Re: Spotify
I want to put the text from !info to get in commandfusion plugin: Serial Changekrambriw wrote:Hi husa550,
It is not possible without work, most likely python scripts are needed. I have showed some examples of the same but then sending to an android phone. It all depends how Command Fusion can receive information. Maybe the author of Command Fusion will care to help you out.
Best regards, Walter
After that it's easy.
Or if there are some way of sending !info text by UDP
-
krambriw
- Plugin Developer
- Posts: 2570
- Joined: Sat Jun 30, 2007 2:51 pm
- Location: Stockholm, Sweden
- Contact:
Re: Spotify
Hi, just looked at it quickly. The action in my Spotify plugin is returning a value as response. This simple python script sends the current track title using SerialChange. You can try if it works.
Best regards, Walter
Best regards, Walter
Code: Select all
theTrack = str(eg.plugins.MySpotify.GetCurrentTrack())
eg.plugins.CommandFusion.SerialChange(1, theTrack)
My released plugins
https://drive.google.com/drive/folders/ ... y01eVBKeHM
https://drive.google.com/drive/folders/ ... y01eVBKeHM
Re: Spotify
Sweet!krambriw wrote:Hi, just looked at it quickly. The action in my Spotify plugin is returning a value as response. This simple python script sends the current track title using SerialChange. You can try if it works.
Best regards, Walter
Code: Select all
theTrack = str(eg.plugins.MySpotify.GetCurrentTrack()) eg.plugins.CommandFusion.SerialChange(1, theTrack)
It works
Big thank you!!!
If i want to send the result from "Get Current Status", how will the script look like?
I tried to change Track to Status in the script but that did not work, what am i missing?
Edit: I worked it out
This is how it look's now.
Would be nice with fanart, perhaps in the future for this plugin!?