www.homeseer.com    
 

Go Back   HomeSeer Message Board > HomeSeer Products & Services > HomeSeer Software > MyHS Remote Access Service

MyHS Remote Access Service Discussions regarding myHomeSeer Remote Access Service

Reply
 
Thread Tools Display Modes
  #1  
Old November 3rd, 2016, 08:18 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
HELP! myhs redirecting to 127.0.0.1 (localhost)

I'm having a bit of a problem: A few days ago, when I'd go to "myhs.homeseer.com" from a machine on my home network, it'd redirect to the local IP of my HS machine (a headless linux box.) The same thing would happen with access via HSTouch.

However, recently, something broke and any time I try to use "myhs.homeseer.com" from my internal LAN, it's always redirecting to 127.0.0.1. (It appears to do the same with HSTouch.) This happens with EVERY machine on my local network - including mobile phones (if they are on the LAN via wifi.) If any of the machines are NOT on the local LAN, it uses the "myhs" VPN properly.

In order to access the HS webUI from my internal LAN, I have to type the IP address (or hostname) of the linux machine running HS. This is a pain in the rear for the mobile devices...

What broke? Why? How can I fix it?

Thanks
Gary
Reply With Quote
  #2  
Old November 3rd, 2016, 08:29 PM
rmasonjr's Avatar
rmasonjr rmasonjr is offline
OverSeer
 
Join Date: May 2001
Location: Brookhaven, MS USA
Posts: 6,468
Ouch. You might need to clear all browser cookies, etc and log back into myhs. If that doesn't do it, try a reboot on the HS server which should clear ARP tables and let the myhs process get refreshed.

Sent from my SCH-R970X using Tapatalk
__________________

HS3Pro Running on a Raspberry Pi2 (Raspbian)
64 Z-Wave Nodes, 162 Events, 293 Devices
UPB modules via OMNI plugin/panel
Plugins: Z-Wave, BLRF, OMNI, HSTouch, weatherXML, EasyTrigger
HSTouch Clients: 3 Android, 1 Joggler
Reply With Quote
  #3  
Old November 3rd, 2016, 09:36 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
ARP? ARP caches wouldn't cause browser redirects to 127.0.0.1... (arp associates an IPv4 address with an ethernet MAC address. At worst, a trashed ARP cache will still show redirecting to the proper IP, but the machine wouldn't be able to "find" that machine.)

I did manage to get this to start working properly again after the 4th reboot of the linux machine machine AND a few restarts of the HS process itself.

My Best Guess is that:

1. "myhs.homeseer.com" associates a user name with a license ID... and a license ID with both an internal (LAN) and external (WAN) IP address.

2. When someone uses myhs, if they have the same external (WAN) IP address as the HS machine with the matching license ID, myhs sends an HTTP redirect to the stored internal (LAN) IP address.

(At least that seems like a reasonable implementation.)

If my guess is correct, then the internal (LAN) IP address stored by myhs must have been corrupted or erased somehow. (I think most browsers treat redirects to "0.0.0.0" as redirects to localhost.) Or, perhaps, a flaw on my local HS machine caused it to report a "local" IP address from the lo device instead of from the eth0 device?

By restarting the HS software several times, I guess it somehow re-registered my internal (LAN) IP address. Oh, and I got to hear the machine say "Welcome to Homeseer" a few times.
Reply With Quote
  #4  
Old November 12th, 2016, 07:04 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Odd... this issue has come up again. I wonder what is causing it...
Reply With Quote
  #5  
Old November 12th, 2016, 10:54 PM
Kerat Kerat is offline
Seer Master
 
Join Date: May 2016
Location: Colorado USA
Posts: 720
HELP! myhs redirecting to 127.0.0.1 (localhost)

Quote:
Originally Posted by garyd9 View Post
I'm having a bit of a problem: A few days ago, when I'd go to "myhs.homeseer.com" from a machine on my home network, it'd redirect to the local IP of my HS machine (a headless linux box.) The same thing would happen with access via HSTouch.



However, recently, something broke and any time I try to use "myhs.homeseer.com" from my internal LAN, it's always redirecting to 127.0.0.1. (It appears to do the same with HSTouch.) This happens with EVERY machine on my local network - including mobile phones (if they are on the LAN via wifi.) If any of the machines are NOT on the local LAN, it uses the "myhs" VPN properly.



In order to access the HS webUI from my internal LAN, I have to type the IP address (or hostname) of the linux machine running HS. This is a pain in the rear for the mobile devices...



What broke? Why? How can I fix it?



Thanks

Gary

