iOS Bad URL? Error

Topics related to the TouchControl Server software.
Post Reply
to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

iOS Bad URL? Error

Post by to_me » Mon Jul 30, 2018 11:03 am

Hi,

I am using TouchControl to talk to an Indigo Domotics home automation system. It uses the following https://wiki.indigodomo.com/doku.php?id ... stful_urls for it's format. I am able to get TouchControl to send the commands to the automation server, but every time I do it gives me a pop-up Error on the ipad/iphone as follows: "HTTP request failed with: Unable to create request (bad url?)"

Any suggestions on how to overcome this. An example command that causes this behaviour would be: http://1.2.3.4:8176/devices/office-lamp ... method=put

User avatar
Dave
Site Admin
Posts: 77
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: iOS Bad URL? Error

Post by Dave » Tue Jul 31, 2018 2:27 am

Since it looks like these commands require an HTTP PUT, are you setting the request method of the TC button to "PUT" in the button configuration?

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Mon Aug 06, 2018 12:33 pm

Hi Dave,

I have tried it as all three, GET, POST and PUT. It actually triggers the action correctly as a GET, however, pops up the annoying error message as well.

Interestingly, I can type the exact same command into the iPhone browser and it works correctly.

The only other thing I can possibly think of is that it does give a response, and I am not currently doing anything with that "feedback". But that might be a wild goose chase.

Thoughts?

Tom

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Mon Aug 06, 2018 12:53 pm

Hi Dave,

Yes, I have tried it as a GET, POST and PUT command and played around with it a fair bit. It actually works as a GET command, ie. it triggers the light to change brightness, but then pops up the annoying error message.

I also tried to put the same URL into Safari on the iPhone and that works as expected without an error. Not sure what else to try???

Cheers,

Tom

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Fri Aug 10, 2018 10:19 pm

Hi Dave,

Just had a thought on what might be causing this. When the device triggers the command, a feedback response is sent back to the Touch Control client as follows, could it be that I need to handle this. If, so any suggestions how? I'd probably want to use/parse some of this info for use in the app.



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>Indigo Home Control Server</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<strong>name : </strong>
Dining Hanging Lights<br />
<strong>address : </strong>
0<br />
<strong>addressStr : </strong>
unknown<br />
<strong>brightness : </strong>
0<br />
<strong>classID : </strong>
2<br />
<strong>desc : </strong>
Dining Hanging Lights<br />
<strong>devProtocol : </strong>
999<br />
<strong>displayInUI : </strong>
True<br />
<strong>displayLongState : </strong>
0%<br />
<strong>displayRawState : </strong>
0<br />
<strong>folderID : </strong>
990802458<br />
<strong>hasStateToDisplay : </strong>
True<br />
<strong>id : </strong>
6045968<br />
<strong>isOn : </strong>
False<br />
<strong>lastChanged : </strong>
587252660<br />
<strong>lastChangedDateStr : </strong>
2018-08-10<br />
<strong>lastChangedRFC3339 : </strong>
2018-08-10T11:44:20Z<br />
<strong>lastChangedRFC822 : </strong>
Fri, 10 Aug 2018 11:44:20 GMT<br />
<strong>lastChangedTimeStr : </strong>
09:44:20 PM<br />
<strong>type : </strong>
C-Bus Dimmer Channel<br />
<strong>typeFlags : </strong>
19<br />
<strong>typeIsDimmer : </strong>
True<br />
<strong>typeIsHVAC : </strong>
False<br />
<strong>typeIsLock : </strong>
False<br />
<strong>typeIsMultiIO : </strong>
False<br />
<strong>typeIsOpenClose : </strong>
False<br />
<strong>typeIsSensor : </strong>
False<br />
<strong>typeIsSpeedControl : </strong>
False<br />
<strong>typeIsSprinkler : </strong>
False<br />
<strong>typeSupportsDim : </strong>
True<br />
<strong>typeSupportsEnergyMeter : </strong>
False<br />
<strong>typeSupportsHVAC : </strong>
False<br />
<strong>typeSupportsIO : </strong>
False<br />
<strong>typeSupportsOnOff : </strong>
True<br />
<strong>typeSupportsSensorValue : </strong>
False<br />
<strong>typeSupportsSpeedControl : </strong>
False<br />
<strong>typeSupportsSprinkler : </strong>
False<br />
<strong>versByte : </strong>
0<br />
<a href="/devices/Dining%20Hanging%20Lights.html/edit">Edit Attributes</a>
</body>
</html>

User avatar
Dave
Site Admin
Posts: 77
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: iOS Bad URL? Error

Post by Dave » Sat Aug 11, 2018 3:59 am

Curious if you turn off feedback for this button, do you still get the error? I realize it sounds like you probably do want the feedback, but just wondering if that keeps the error from popping up?

Also do you current have any feedback script defined for that button?

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Sat Aug 11, 2018 6:29 am

Hi Dave,

Yes the issue occurs with or without the feedback button selected.

I do not have any code trying to parse that info yet. I'm still learning your software and how it will work for me. Havent got past this point. I'm wondering if the fact that I am not parsing the reply might be causing the issue.

If you want any wireshark pcaps, I could get them for you too, just let me know if you think it would help.

User avatar
Dave
Site Admin
Posts: 77
Joined: Mon Dec 01, 2014 12:41 pm
Contact:

Re: iOS Bad URL? Error

Post by Dave » Sat Aug 11, 2018 12:21 pm

Simply receiving feedback should not cause that error, whether you are parsing the feedback or not. Would it be possible for you to create a simple activity that only contains that one button that is generating the error and then export the activity and send it to me?

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Wed Aug 15, 2018 12:37 am

Hi Dave, I have tried to PM you that info, but it is showing those messages as sitting in the outbox rather than sent items. Not sure if you got the messages??

to_me
Posts: 11
Joined: Mon Jul 30, 2018 10:30 am

Re: iOS Bad URL? Error

Post by to_me » Wed Sep 05, 2018 1:50 am

PROBLEM SOLVED

This issue was fixed by simply using the "[quiet]" command in the feedback section for that Button.

Cheers,

Tom

Post Reply