Plugin: no response to websocket emit(play)


I’m experimenting with a plugin on similar lines to gpio-buttons, but to respond to events from a touch enabled i2c sensor.

My plugin can quite happily detect the touch events, but I’m struggling to get these connected to say ‘play’. the code is very similar to gpio-buttons."Emitting state")
			socket.emit('getState', '');
			socket.once('pushState', function (state) {
				if (state.status == 'play' && state.service == 'webradio') {
				} else if (state.status == 'play') {
				} else {

But I get no response to the ‘getstate’ and the ‘play’ is never honoured. Where as gpio-buttons works just fine.

(my code is currently at

Sure I’m missing something obvious!

Cheers Matthew

I’ve been able to solve this problem.

The websocket library I was using in my plugin was the latest v4 - whereas volumio itself is on v1.4 (nearly 8 years old!)

Swapping to the older library makes things work!