Welcome to Smart Home Forum by FIBARO
Dear Guest,
as you can notice parts of Smart Home Forum by FIBARO is not available for you. You have to register in order to view all content and post in our community. Don't worry! Registration is a simple free process that requires minimal information for you to sign up. Become a part of of Smart Home Forum by FIBARO by creating an account.
As a member you can:
- Start new topics and reply to others
- Follow topics and users to get email updates
- Get your own profile page and make new friends
- Send personal messages
- ... and learn a lot about our system!
Regards,
Smart Home Forum by FIBARO Team
Question
Guest deraaij
Update: Please use TCP as of version 3.x as os.execute has been depreciated. As soon as we are able to have custom headers I will update the LUA code.
Hi all,
For those who are interested I made a Virtual Device based on the new LUA feature (inspired on lua code for MIOS) which can control a sonos device. It uses curl but will change it when the http api is documented. Change the IP address accruing to your needs.
EDIT: Added additional comments from other post which I posted in this thread.
EDIT: Changed req.lua --> /tmp/req.lua which works with beta 3.423 & 3.424
Play
Please login or register to see this code.
Stop
Please login or register to see this code.
Pause
Please login or register to see this code.
Previous
Please login or register to see this code.
Next
Please login or register to see this code.
Mute
Please login or register to see this code.
UnMute
Please login or register to see this code.
Volume – Not Working yet because we do not get the value off: _sliderValue_ @fibaro how does this work with Lua?
Please login or register to see this code.
Example Text-2-Speech using LUA in a scene:
Please login or register to see this code.
Remark: Play is initiated with the last statement to actual play the text (change it accordingly).
Example play song from network with LUA:
Please login or register to see this code.
Remark: Play is initiated with the last statement to actual play the song (change it accordingly).
Example radio station via LUA:
Please login or register to see this code.
Remark: Play is initiated with the last statement to actual play radio (change it accordingly). For now only the radio name is set.
Regards,
Mark[/b]
Link to comment
Share on other sites
Top Posters For This Question
10
8
8
7
Popular Days
Jan 31
8
Jan 13
7
Jan 17
7
Oct 21
6
Top Posters For This Question
Krikroff 10 posts
stevenvd 8 posts
deanrparry 8 posts
lindehoff 7 posts
Popular Days
Jan 31 2014
8 posts
Jan 13 2015
7 posts
Jan 17 2013
7 posts
Oct 21 2013
6 posts
Popular Posts
Robotica
I customized this great VD for personal use (again thanks) and created buttons for playing different radio channels. Also created (SONOS) Zone buttons, with this buttons you can simply add you SONOS
D3v1ld0cs
Hal/ Brain, I use the following lua code (copyright: Jean-Christophe Vermandé) for playing an mp3; Please login or register to see this code. You have to make an virtual device. Put the ip-adress of the
Guest deraaij
Update: Please use TCP as of version 3.x as os.execute has been depreciated. As soon as we are able to have custom headers I will update the LUA code. Hi all, For those who are interested I made a
Posted Images
219 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.