techywarrior 689 Posted February 28, 2015 Posted February 28, 2015 (edited) This is supposed to be the string to run a scene on the Vera: http://ip_address:3480/data_request?id=action&serviceId=urn:micasaverde-com:serviceId:HomeAutomationGateway1&action=RunScene&SceneNum= ip_address would be the IP of the Vera unit, SceneNum would be the scene number. We'd probably need a way to select the scenes from the list retrieved from the Vera. This page has a lot of the info you may need. http://wiki.micasaverde.com/index.php/Luup_Requests Edited February 28, 2015 by techywarrior
Xzener 729 Posted February 28, 2015 Author Posted February 28, 2015 Nice work Chef. Can't wait to hear how this pans out.
chef 3805 Posted February 28, 2015 Posted February 28, 2015 (edited) This is what I came up with to start. It is simple. Un pack the Folder to your desktop and run the exe. You'll have to sign into the program like a media browser client. Then, copy and paste (for now) the Http string which turns down your lighting. Then make sure that you have enabled Notifications for "Video Playback Started" in the server. Then try and start a movie and see if the light dim. This is a very basic version of something much much more complex. But this is how we start! @@techywarrior @@Xzener @@lja Edited February 28, 2015 by chef
techywarrior 689 Posted February 28, 2015 Posted February 28, 2015 There is nothing attached to the post or a link to download. Is it just a separate program for testing? I thought that you had figured out how to make it a plugin?
chef 3805 Posted March 1, 2015 Posted March 1, 2015 Oh crap! In my haste to build the template I forgot to post the link. One second...
chef 3805 Posted March 1, 2015 Posted March 1, 2015 (edited) Here it is: https://dl.dropboxusercontent.com/u/46151346/Test%20Listener.rar P.S. you can't get "Playback Started" events with a plug-in. I tried implementing all the different interfaces, and unfortunately no arguments came up for playback. Edited March 1, 2015 by chef 1
Xzener 729 Posted March 1, 2015 Author Posted March 1, 2015 (edited) Iam afraid I dont know the command address... I know the ip address and the device#.... Techy, any idea what the line code is for a simple turn on/off device would be. The code you pasted earlier is for a scene. Here is the example I found... http://ip_address:3480/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 Ok, here is mine, but its not working. I think its supposed to turn off my black lights but it does nothing. http://192.168.1.9:3480/data_request?id=action&output_format=xml&DeviceNum=8&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 Edited March 1, 2015 by Xzener
techywarrior 689 Posted March 1, 2015 Posted March 1, 2015 Hm, hopefully Luke can add the event stuff you need Chef. I ran the program and it showed the list of users on my server but clicking on any of them doesn't log the user in (so I can't test) Xzener, It should be something like this: http://IP_ADDRESS:3480/data_request?id=action&DeviceNum=DEVICENUMBER&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 Change the final value in the string to 0 to turn a device off instead of on.
Xzener 729 Posted March 1, 2015 Author Posted March 1, 2015 Sorry Chef, off to a BBQ. I will help test more tomorrow. Great work. Thanks Techy, I will try that out.
Xzener 729 Posted March 1, 2015 Author Posted March 1, 2015 Hope fully we can get Play, Stop, and Pause working at least. So Luke would have to add more events to get all these working? Hopefully Chef can also get his listener to differentiate which user/room/client is being used. That will be important. 1
chef 3805 Posted March 1, 2015 Posted March 1, 2015 (edited) Hm, hopefully Luke can add the event stuff you need Chef. I ran the program and it showed the list of users on my server but clicking on any of them doesn't log the user in (so I can't test) Xzener, It should be something like this: http://IP_ADDRESS:3480/data_request?id=action&DeviceNum=DEVICENUMBER&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=1 Change the final value in the string to 0 to turn a device off instead of on.I won't show any interface when you login, I need to authenticate a user so the client interface can access the websocket. Once you select the user name button it should show a text box which you can cut and paste the http request for the light switch. I built a POST webclient which then send the http request to the switch. I wish I had a Vera switch so I could see if it works. Edited March 1, 2015 by chef
techywarrior 689 Posted March 1, 2015 Posted March 1, 2015 Nope, no text box appears when I select a user. Doesn't matter which user I select (admin or not) nothing happens.
chef 3805 Posted March 1, 2015 Posted March 1, 2015 @@techywarrior sorry, I realize that I have only coded for users with passwords. I have fix that here: https://dl.dropboxusercontent.com/u/46151346/Test%20Listener.rar this version allows for users without passwords to be authenticated properly. sorry about that.
techywarrior 689 Posted March 1, 2015 Posted March 1, 2015 Ok, good news. It works! In my test the lights turned on when I played a file. The text field seems to be set as a password field so you can't see the string. Strangely enough I disabled the playback notification after I did the quick test and turned off the lights. About a minute or two later (I am watching something on another machine) the lights turned back on. Is it possible that the quick app you made is triggering the script when it shouldn't? Is there some other notification that the server is producing that is triggering it? I closed the app and reopened it. Lights didn't turn back on. So it leads me to believe that it's something when the app is running is causing it to send out the post more often then it should.
lja 51 Posted March 1, 2015 Posted March 1, 2015 Hi chef: Good to see you are back at it. I am using the Insteon Hub and need to input a password for the lights. Is this possible? 1
techywarrior 689 Posted March 1, 2015 Posted March 1, 2015 Hi chef: Good to see you are back at it. I am using the Insteon Hub and need to input a password for the lights. Is this possible? I think this is why the plugin should focus on a single controller at a time. Chef, If you are using the notification I don't understand why it couldn't be a plugin like the other notification plugins. Although, honestly, I find those notifications to be super annoying so hopefully there is still a chance Luke adds some method for plugins to directly get play/pause notices.
chef 3805 Posted March 1, 2015 Posted March 1, 2015 (edited) @@techywarrior Yep it absolutely is probably triggering lights when it shouldn't. the good news is that it is working. Should I continue to refine it? I will also look further into how I can integrate it into the Server. Edited March 1, 2015 by chef
techywarrior 689 Posted March 1, 2015 Posted March 1, 2015 Chef, I think you should At this point I think you should look into a few things before doing any hard work. 1) Can it be a plugin inside MBS (will Luke add any functionality that is required) 2) Whatever method is used, current or above, can the specific client and user be targeted (it won't be worthwhile if someone remotely watching something is turning my lights on and off ) 3) How easy can we make this for the end user (I know for Vera we can easily pull the info so it would be doable with some time) ps, you don't need to @ me every time. I'm monitoring this thread
Vicpa 606 Posted March 1, 2015 Posted March 1, 2015 (edited) Hi Chef Great to see work on this ! Thought I would chime in as well as a vera user.1) One vera controller can control devices across multiple rooms/whole house. Zwave devices create a mesh type network to talk to each other and the controller.2) Vera Edge as I understand it is the new version of the VeraLite and should work just fine.See @@babgvant article at www.missingremote.com/news/2015-01-14/veracontrol-ces-2015 . Not to complicate things but an FYI. Someone more knowledgeable, can comment on the UI variations of Vera controllers(that is how they refer to their software releases), I don't know the specifics on differences. "UI7" is the latest and is what I think you will get with the Edge. That is what I am running on my VeraLite, from the Vera forums still are people running previous versions UI5 and UI6. I don't know if there any impacts, my two cents target ui7. Edited March 1, 2015 by Vicpa
wraslor 70 Posted March 1, 2015 Posted March 1, 2015 I use a veralite as well, the edge is the new version with some better specs but the lite works perfectly and you should be able to get a great deal on one.
Vidman 590 Posted March 1, 2015 Posted March 1, 2015 (edited) Ui7 is the latest but still very buggy from what I understand... Don't even bother with ui6 ... My vera 3 is still on ui5 which ATM is the most stable version and most compatible with all of the various 3rd party plugins I currently use the xbmc plugin which allows you to run a "scene" for each action in xbmc such as "play video"... Or "pause music" etc these scenes are set up in the Vera controller to activate a number of devices in a predefined way... So I think all that is needed here is to send the http post command to activate a scene for each media browser action. Also with regards to home automation it is probably more desirable to know the device being controlled rather than which user is controlling it eg "htpc is playing a video" rather than "Vidman is playing a video" Edited March 1, 2015 by Vidman 1
Vicpa 606 Posted March 1, 2015 Posted March 1, 2015 Hi @@Vidman do you have a link for the vera xmbc plugin source code ? Maybe we can leverage some of it. Thanks
chef 3805 Posted March 1, 2015 Posted March 1, 2015 Ui7 is the latest but still very buggy from what I understand... Don't even bother with ui6 ... My vera 3 is still on ui5 which ATM is the most stable version and most compatible with all of the various 3rd party plugins I currently use the xbmc plugin which allows you to run a "scene" for each action in xbmc such as "play video"... Or "pause music" etc these scenes are set up in the Vera controller to activate a number of devices in a predefined way... So I think all that is needed here is to send the http post command to activate a scene for each media browser action. Also with regards to home automation it is probably more desirable to know the device being controlled rather than which user is controlling it eg "htpc is playing a video" rather than "Vidman is playing a video" On it! The I ly thing to keep in mind is that if a plugin DLL is not possible, (and we end up with a client interface) we still have to authenticate a user for the client, so we can access the websocket. I am still trying to get a plugin DLL working though.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now