Status Not Updating

Does MobiLinc report a string a numbers (x.x.x.x) for a device you own? Report it here!

Status Not Updating

Postby CRMiami » Thu Jan 28, 2010 3:24 pm

Hello,

I'm using iLinc Pro with an ISY99i. I'm rather new to adding smarthome capability to my house, however, so far everything has been a breeze to install. I have very good electrical and technical expertise. When I set up my ISY99i, I opened ports 80 and 443 to the device and configured it with a strong password. I logged into my linux router and entered some prerouting rules to port forward 80 and 443 to my ISY99i's internal IP address.

I then downloaded iLinc Pro for the iPhone right away and set it with the following settings:
Host Type: ISY
UserName: xxxxxxx
Password: xxxxxxx
Local: http://192.168.xxx.xxx
Local Port: 80
SSL: https://www.mydomainname.net
SSL Port: 443
Connect Method: HTTPS
UUID of ISY: Remote ISY

Remotely, the device syncs up fine, however intermittently won't show my programs. If I issue commands through iLinc Pro to the ISY, they always execute 100% of the time. My biggest problem though is that the device status is very unreliable and either does not display or is very very delayed to the point where I have to leave the program and start it again or re-sync it in settings to get it to show anything, this happens about 95% of the time. I've tested my connectivity and I consistantly get 3G in my area and am able to pull between 1-2 Mbit/s on my iPhone.

I have configured the web server timeout to the highest value in hopes that this would solve the issue, but it has not. I know the connectivity is there because I can issue commands just fine. I set up a certificate with the ISY by following the documentation and that works just fine. In an effort to troubleshoot, I had even tried different ports (8008,8080) but this did not change anything. I'm running a 6 Mbit/s DSL connection at home, so there's no network latency to speak of. I remotely accessed my ISY99i through the web console and wanted to see if there was an issue with the ISY, so I turned my living room lights up to 50% using the iPhone and I immediately saw the ISY turn the lights on and report the status. I backed out to the device list in iLinc and it did not report a status. Please help!
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby AdminWes » Fri Jan 29, 2010 7:07 am

Hi CRMiami,

Thanks for all the detail about your setup. This makes it easier for me to help with your issue.

Correct me if I'm wrong, but it sounds like you are only connecting over 3G instead of WiFi? The only reason I bring this up is that the real-time status update occurs in a open TCP channel to the ISY. Over WiFi, this seems to be reliable as the iPhone and your local equipment keeps the port open and connected. Over 3G, this can be a different story.

In my testing, keeping a 3G port open is a challenge. What I typicially see is the 3G connection dropping the port connection if there is little or no activity. Which, if all the channel is doing is listening for status update, there is very little traffic. iLinc is set to detect when this drops out and auto-reconnect, however, there are a few known issues with how iLinc manages this connection and display of programs and program updates in version 2.10. I've just released 2.11 to Apple that address a number of performance and stability issues like the one you are seeing and expect approval from Apple in the next couple of weeks.

In the meantime, try navigating back to the home screen of iLinc when you think you've lost the connection. On the homescreen iLinc will verify the subscription channel connection and reconnect if its been lost.

I would also recommend that when you are at home to use WiFi and your local ISY IP address to connect. (Choose Auto for the Connect Method). This will auto connect to your local IP address over HTTP when at home and HTTPS when iLinc detects only a 3G connection (or you are away from your home WiFi network).

Wes
AdminWes
Site Admin
 
Posts: 2153
Joined: Sat Feb 07, 2009 2:52 pm

Re: Status Not Updating

Postby CRMiami » Sat Jan 30, 2010 4:50 pm

Hi Wes,

Thanks for your response. I'm sorry for leaving out detail on WIFI. I have a dual band Linksys WRT-600N set up with one wireless G radio band and one wireless N radio band. I connect my iPhone to the wireless G one and it runs WPA. My routers in my house have had DHCP disabled and I only use them as switches and wireless access points. I use a Debian Linux computer with IPTables as my router, firewall, and DHCP server for the border of my network. I have assigned a static IP address to my ISY99i and everything in my house runs on the same Class C network.

