Last active
April 10, 2022 07:30
Revisions
-
paulusm revised this gist
Apr 10, 2022 . 2 changed files with 1 addition and 1 deletion.There are no files selected for viewing
File renamed without changes.This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,7 +24,7 @@ class Dashing.Volumio extends Dashing.Widget #console.log @playingdata @set('song', @playingdata.title) @set('artist', @playingdata.artist) @set('cover', (if @playingdata.trackType == "mp3" || @playingdata.trackType == "flac" then @volumioServer else "") + @playingdata.albumart) @set('position', @minSec(@playingdata.seek / 1000)) @set('duration', @minSec(@playingdata.duration)) return -
paulusm revised this gist
Apr 9, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Volumio Now Playing Widget Using the excellent [Volumio websocket APIs](https://volumio.github.io/docs/API/WebSocket_APIs.html) Tested with Music Library, Spotify Connect, Webradio, Mixcloud.  -
paulusm revised this gist
Apr 9, 2022 . 3 changed files with 12 additions and 5 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,4 +13,8 @@ Tested with Music Library, Spotify Connect, Webradio, Mixcloud. <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> <div data-id="volumio" data-view="Volumio" data-title="Now Playing"></div> </li> ``` TODO: * Fix rounding bugs * Play queue? * Multiroom? This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,15 +1,16 @@ class Dashing.Volumio extends Dashing.Widget ready: -> # Change this to your Volumio server address @volumioServer = 'http://192.168.0.88:3000' @socket = io(@volumioServer) @socket.on('connect', () -> console.log 'connected to server' return) @playingdata = {"title":"Inactive", "artist":"Volumio"} @socket.on("pushState", @pushData) setInterval(@nowPlaying, 500) @@ -32,3 +33,4 @@ class Dashing.Volumio extends Dashing.Widget mins = Math.floor(secs / 60) remainder = secs - (mins * 60) return mins + (Math.round(remainder) / 100) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,5 @@ <h1 class="title" data-bind="artist"></h1> <img data-bind-src="cover" data-showif="cover" src="" /> <h3 class="song" data-bind="song"></h3> <p class="more-info"><span data-bind="position" data-showif="position"></span> / <span data-bind="duration" data-showif="duration"></span></p> -
paulusm revised this gist
Apr 8, 2022 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,8 +5,9 @@ Tested with Music Library, Spotify Connect, Webradio, Mixcloud.  1. Add files to smashing/widgets/volumio 2. Change line 5 of volumio.coffee to the LAN address of your Volumio device 3. Also need [socket.io v1.7.1](https://github.com/socketio/socket.io/releases/tag/1.7.1) (socket.io.min.js) in your smashing/assets/javascripts folder 4. Add this snippet to your dashboard definition ```html <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> -
paulusm revised this gist
Apr 8, 2022 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ # Volumio Now Playing Widget Tested with Music Library, Spotify Connect, Webradio, Mixcloud.  -
paulusm revised this gist
Apr 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,7 +4,7 @@ 1. Add files to smashing/widgets/volumio 2. Also need [socket.io v1.7.1](https://github.com/socketio/socket.io/releases/tag/1.7.1) (socket.io.min.js) in your smashing/assets/javascripts folder 3. Add this snippet to your dashboard definition ```html <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> -
paulusm revised this gist
Apr 8, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,7 @@  1. Add files to smashing/widgets/volumio 2. Also need [socket.io v1.7.1](https://github.com/socketio/socket.io/releases/tag/1.7.1) (socket.io.min.js) in your smashing/assets/javascripts folder 3. Add this snipped to dashboard definition ```html -
paulusm revised this gist
Apr 8, 2022 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,7 @@ # Volumio Widget  1. Add files to smashing/widgets/volumio 2. Also need socket.io in your smashing/assets/javascripts folder 3. Add this snipped to dashboard definition -
paulusm revised this gist
Apr 8, 2022 . 2 changed files with 9 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,3 +1,8 @@ # Volumio Widget 1. Add files to smashing/widgets/volumio 2. Also need socket.io in your smashing/assets/javascripts folder 3. Add this snipped to dashboard definition ```html <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ <h1 class="title" data-bind="artist"></h1> <img data-bind-src="cover" src="" /> <h3 class="song" data-bind="song"></h3> <p class="more-info"><span data-bind="position"></span> / <span data-bind="duration"></span></p> -
paulusm revised this gist
Apr 8, 2022 . 2 changed files with 54 additions and 0 deletions.There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,34 @@ class Dashing.Volumio extends Dashing.Widget ready: -> # Change this to your Volumio server address @volumioServer = 'http://localhost:8030' @socket = io(@volumioServer) @socket.on('connect', () -> console.log 'connected to server' return) @playingdata = {"title":"Not Playing", "artist":"No Artist"} @socket.on("pushState", @pushData) setInterval(@nowPlaying, 500) pushData:(data) => #console.log data @playingdata = data return nowPlaying: => @socket.emit("getState","") #console.log @playingdata @set('song', @playingdata.title) @set('artist', @playingdata.artist) @set('cover', (if @playingdata.trackType == "mp3" then @volumioServer else "") + @playingdata.albumart) @set('position', @minSec(@playingdata.seek / 1000)) @set('duration', @minSec(@playingdata.duration)) return minSec: (secs) -> mins = Math.floor(secs / 60) remainder = secs - (mins * 60) return mins + (Math.round(remainder) / 100) This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ // ---------------------------------------------------------------------------- // Sass declarations // ---------------------------------------------------------------------------- $background-color: #9664C8; $title-color: rgba(255, 255, 255, 0.7); // ---------------------------------------------------------------------------- // Widget-volumio styles // ---------------------------------------------------------------------------- .widget-volumio { background-color: $background-color; } .title, .more-info { color: $title-color; } img{ width: 50%; } -
paulusm created this gist
Apr 8, 2022 .There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ ```html <li data-row="1" data-col="1" data-sizex="2" data-sizey="1"> <div data-id="volumio" data-view="Volumio" data-title="Now Playing"></div> </li> ```