I believe that there is an ini (application root/config/settings.ini) file that allows you to configure your local subnet IP. It is possible that this field is passed to myhs.homeseer.com. In the event that you receive a new DHCP IP address it is feasible that you would not update myhs.homeseer.com.
1. Ensure that you are using either a statically assigned IP address on the server or reserve the IP address in your DHCP server for the server hosting your Homeseer.
2. Update the line (gServerAddressBind) in the settings.ini with the IP address that your are using (static or DHCP reserved)


Sent from my iPhone using Tapatalk
Reply With Quote
  #6  
Old November 12th, 2016, 11:26 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Quote:
Originally Posted by Kerat View Post
I believe that there is an ini (application root/config/settings.ini) file that allows you to configure your local subnet IP. It is possible that this field is passed to myhs.homeseer.com. In the event that you receive a new DHCP IP address it is feasible that you would not update myhs.homeseer.com.
The machine is assigned from a DHCP reservation, so that would be an ideal solution. I've configured it and will report back if the thing breaks again.

Thank you for a reasonable answer. This is considerably better than the nonsense that HomeSeer's support just sent me back.

Just for amusement sake, here's what HomeSeer's support had to say:

Quote:
This is the design of myHS, if you are within your lan it will attempt to connect locally.
Really? It's SUPPOSED to redirect to 127.0.0.1? The first time I read it, I thought the the response was a joke. It's not.

The really sad thing is that I REALLY thought HomeSeer would have better support than SmartThings or Wink. I guess not.
Reply With Quote
  #7  
Old November 12th, 2016, 11:39 PM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 37,009
Quote:
Originally Posted by garyd9 View Post
The machine is assigned from a DHCP reservation, so that would be an ideal solution. I've configured it and will report back if the thing breaks again.

Thank you for a reasonable answer. This is considerably better than the nonsense that HomeSeer's support just sent me back.

Just for amusement sake, here's what HomeSeer's support had to say:



Really? It's SUPPOSED to redirect to 127.0.0.1? The first time I read it, I thought the the response was a joke. It's not.

The really sad thing is that I REALLY thought HomeSeer would have better support than SmartThings or Wink. I guess not.
Why do you think this is an unreasonable answer? Did you try keying in 127.0.0.1 on your HS3 server?
__________________
-Rupp
Reply With Quote
  #8  
Old November 12th, 2016, 11:59 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Quote:
Originally Posted by Rupp View Post
Why do you think this is an unreasonable answer? Did you try keying in 127.0.0.1 on your HS3 server?
Really?

Here's my original support email, just so everything is in context here:
Quote:
I'm having a bit of a problem: A few days ago, when I'd go to "myhs.homeseer.com" from a machine on my home network, it'd redirect to the local IP of my HS machine (a headless linux box.) The same thing would happen with access via HSTouch.

However, recently, something broke and any time I try to use "myhs.homeseer.com" from my internal LAN, it's always redirecting to 127.0.0.1. (It appears to do the same with HSTouch.) This happens with EVERY machine on my local network - including mobile phones (if they are on the LAN via wifi.) If any of the machines are NOT on the local LAN, it uses the "myhs" VPN properly.

In order to access the HS webUI from my internal LAN, I have to type the IP address (or hostname) of the linux machine running HS. This is a pain in the rear for the mobile devices...

