I have written two applications that uses Vera: squeezedVera and squeezedVeraScenes.
squeezedVera is a plugin for the Logitech Squeezebox, and it gives you the possibility to run scripts in different ways that can control your z-wave devices through Vera.
squeezedVeraScenes will run the same scripts as squeezedVera but here you define conditions for when they shall run in a configuration file, e.g at sunset on Mondays and Tuesdays. You can also define different scenes with different behaviour.
There is also an interface between squeezedVera and squeezedVeraScenes, that e.g. lets you switch scene through the Squeezebox.
[url=http://www.mats-gustafsson.se/sqv_sqvs/]http://www.mats-gustafsson.se/sqv_sqvs/[/url]
In the Squeezebox (SB) I just navigate to “Extras”->“Vera” and from there I can switch on and off my devices. For example I have setup my squeezedVeraScenes to switch off all lights inside my house at 1145 in the evening, but if we go to bed before that I just run the script “all lights off” from my Squeezebox and the house goes dark.
I don’t have any PC with a web browser up and running all the time, so for me it is easier to use the Squeezebox (which always is on) and control things from there.
I also have squeezedVera to switch on the loudspeakers connected to my Squeezebox automatically when I press play or when an alarm goes off in the morning (don’t know how to do that in any other way).
A scene can be activated by requesting http://Vera_IP_adress:49451/data_request?id=lu_action&output_format=xml&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum=
No I have not considered to make the Vera’s scenes available within the plugin (at least not until yesterday).
I wanted to have the possibility to make Vera behave differently depending on if for example I am at home or if I am away, so that is why I wrote squeezedVeraScenes in which you can pick different scenes like that. At least in the beginning it was not possible to do that within Vera.
Then I wanted to use my Squeexebox as a convinient UI for controlling which scene should be active. Through the Squeezebox I also wanted to be able to trigger different scenarios, like turn off all lights in my home when I go to bed.
What additional benefits do you think that using Vera’s scenes in the plugin would bring, compared to using scripts like it is done today?
[ul][li]Vera as one point of configuration: easier maintenance of scenes[/li]
[li]SqueezedVera would (optionally) be plug and play (and could be used by non-programmers)[/li]
[li]a hierarchical view (Global/Rooms->Scenes) is more user-friendly for complex scenarios[/li][/ul]
[ul][li]Vera as one point of configuration: easier maintenance of scenes[/li]
[li]SqueezedVera would (optionally) be plug and play (and could be used by non-programmers)[/li]
[li]a hierarchical view (Global/Rooms->Scenes) is more user-friendly for complex scenarios[/li][/ul][/quote]
You are right.
I will make a note in my todo list about this, but unfortunately I don’t think that I will have time in the near future to do this modification. Maybe you’d like to give it a try?
I am quite familiar with Lua, but would have to dive into Perl … My time is limited, too.
How would you implement it?
[ul][li]Requesting Vera’s configuration file from Squeezebox Server (SBS) and parsing it on SBS (does SBS come with a JSON parser?)[/li]
[li]Remotely running a Lua script on Vera from SBS and transferring the result to SBS (what would be the best/easiest way to transfer the result of the Lua script to SBS?)[/li][/ul]
I am quite familiar with Lua, but would have to dive into Perl ... My time is limited, too. :-)
Time is a problem today... ;)
How would you implement it?
[ul][li]Requesting Vera’s configuration file from Squeezebox Server (SBS) and parsing it on SBS (does SBS come with a JSON parser?)[/li]
[li]Remotely running a Lua script on Vera from SBS and transferring the result to SBS (what would be the best/easiest way to transfer the result of the Lua script to SBS?)[/li][/ul]
In my case I know nothing about Lua, so I would go for your first alternative. I don’t know if a JSON parser is included in the SBS, but I don’t believe so.
I am looking after it, but not doing much. Only verifying that SqueezedVera works for new releases of the squeezebox server.
[url=http://www.mats-gustafsson.se/sqv_sqvs/squeezedvera/index.html]http://www.mats-gustafsson.se/sqv_sqvs/squeezedvera/index.html[/url]
This is the only part of it that I am using today, i.e. for switching on and off things in Vera with the Squeezebox.
does either solution have the option to trigger an event in vera if a player starts playing, basically i want it to turn on an amp using an appliance module once squeezebox is playing.
SqueezedVera is able to execute scripts when you turn on or off your squeezebox or if you press play on it. So, if you can write a script that turns on your amp (there are script examples), then you should be able to do what you are looking for.
I must admit that I have only verified this on Linux servers though.
I’m looking at tieing my SQ and Vera together more.
The end goal I’m trying to get to is having my heat turn on (Vera controlled) 30 minutes before my alarm goes off (SB controlled). It seemed like this plugin might let me do that but I can seem to download it. Is there anyone that can help me get a copy of the plugin and configure it to do the above control?
What I would really love is to have my SB poll my google calendar and schedule the alarm based off the first event. I know that is outside this forums scope, but if either of you have any suggestions/experience with SB, I would appreciate it. I’m only using my in the very basic way but have a mythtv box that I’m planning on running a SB server on.
The end goal I'm trying to get to is having my heat turn on (Vera controlled) 30 minutes before my alarm goes off (SB controlled). It seemed like this plugin might let me do that but I can seem to download it. Is there anyone that can help me get a copy of the plugin and configure it to do the above control?
I believe that it should be possible to do what you want with the plugin. At least you should be able to configure an alarm on your SB (set to 30 min before the other alarm) that will trigger your Vera to do something.
I was going to say that the plugin is possible to download from my web, but when checking up on that I realized that the site is down. My web provider claims that they are looking into the problem…so check it up later today again.
did you figure all this out? i had marked to reply a while back but forgot about it. Im using the plugin daily and have quite a bit of squeezbox integration so may be able to assist.
No, I believe the question is still open. I guess the question is how to get the plugin to run on a Duet. I myself only have the SB Classics, so I have a bit of a problem with testing and verfication on a Duet.
arich57 have done some further studies into the issue and proposed that a perl script for the jive os is needed on the controller (I hope I got it all right now…), but we have not yet tried with that.
arich57 by all accounts what you are trying to do should all be achievable. I no longer set my alarms in squeezebox anymore as they are all triggered by scenes which are all based on a number of conditions, one being mine and my OH’s Google calender
does the name of event in your calender change or could you have one being called Alarm for example which you move around on a daily basis. the only issue with the google calender plugin is that it will trigger events based on the event taking place, its works like a virtual switch. ie if the event “heat” is currently in progress the switch will be on, you can then use this to trigger events, not sure how you would do events 30 minutes before.
as for the jive menu integration I did find a thread about creating a cutom jive menu applet which would be accessible by both the touch and the duet. its likely it will be all hardcoded but as long as its commented sufficiently will be easy to customise.
I could do it either way. Ideally it wouldn’t matter the alarm name but I could create a common alarm if that makes life easier.
This is my firs venture into “advance” usage of my vera and squeezebox, would you mind sharing how you have your’s sett up and what all I would need to do/install?
I have a htpc that I was going to install the squeezebox server on. After that though, I’m not sure what all I need to do.
Any advice/direct would be great.
Thanks.
[quote=“trouty00, post:19, topic:164474”]arich57 by all accounts what you are trying to do should all be achievable. I no longer set my alarms in squeezebox anymore as they are all triggered by scenes which are all based on a number of conditions, one being mine and my OH’s Google calender
does the name of event in your calender change or could you have one being called Alarm for example which you move around on a daily basis. the only issue with the google calender plugin is that it will trigger events based on the event taking place, its works like a virtual switch. ie if the event “heat” is currently in progress the switch will be on, you can then use this to trigger events, not sure how you would do events 30 minutes before.
as for the jive menu integration I did find a thread about creating a cutom jive menu applet which would be accessible by both the touch and the duet. its likely it will be all hardcoded but as long as its commented sufficiently will be easy to customise.