As I need to create multiple virtual switch manually for my DIY universal IR project & link them to SmartThings & Echo.
I decided to follow the earlier examples below & come out with a version of HTTP Switch Creator.
tguerena and surge919 - URI Switch
Eric Roberts (baldeagle072) - Virtual switch creator
JZ - TVDevice
You need to install both device handler & smart app. Once install, you can create virtual http switch/button on the fly
HTTP Button handler (v1.1 - corrected the button behavior and more like momentary switch):
So⦠I have been spending way too much time trying to get Virtual URI Switch working, and I stumbled upon this SmartApp and decided to give it a try.
Unfortunately, the results are the same β your app does not appear to work for me either. What is weird is that when I send a POST command via Postman (Mac app), the command works like a champ and devices turn on and off appropriately, and more importantly, thru Wireshark, I can see all the IP/HTTP traffic to and from my IP device and the REST client. All is good.
But neither your app and URI Virtual Switch will work, and more importantly I see absolutely no IP/HTTP traffic in Wireshark. Digging into forum, I found several threads that imply that ST is blacklisting local devices and stopping all non-whitelisted IP traffic. My tests tend to agree with those comments, so I am rapidly coming to the conclusion that I will not be able to control my IP devices with ST.
Any thoughts from your end why Wireshark sees no traffic on the LAN? In your appβs case, more work would need to be done for it to work, since I have no way to include the body payload command currently, but I still would expect to see traffic, even if that command is invalid or not structured properly. I am confused on this one.
Yes - thatβs what so weird. I am struggling to understand how you and others are communicating between your ST hubs and other devices internal to the lan segment. If so, how/why is there no IP traffic emanating from the ST hub using either SmartApp?
But to confirm, you are having no problem with you app working and communicating with non-registered devices. Is that correct? If so, then I have a different issue I need to run down.
Thanks for the feedback. the fact that it works, gives me some comfort that it is possible to get this working. Unfortunately the UPB gateway I use only supports HTTP/POST and direct IP packets, not GET, so that is making the integration a little more difficult. Both you and Troy have operational GET solutions, but no love for POST in anything of the apps/device handlers that I have found so far.
I am not a developer, so I will ask you - how difficult would it be to add code to support BODY key-pairs, which are used by POST command?
I am also looking into a gateway from a different manufacturer, but no word from their developers re: API details. At this point, though, I am stumped unless you can think of anything else.
Any chance this could be expanded to create a dimmer?
I saw your posts in the automated blind topic and while this works really well to open/close the blinds, it would be even better to be able to stop them at any point in between.
Let me find a time to test out the post, it should work. If you have a local web server, try to post to it and and check the http header to see if it receive any parameter
Need some help, Iβve a NodeMCU ESP8266 setup to control some IR devices using example here:
The code works for me (incl raw data) when using normal web browser. Tried the Virtual switch method, and simple URL works, but not able to add raw data URL to the smartapp which is giving error.
I stumbled onto this while searching for a long wanted solution and hope you can help. I am pretty sure I can use/repurpose it for my use but for the life of me I can not get it to function. I am going to guess its something I am not setting up correctly.
Some background, I am attempting use this to integrate an Eyezon Envisalink 3 thatβs commonly connected to DSC and other alarm panels. It has a local built in server that accepts local http commands to arm/disarm etc
Currently I can use a web browser (or tasker get) and enter βhttp://192.168.5.174/2?A=3&p=1&X=0952β and the system will arm.
I have currently setup entered
Device IP address
192.168.5.174
Device port
80
URL Path for ON
/2?A=3&p=1&X=0952
URL Path for off
(I have not entered anything)
Post or Get
Get
Requires user auth? Set to off.
This is what is logged
a3059725-dc8d-42eb-8a70-304ec57fafb3 β7β:β32β:β42β βPM: debug GET /2?A=3&p=1&X=0952 HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.5.174:80
Content-Type: application/x-www-form-urlencoded
a3059725-dc8d-42eb-8a70-304ec57fafb3 β7β:β32β:β42β βPM: debug The method is GET
a3059725-dc8d-42eb-8a70-304ec57fafb3 β7β:β32β:β42β βPM: debug The Header is [HOST:192.168.5.174:80, Content-Type:application/x-www-form-urlencoded]
a3059725-dc8d-42eb-8a70-304ec57fafb3 β7β:β32β:β42β βPM: debug path is: /2?A=3&p=1&X=0952
a3059725-dc8d-42eb-8a70-304ec57fafb3 β7β:β32β:β42β βPM: debug The device id configured is: ea5583db-eb51-42fe-a460-351b6c207c63
Thanks CSC,
I was able to get it running and it works like a champ for this integration without modifications.
I did have to enable authentication and enter the server info instead of the system code.
Hopefully others trying to do this can find it as I did.
Hi, I also have this working now with DSC alarm, thanks for all the notes here.
Does anyone know the url code for arm away mode. The disarm one works, the arm one however arms only in stay. I cannot figure out how to arm away mode. The ones below are the url I am using where xxxx is DSC passcode
Mark,
More than likely its actually going into away mode but you did not trigger an exit sensor,If you just trigger it and do not exit it will arm in stay mode Its the way DSC panels behave⦠As a test, Arm it and open one of your exit doors and let it arm. Then trigger the exit/disarm and it should show it was it away mode was disarmed.