When I connect with WIFI, as I would expect, the iPhone issues commands to my devices with blazing speed, nearly instantly turning them on and off. The status, however, does not update, even on WIFI. If I press query device after performing an action in the hopes that it will pull the device status, it does not report an updated status. I do notice though, through a laptop monitoring the ISY99i on the same network that the query device command is successfully sent to the ISY99i. If I back out to the device list it looks like it tries to update the status, but often I am met with a message that says "Connection Timeout The request to ISY timedout. Please Check the network settings and try again."

As I type this, I'm getting another error "Device Error ISY reported a device error on device - Fan Light (12 6B 3C 1). Please verify device communication." However, I am still able to successfully issue commands to the device. All of this is over WIFI, so the issue does not appear to be limited to a 3G connection.

These issues were with HTTPS selected in settings. If i switch to Auto in the settings status updates over WIFI are nearly instantaneous. Does this mean that even though I'm on WIFI, it won't try to connect using HTTPS with my WIFI connection?

Finally these are the settings in my router in case that helps...
#Port forward traffic on ports 80 and 443 from my external IP to my ISY99i
[0:0] -A PREROUTING -d 74.236.xxx.xxx -p tcp --dport 80 -j DNAT --to 192.168.xxx.xxx
[0:0] -A PREROUTING -d 74.236.xxx.xxx -p tcp --dport 443 -j DNAT --to 192.168.xxx.xxx

#Open ports 80 and 443 on the firewall for traffic passing through the firewall to the ISY99i
[0:0] -A FORWARD -p tcp -d 192.168.xxx.xxx --dport 80 -j ACCEPT
[0:0] -A FORWARD -p tcp -d 192.168.xxx.xxx --dport 443 -j ACCEPT

Assuming the issue is limited to when I am on the 3G connection, the ISY99i doesn't have a firewall that I know of so traffic is definitely getting through to the ISY. I can see communication established with the devices on a tcpdump. I also have the following rules in place to help maintain connections:

[0:0] -A FORWARD -m state --state ESTABLISHED -j ACCEPT
[0:0] -A FORWARD -m state --state RELATED -j ACCEPT

The last thing I tried was to input my static external IP address instead of my domain name in case there was some kind of DNS issue occurring over 3G and there was no difference in behavior.
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby AdminWes » Sun Jan 31, 2010 11:31 am

Hi CRMiami,

Thanks for all this good detail. From what I can tell there may be two reasons the subscriptions aren't working so well for you. What's interesting is this error message: "Device Error ISY reported a device error on device - Fan Light (12 6B 3C 1). Please verify device communication." tells me that the subscription channel does appear to work (at least in part) as this message is only generated when receiving a subscription notice that the ISY couldn't talk to one of your devices in your network.

Question, how many programs is your ISY running? The reason I ask is that version 2.10 has a known performance bug with large program lists (>100) that can cause problems with the stability and performance of iLinc.

Here are two possible things to try:
1. I just released version 2.11 that has a number of performance and stability tweaks to iLinc. It's possible that 2.11 may solve some of your subscription problems.
2. Based on your network configuration it sounds like the traffic from the iPhone to the ISY may go through more than just the wireless router. If you feel like experimentating, try connecting your ISY directly to the router that your iPhone talks to and see if that clears up the subscription performance. I'd like to try eliminating any other equipment that may be shutting down the persistant connection to your ISY.

Do I understand this correctly: "These issues were with HTTPS selected in settings. If i switch to Auto in the settings status updates over WIFI are nearly instantaneous. Does this mean that even though I'm on WIFI, it won't try to connect using HTTPS with my WIFI connection?" Does the subscription and status updates work if you are connected over HTTP? Is the issue just releated to HTTPS connections?

If you have Auto selected when iLinc starts up it looks for your ISY if you are connected over Wi-Fi. If you ISY is found iLinc will auto select HTTP and connect to you ISY that way. If your ISY isn't found or you are on a 3G connection, iLinc will auto connect over HTTPS.

