Plugin Volumio & Arduino + LCD-Display

Hey there,
I successfuly wrote a Plugin to comunicate with an Arduino via USB to use the LCD-Display and Sensors to controll Volumio.
Now I’m stuck at the part where i want to send the name of the Playlist(!!!) and the time of the currently playing song.
Poorly i could not find anything about that in the doku. It looks like ther is something like “pushGetSeek” to Obtain the time.
but i cant get it via:

socket.on('pushGetSeek', function (data) {
    console.log("arduinoio  "+"pushGetSeek data: "+ data);
});

2nd:
when i obtain the playlist i get just the objects not the name of the playlist:

socket.on('pushQueue', function (data) { console.log("arduinoio "+"pushQueue"); console.log("arduinoio "+data); });

i call it via:

arduinoio.prototype.getQueue = function () {
    socket.emit('getQueue')
};

any help would be appreciated

cheers Molta

Hi molta,

to get the player status, so with the seek, just listen on the pushState event

socket.on(‘pushState’, function(data) {
console.log(data)
}

As per the playlist, volumio does not know which playlist is currently playing…

hi michelangelo,
thx for the fast reply,
i use ‘pushState’ already to get all the other infos i need but it does not get called every second.
But i found an peace of code that gave me a hint:

[code]CoreStateMachine.prototype.startPlaybackTimer = function (nStartTime) {
this.commandRouter.pushConsoleMessage(‘CoreStateMachine::startPlaybackTimer’);

this.runPlaybackTimer=true;
this.playbackStart=Date.now();

var trackBlock = this.getTrack(this.currentPosition);

if(trackBlock){
	this.currentSongDuration=trackBlock.duration*1000;


	this.askedForPrefetch=false;
	this.simulateStopStartDone=false;

	setTimeout(this.increasePlaybackTimer.bind(this),250);
}
return libQ.resolve();

};
[/code]

especially setTimeout(this.increasePlaybackTimer.bind(this),250); looks like there is a timer running. so thats the way i go…

for the playlist there is no chance to get the name?
my main goal is a NFC driven Volumio and my idea is to simply store the Playlist name on the NFC to start playing by simply call:

io.emit(‘playPlaylist’, {“name”: “MyNFCplaylist”});