Enis thank you for your reply,
I have a mochad deployment already set up for my X10 devices using a raspberry pi and CM15A i am not using the HA bridge for that purpose i am using the older device type / handler smart app for ST approach.
I also have a HA bridge server running that automates my roomba vacuum cleaner with a Roowifi adapter through Alexa. I have not created any of these approaches i have merely followed steps that others have written LOL
I do have 2 UPB dimmer switches already installed that used to work really well with an older automation system and a usb UPB control interface that registers as a HID but i have no clue of what to look for as far as how the mochad can communicate with the usb UPB interface or how to find the addresses of the UPB devices that need to be controlled.
I guess i am going to do some more research and hopefully with your help or expertise we can get this figured out do you have any upb switches of your own??
Please continue to point me to the right direction and any help is really appreciated.
By the way judging by your name / member id i think we might be of the same back ground … maybe apo jo vella?
Thanks for this, I have set up the URI switch and it works great when I use the switch in the smartthings app, however when I use Core or SmartRules for the URI switch the URL request is not sent, the switch does turn on/off but I cant see anything hitting my webserver logs. Any ideas why this is?
That is strange. I have not tried using the CORE to tie in to the URI
switch. Generally speaking, I would think that the switch and the switch’s
triggers would line up to each other 1:1. In other words it sounds like
it’s working right, but maybe the switch isn’t? I’ll have to try with mine
later and see if it works.
I hope this thread is still active. I’m trying to use this Device Handler to control my Hunter Douglas blinds. I have a gen 1 hub and it doesn’t have native Alexa or SmartThings integrated. however I’m able to access the APIs through my browser. For example executing http://10.0.0.39/api/scenes?sceneid=7974 closes one of my blinds. I would expect this to work with the URI Switch, but for some reason I can’t get it to work.
Here’s the Log:
7:17:58 PM: info postEventToEndpoint: event successfully posted.
7:17:58 PM: debug Property Change Event switch: off (source: DEVICE)
7:17:58 PM: debug GET /api/scenes?sceneid=7974 HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 10.0.0.39:80
Content-Type: application/x-www-form-urlencoded
Content-Length: 4
null
7:17:58 PM: debug Executing OFF
What am I doing wrong? Seems so simple. Thanks for your help and for the development. This looks like it has a lot of potential.
Need a little bit more info to help you. Just judging by your message, looks like the issue might be that doing a POST is working, but doing a GET is not. Maybe a screenshot of your settings in smartthings? And a little info as to what you’re trying to setup?
Thanks for getting back to me so quickly.
Yes, I’m trying to post to 192.168.1.210 the message /tools?cmd=event,TurnOn.
So I set URI settings like this:
External - not set
Internal IP 192.168.1.210
Internal port - not set
Internal On Path: /tools?cmd=event,TurnOn
Internal Off Path: /tools?cmd=event,TurnOff
I see the default in URI Switch uses GET
I have a wifi relay on the local network at 192.168.1.210 that can be turned on/off in this way. I can get it working using Webcore, but I would prefer something that’s not cloud based.
Generally, with a POST request, a payload is needed. Usually a beater token for auth or some other kind of json payload like {action:“on”} or something. It depends on what the device expects. Usually noted in the API documentation.
Troy, I know this post is a few years old but its the best I could find regarding this topic and I’m hoping you (or someone else) can help point me in the right direction. I’m a newbie at programming and am attempting to use your handler to activate a webapi on my Synology Surveillance System NAS. The url trigger turns on and off “home mode” and I want to tie it to a couple of routines I already have in smartthings. I am running a US customer hub v1.1. My smartthings hub and my NAS are on the same LAN.
I created a switch and assigned it the URI switch parameter. I entered in the following info:
internal IP: 192.168.20.5000
Internal port: 5000
Internal On Path: /webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method=“Trigger”&version=1&eventId=1&eventName=“This is external event1”&account=“automation”&password=“tryThisNow4”
Internal Off Path: same as above
When I test the switch I receive the following log:
7:08:30 PM: debug PUT /webapi/entry.cgi?api=SYNO.SurveillanceStation.ExternalEvent&method=“Trigger”&version=1&eventId=1&eventName=“This is external event1”&account=“automation”&password=“tryThisNow4” HTTP/1.1
Accept: /
User-Agent: Linux UPnP/1.0 SmartThings
HOST: 192.168.0.20:5000
By the way…I’m really new at this and am following the trial and error method. I have tried GET, POST, and PUT (based off of my understanding of other posts in this thread). I’m in trial and error mode right now. Anything to help would be appreciated.