Wes
AdminWes
Site Admin
 
Posts: 2153
Joined: Sat Feb 07, 2009 2:52 pm

Re: Status Not Updating

Postby CRMiami » Sun Jan 31, 2010 4:26 pm

The "Device Error ISY reported a device error on device" error message was something I only saw one time since I've been using the application, it may have been just a one time thing. My ISY only has 9 programs on it. Most of the time when I want to do something I just use the device menu. I have two X10 lamp modules in my bedroom that I got for free and I use some programs to issue commands to them. I will upgrade to 2.11 when it becomes available and will update this thread if it resolves the issue. Regarding the other suggestion, I am not using any wireless routers. I have disabled the router functionality and am using two switches. The only router/firewall is my Linux system at the border of my network. I have monitored the traffic and have confirmed that the packets do route properly. (I am a network engineer, among other things, by trade.)

Something very interesting to note:
    I set both local and SSL addresses to my public IP address while connected over WIFI - Status updates do not work.
    I set both local and SSL addresses to my internal IP address while connected to WIFI - Status updates work over Auto but do not work over SSL. Commands are still received by my devices, however, the status does not update.
    I set my local to my internal address and my remote to my public IP address while connected to WIFI - Status updates work over Auto but do not work if I force SSL. Again, commands are still recieved by my devices, however, the status does not update.

Ah ha! Writing this got me thinking. I set both local and SSL to my public IP and disconnected from WIFI. I changed the setting to force remote connections to use HTTP. Now over 3G my status updates perfectly in real time every time. The issue isn't with getting status updates over 3G, the issue is getting status updates over HTTPS :D . The question is why? Connectivity and routing obviously work back to the ISY, otherwise it wouldn't work over HTTP remotely. As you can see in my previous post, I have the same firewall rules and port forwarding in place for both HTTP and HTTPS, so I'm 100% sure everything is set up correctly network wise. Any thoughts?
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby AdminWes » Sun Jan 31, 2010 6:38 pm

Hi CRMiami,

I agree, it seemed like the issue was releated to HTTPS while HTTP worked fine. Confirm for me what version you are running of the following:

- iPhone 1st, 2nd or 3rd gen
- iPhone OS version (v3.1.2)
- ISY firmware (There is a known communication bug in firmware versions 2.7.6 and earlier that iLinc exposes)

We may need to wait for Apple to approve 2.11 as I did change the subscription HTTPS code path to address a few bugs.

Wes
AdminWes
Site Admin
 
Posts: 2153
Joined: Sat Feb 07, 2009 2:52 pm

Re: Status Not Updating

Postby CRMiami » Mon Feb 01, 2010 7:57 am

Wes,

Thank you for being so responsive!

I'm using the iPhone 3GS
iPhone OS Version 3.1.2 (7D11)
Baseband 05.11.07
Non-Jailbroken
ISY 99i Pro running v2.7.0

It is my understanding that version 2.7.0 is the most recent stable release. If there is another version I should be using, can you please provide me with a link to the firmware download and I will manually update the firmware on my ISY.
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby CRMiami » Tue Feb 02, 2010 2:00 pm

Wes took a look at my system using HTTPS over 3G and everything appears to be working with his 2.11 iLinc update. I will wait until the App Store approves his update and see if that resolves the issue.
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby CRMiami » Fri Feb 05, 2010 12:16 pm

So, the 2.11 release of MobiLinc Pro came out today and it has resolved the issue with the status not updating over HTTPS.

Although I will say I'm not the biggest fan of the new name :-P Bring back iLinc Pro.

Thanks for your work Wes.
CRMiami
 
Posts: 6
Joined: Thu Jan 28, 2010 3:03 pm

Re: Status Not Updating

Postby AdminWes » Fri Feb 05, 2010 12:19 pm

Not a problem. Glad it resolved your issue.

Wes
AdminWes
Site Admin
 
Posts: 2153
Joined: Sat Feb 07, 2009 2:52 pm

Next

Return to Device Support in MobiLinc

Who is online

Users browsing this forum: No registered users and 18 guests