Read the statement by Michael Teeuw here.
Would this be possible?
-
Hi,
I believe you can do it with MMM-NotificationTrigger and MMM-RemoteControl.
i.e :
When Spotify stops, send notification “SPOTIFY STOP”. (within Spotify module)When “SPOTIFY STOP” is received by MMM-NotificationTrigger, send “HIDE MODULE Spotify” to MMM-RemoteControl.
Of course, code is not correctly written, but that’s how I would do it. MMM-NotificationTrigger and MMM-RemoteControl are pretty easy to use.
FYI, I’m already doing that with news / compliments modules. When news article is made bigger by the “Article_more-details” notification, then the compliment module is hidden.
Once “article-less-details” is triggered, then the compliment module is shown again.Regards
-
@bolish Thanks. I guess then I could also reverse it so when spotify plays music, it would hide the other module and then spotify would appear on my mirror.
-
Correct.
-
@motdog
Are you talking about “MMM-Spotify”?You can do it more simple way.
Add this into your css/custom.css#SPOTIFY.pausing {
display:none;
}This could make module hiding when paused.
-
When the boss talks… :-)
Indeed it seems easier as @Sean proposed if you use his new MMM-Spotify module. (Which I will try soon also).
I’ve learnt one more thing myself.
Thanks. -
@Sean yep. That’s it. So if I put another module in the same spot but after it in the config, Spotify would show up when playing and when paused/shut down the other module would show up?
-
@motdog
Later module will jump down when spotify is appeared. -
@Sean after further review I am using MMM-NowPlayingonSpotify Would it work on that or do I need to install MMM-Spotify. Looks like they do the same thing, MMM-Spotify lets you control via voice if you so choose, which I don’t have set up but it shouldn’t be a problem I assume.
-
@motdog
Controlling spotify on MM (besides voice, there could be many possibilities, - sensors, or any programmable condition) is difference. If you need not, nothing different. -
@Sean thanks. Ill try to modify the .css in the module I have and see what happens.
-
@Sean
Hi,Still, would it be possible that MMM-Spotify sends notification when start playing and when end playing as I would like to hide some other modules when this one is playing?
Or is that also possible through .css?
Thx
-
@bolish
No notification about status emits . It will be added next updates.
He just asked hidnig module on pausing, that is possible with only css. -
@Sean
OK, would be great (at least for my need). I will follow the git to be informed about the next update then. Thx. -
Additional .css question :
I’m trying to get the MMM-Spotify module centered (when using a center region / area, it still displays on left side).
Could you please tell me how I should modify custom.css to do that?I don’t know if it’s linked to the spotify.css or the custom.css or if I need to modify the region into the main.css… Also I don’t know really which parameter I should tweak…
Thx already
-
@Sean
That´s exactly what i was looking for… but I think that there is one wee problem, it only works when you press pause or stop it but the module doesnt disappear if you close the the app on your phone.
Is there a way to hide the module when you close the app?
Thanks and congrats on the module
-
@SammyJankins
That is not so easy at this moment. Because, PPL can have several spotify devices at a same time. That one device is closed doesn’t mean all devices are inactive. Maybe it could be done by checking status of all devices per each seconds (Spotify API doesn’t push its status to client, so client should be pulling data when it is needed).
Currently this module is already pulling playback data per each seconds, I’m not sure whether good to add device scanning additionally. It might make double of API using.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login