Custom web server

Sorry if this isn’t the right place for this question… If not, let me know where, and I’ll go re-ask… BUT, I’m trying to develop my own webpage… something that will be similar to, but a dynamic subset of, the dashboard. Basically, I want to have simple web pages on a device (ipad?) around the house that would have shortcuts to run scenes or control individual devices that are relevant for where the device is… Ie: in the basement, I might have a different page / view than in the livingroom…

What I’m toying with is a webpage written with Visual Studio Community edition (for convenience and familiarity, but willing to use other if needed) and I’ve got a quick test page deployed on which
I’ve figured out how to turn a regular lightswitch on/off with an HTTP request like this:

http://192.168.1.185:3480/data_request?id=action&output_format=xml&DeviceNum=6&serviceId=urn:upnp-org:serviceId:SwitchPower1&action=SetTarget&newTargetValue=0

That server side “get” request would be triggered by a simple button press on a regular HTML page.

What I can’t figure out is how to set a DIMMER switch.
I’ve seen documentation and discussion that says it SHOULD be something like this:

http://192.168.1.185:3480/data_request?id=lu_action&output_format=json&DeviceNum=29&serviceId=urn:upnp-org:serviceId:Dimming1&Action=SetLoadLevelTarget&newLoadlevelTarget=“30”

and I’ve tried seemingly dozens of similar variations on the above, but can’t get anything to work.

So… I have a few questions…

First - Am I reinventing the wheel? Is there something out there that would be very configurable that I might not need to go through what I’m doing because someone already wrote it? Even if there is, I may continue, because this is going to FORCE me to learn Vera better, and will ultimately be more personalized when I get it to work, but if there’s something out there already, I’ll take a look…

Second - How SHOULD I be able to do what I am trying to do? And, probably even more importantly, what files can I look at, that would tell me how to interact with any given device from a 3rd party application? I assume there’s an XML file or SOMETHING for every device, and if I knew how to interpret that file, I could have answered this question for myself… Let’s say, for example that the next thing I want to do is to query the status of a power monitor device on the system. Where would I look in the device config to find out what syntax, and what pollable / controllable variables there are on any given device?

And… Third, although maybe most important of all, is there a BETTER way for me to be doing this? I’ve seen some documentation talking about an http request with
data_request?id=lu_action
and some with
data_request?id=action

Why the difference? How can I tell which one I should use?

Thanks in advance!! This whole vera thing has been awesome to begin to learn… cant wait to learn more!!
Steve

Perhaps use Homewave (IOS) rather than re-invent. That is, unless you’re looking to build something completely custom. I use iPad’s around the house and Homewave allows me to access the devices of multiple Vera’s. This also includes scenes, lighting (yes, dimming), alarm panel(s), thermostats, locks and camera’s (to mention a few).

Yup, that’s what I was going to suggest. Although, as you point out, this is a great way to learn more about Vera, which is fine, until it gets frustrating (eg. dimmer switches.)

Try lower case “action=”
Case is extremely important for ALL arguments … and there are no consistent name/case strategies.

I would also Suggest HomeWave for this custom setup.

[quote=“RichardTSchaefer, post:4, topic:190450”]Try lower case “action=”
Case is extremely important for ALL arguments … and there are no consistent name/case strategies.[/quote]

WOW!

That was it! Can you believe, the request I put in this post, with the “A” changed to “a” worked?! Thank you SO Much!!

So… In regard to the other recommendations for the iOS app… I appreciate those recommendations, and I’ve tried a few iphone apps, and will likely continue to use them myself, but I kind of had hopes of some (or all) of the devices around the house being Raspberry pi devices, or even single function self-enclosed “buttons” that are really arduinos with WiFi modules in them, which is another reason I am preferring custom (Think Amazon DASH form factor, with an ESP8266 inside it, just to have a quick button by the bed to initiate “nighttime mode” or one by the back door to press to query the two alarm sensors and light a green or red light before I let the dogs out back and risk them escaping the back yard… )

SO… Is there a handy reference, or even a file I can look at on my own Vera that would show what the "ServiceID"s are for each of the devices I have, and hopefully show what parameters I can read and set?

Thank you SO MUCH for the help, and if there’s ever any interest in what I’ve done so far, let me know, I’d be happy to share, even if it is just a couple lines of VB.NET so far, cobbled together by watching a couple Youtube videos… if anyone is reading this 6 months from now, maybe I’ll have something useful!

-Steve

Try this for a start http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions

I myself was also looking into a similar thing and came across HomeAutomation which I quite liked, but it does not support Vera out of the box. Here is the post I created: http://forum.micasaverde.com/index.php/topic,35616.msg263154.html#msg263154

Try this for a start http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions[/quote]

That looks like a great start! Thanks!