Websocket API : sleep

If something seems really buggy, report it here!

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.

Websocket API : sleep

Postby Samgeek » Thu Feb 02 2017 17:20

I discovered how to use the API and I'm really happy to be able to start developing my project. :) However when I set sleep mode with the API the rpi shutdown when the timer ends ! The sleep feature is working fine with the webUI.

Here is an example :
Code: Select all
volumio@volumio:~$ python
Python 2.7.9 (default, Sep 17 2016, 20:26:04)
[GCC 4.9.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from socketIO_client import SocketIO, LoggingNamespace
>>> socketIO = SocketIO('localhost', 3000)
>>> socketIO.emit('setSleep', {"enabled":"true", "time":"00:02"})

I've my doubts about the documentation for this feature, but I think I'm using it correctly.
Can you help me please?

I've a RPI 2 B and I'm using Volumio 2.041 (I made the update from Volumio 2.001 for this bug but it doesn't change a thing)
Last edited by Samgeek on Thu Feb 02 2017 18:00, edited 1 time in total.
Random avatar
Samgeek
Sunday DIYer
Sunday DIYer
 
Posts: 29
Joined: Fri Oct 28 2016 18:08

Ads helps Volumio remain Free and Open Source. Please consider donating to help us continue to serve you.


Websocket API : sleep

Postby Samgeek » Thu Feb 02 2017 17:58

I updated my post but the bug is still here!
Check this screenshot I noticed the timer is correct but the On/Off isn't.
Attachments
17-02-02 at 18.46.JPG
17-02-02 at 18.46.JPG (293.31 KiB) Viewed 597 times
Random avatar
Samgeek
Sunday DIYer
Sunday DIYer
 
Posts: 29
Joined: Fri Oct 28 2016 18:08


Websocket API : sleep

Postby Samgeek » Thu Feb 02 2017 19:43

I looked into the code (https://github.com/volumio/Volumio2/blo ... k/index.js) and found the problem : I need to add a parameter for the action so the correct call is :
Code: Select all
socketIO.emit('setSleep', {"enabled":"true", "time":"00:05", "action":"stop"})

And btw the UI bug is still here
Random avatar
Samgeek
Sunday DIYer
Sunday DIYer
 
Posts: 29
Joined: Fri Oct 28 2016 18:08


Websocket API : sleep

Postby Jean Anton » Mon Jul 15 2019 14:08

Thank you for your "auto response" !!!
Random avatar
Jean Anton
Fresh off the boat
Fresh off the boat
 
Posts: 2
Joined: Mon Jul 08 2019 16:06


Return to Bug reports

Who is online

Users browsing this forum: No registered users and 1 guest