What broke? Why? How can I fix it?
So... according to support@homeseer, it's BY DESIGN that myhs should redirect to "127.0.0.1" on machines on the local LAN but that aren't the actual homeseer machine itself. That's pretty clear in the support request... in mentioning it's a headless machine, that it happens with "every machine on my local network" and "including mobile phones." (HS doesn't work on mobile phones, does it?)

So, reading the support request... That support response doesn't sound idiotic to you?

If the redirect to 127.0.0.1 only occured when trying to access myhs from the SAME MACHINE that is running homeseer, that might make sense. However, as my quoted support request makes VERY clear, it's happening from every OTHER machine on my LAN.

Oh, and to directly answer your question, Rupp, no I obviously hadn't done that, and it wouldn't be possible on a "headless linux box." (The closest I could come would be to shell into the headless linux box and try that way... but first I'd have to install a text-based web browser.) Wow.. please tell me your reply is sarcasm (and that I fell for it.) Please...
Reply With Quote
  #9  
Old November 13th, 2016, 12:07 AM
Rupp's Avatar
Rupp Rupp is online now
OverSeer
 
Join Date: Jan 2001
Location: Huntsville, Al. USA
Posts: 37,009
The myHS service sets up a tunnel to your HS3 server, and if you are on your local LAN it will attempt to connect to the HS3 server via 127.0.0.1 through the tunnel. Does http://find.homeseer.com/ work for via a browser?
Reply With Quote
  #10  
Old November 13th, 2016, 12:24 AM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Quote:
Originally Posted by Rupp View Post
The myHS service sets up a tunnel to your HS3 server, and if you are on your local LAN it will attempt to connect to the HS3 server via 127.0.0.1 through the tunnel. Does http://find.homeseer.com/ work for via a browser?
Are you sure? When things are working, and I access myhs from the same LAN as the homeseer machine is on, it normally redirects the access to the internal (private) IP of the homeseer machine (and doesn't use the tunnel.)

It only uses the tunnel when accessing via myhs from outside the local LAN.

The issue I'm having is when accessing from the same LAN as homeseer is running on, and instead of redirecting to the private IP (192.x.x.x), it's redirecting to 127.0.0.1 (and not using a tunnel.)
Reply With Quote
  #11  
Old November 13th, 2016, 04:08 AM
zwolfpack zwolfpack is offline
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 915
When your system is misbehaving in this manner, do the find.homeseer.com search results show your homeseer box at the private address (correct) or the localhost address (incorrect)? If the latter, it would point an issue with the register_with_find.sh script, which I believe is located at /usr/local/HomeSeer on the Linux boxes.
Reply With Quote
  #12  
Old November 13th, 2016, 03:05 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Quote:
Originally Posted by zwolfpack View Post
When your system is misbehaving in this manner, do the find.homeseer.com search results show your homeseer box at the private address (correct) or the localhost address (incorrect)? If the latter, it would point an issue with the register_with_find.sh script, which I believe is located at /usr/local/HomeSeer on the Linux boxes.
I'm not sure. I'll check that the next time I repeat the issue.

I DO think that this might be the proper answer, however. Looking at that script, I'm wondering what happens with "ip addr" if the actual ethernet (or wifi) adapter doesn't yet have an IP address. There's a chance that inserting a delay near the beginning of the script (to give DHCP time to get going) would fix the issue for me. (As well, just manually running that script might do the trick.)

I wonder what code in HS is causing that script to run... ("grep -ri register_with_find /opt/HomeSeer/*" returned nothing.)

(...and I'm wondering if a good work around would be to add that script to the dhclient configuration so it's run anytime I get a new IP address.)

Thank you, zwolfpack.
Reply With Quote
  #13  
Old November 13th, 2016, 03:37 PM
Kerat Kerat is offline
Seer Master
 
Join Date: May 2016
Location: Colorado USA
Posts: 720
HELP! myhs redirecting to 127.0.0.1 (localhost)

Quote:
Originally Posted by zwolfpack View Post
When your system is misbehaving in this manner, do the find.homeseer.com search results show your homeseer box at the private address (correct) or the localhost address (incorrect)? If the latter, it would point an issue with the register_with_find.sh script, which I believe is located at /usr/local/HomeSeer on the Linux boxes.


Gardy9,
Is your HS3 config setup to auto start? If so, do you have it set to wait for network?


Sent from my iPhone using Tapatalk
Reply With Quote
  #14  
Old November 13th, 2016, 03:56 PM
zwolfpack zwolfpack is offline
Seer Master
 
Join Date: Sep 2015
Location: Orange County, California, USA
Posts: 915
Quote:
Originally Posted by garyd9 View Post
I wonder what code in HS is causing that script to run... ("grep -ri register_with_find /opt/HomeSeer/*" returned nothing.)
If its the same as the znet, its run every 5 minutes as a cron job. Check for /etc/cron.d/find

EDIT: also check /etc/rc.local

Last edited by zwolfpack; November 13th, 2016 at 06:28 PM.
Reply With Quote
  #15  
Old November 13th, 2016, 07:21 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Quote:
Originally Posted by Kerat View Post
Gardy9,
Is your HS3 config setup to auto start? If so, do you have it set to wait for network?
Yes (but my network scripts don't block on DHCP.) In fact, depending on if the ethernet cable is plugged in or not, a different interface (and therefore IP reservation) might be used.

(If ethernet isn't attached, or is removed while running, it'll bring up wifi. This is for those rare cases when I need the z-wave stick physically near a device for proper pairing - such as a door lock - but I don't have a wired jack nearby. HOWEVER, any time I've had the 127.0.0.1 issue, the machine was booted on and stayed on ethernet.)

Anyway, it's very possible that a non-loopback interface isn't fully up when homeseer starts. (I could do a few things to fix that, but I'd rather not. I want homeseer up and active even if my switch goes offline, my router dies, my DHCP server takes a dump, etc)

If I can understand the mechanism that myhs uses to associate a local IP address with my license ID (and therefore my login) for purposes of redirecting, then I could probably make an intelligent decision on how to work around the problem. However, all we're doing is taking guesses and trying things... and support@homeseer is being worse than useless.

Regardless, I think it's a bug that it's happening. If homeseer is reporting (via a script, or any other mechanism) to myhs that it's online, then the homeseer box MUST have a valid local IP address. (If it didn't, there'd be no communication with myhs to begin with.)

Quote:
Originally Posted by zwolfpack View Post
If its the same as the znet, its run every 5 minutes as a cron job. Check for /etc/cron.d/find
It's not homeseer hardware, so it won't be there. What I think I want to do at this point is NOT add it to cron.

I'm going to modify that script to touch a file (so I know if it's ever actually being run.) Then, the next time I get into that 127.0.0.1 situation, I'll shell into the box and manually run the script to see it "fixes" the problem or not.

Thank you all for trying to help with this issue. Perhaps HS should pay you folks instead of the person who told me that it's working by design.
Reply With Quote
  #16  
Old November 16th, 2016, 09:02 PM
garyd9 garyd9 is offline
Seer Plus
 
Join Date: Oct 2016
Location: Pittsburgh, PA (USA)
Posts: 91
Update:

I'm currently, at this moment, repeating the problem. (I rebooted hs to install .300.)

"find.homeseer.com" has the proper local IP for my HS3 system, and the timedate stamp shown is AFTER I rebooted. As well, I ssh'd into the linux machine running HS and manually ran "register_with_find.sh" from the HS directory, and it updated the timestamp shown on "http://find.homeseer.com", but access via myhs.homeseer.com is still trying to redirect to 127.0.0.1 (when accessing from another machine on my network that isn't the HS machine.)

One thing in the homeseer log I find interesting is:
Code:
Nov-16 20:07:00	 	Web Server	Web Server started on port 80
Nov-16 20:07:00	 	Web Server	Local IP address is: 127.0.0.1
I'm wondering why it's grabbing the localhost IP instead of the proper eth0 address - and if those log lines are related to what is being sent to myhs.

To that end, I stopped HS on the linux machine (via a manual event script) and restarted it. When it restarted, I saw the following in the log instead of the above:

Code:
Nov-16 20:15:39	 	Web Server	Web Server started on port 80
Nov-16 20:15:39	 	Web Server	Local IP address is: 192.168.x.x
...and... access via myhs.homeseer.com started redirecting to the local local IP address again.

Soooo... This would seem to indicate that HS is coming up before the network adapter has an IP address, and that it doesn't recognize that fact (and doesn't recover from it.)

Sadly, I can't seem to get anyone from HS to support or engage on this issue, so I have no idea what to do with it. Ideally, even if the HS code has the most simplistic of functionality for retrieving the local IP address, it would recognize that 127.0.0.1 is an unroutable (even on a local LAN) localhost address and would retry a few times to get the proper IP address BEFORE trying to report that address to be used by myhs.

@Rupp, being that I know you're reading this thread (and taking the time to chastise me for "slamming" HS support), can you please suggest an avenue I can follow to get HS to look at this issue and perhaps address it?
Reply With Quote
  #17  
Old January 5th, 2017, 02:48 PM
RichardS RichardS is offline
Viewer
 
Join Date: Jan 2017
Location: CO
Posts: 1
Same basic problem

I am running HS3 on a windows machine with a Zee S2 and x-10 protocols on a CM15a. When I try running MYHS it properly recognizes me and then attempts to connect back to the S2. The S2 is on my local network at --.--.--.18 but MYHS tries to tunnel in and connect to --.--.--.03 which was an earlier address assigned when configuring the S2. MYHS then returns an error page saying that --.--.--.03 took too long to respond. What did I do wrong?
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
myHS popping up when I don't have myHS Richel Clients - Android 2 June 12th, 2014 09:45 AM
IIS redirecting to HomeSeer ksum HS2 / HSPRO 18 October 10th, 2012 08:59 AM
Please Wait...redirecting.... Bestgear RFXCOM Plug-In (3P) 2 February 26th, 2010 02:59 PM
Redirecting upon login GenevaDude Web Server and Interface 0 March 19th, 2004 06:53 AM
Redirecting upon login Dennis Tremblay Web Server and Interface 0 January 1st, 1970 12:00 AM


All times are GMT -4. The time now is 11:37 PM.


Copyright HomeSeer Technologies, LLC