navitron
 
Renewable Energy and Sustainability Forum
UK's most popular Renewable Energy Forum May 24, 2012, 12:24:15 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Anyone wishing to register as a new member on the forum is strongly recommended to use a "proper" email address - following recent spam/hack attempts on the forum, all security is set to "high", and "disposable" email addresses like Gmail, Yahoo and Hotmail tend to be viewed with suspicion, and the application rejected if there is any doubt whatsoever
 
Recent Articles: UPDATE ON DECC APPLICATION FOR LEAVE TO APPEAL TO THE SUPREME COURT | Yingli Green Energy's PV Module Ranks No.2 in TUV Rheinland Energy Yield Test | Navitron Solar Showers at Glastonbury for Year 5!
   Home   Help Search Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: TDC3-e Controller - Help with Web Access  (Read 2276 times)
andyhanson
Newbie
*
Offline Offline

Posts: 17


« on: February 11, 2011, 04:39:42 PM »

Hi All,

I did find a thread about this but it is quite old and wanted to see if anyone had any further information.

I've just connected the controller up to my home network and all is working well.  I can access the controller through the software which is great.  However I'd also like to access the device through the internet while away.  I've accessed the web interface but it asks for a username & password.  Anybody know what the default ones are?  I'm also surprised that the web interface doesn't allow viewing the same GUI that the software displays.  Is there a way to see the graphical depiction via the web interface?  Is it possible to use the software to access the controller from the WAN side?

Many thanks for any additional information.
Logged
wyleu
Guest
« Reply #1 on: February 11, 2011, 06:33:23 PM »

The interface presented at port 80 is the configuration dialog for the ethernet interface, so it really doesn't know anything about the data provided by the TDC. The only way to access it is via the published interfaces. Which are as far as I'm aware is still as the last threads had it. The simple applications C30 and the display scraper make simple calls to the Interface which are documented.

The one thing to be aware of is that you cannot make more than one connection to the device at a time, so you can't have both applications runnng at the same time, if you also suck out data for some other nefarious project then you have to produce a proxy server of some kind to deal with situation.
Logged
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #2 on: February 12, 2011, 09:42:23 AM »

Thanks for the reply.

I've managed to guess the username and password which is admin and blank for password. However what I don't understand is if you enter incorrect login data it brings you to the interface but with no data within the interface. It's then impossible to get back to the login box without using another browser. Hope that makes sense!

The simple display software must be simply scraping data from the controller via the Ethernet adaptor. It should therefore be possible to devise a way to display this data in a web browser rather than standalone software. Also is it not possible to use the software to remotely login? I've managed to set up external access to the web interface by setting another IP address and port. I've then forwarded the port in the router to the controller and used Dyndns to access the controller from the WAN side. However I haven't worked out if you can do this via the software as it seems to only accept an internal IP address. Any ideas?
Logged
EccentricAnomaly
Guest
« Reply #3 on: February 12, 2011, 12:03:08 PM »

However I haven't worked out if you can do this via the software as it seems to only accept an internal IP address. Any ideas?

What do you mean by this?  Do you mean that it only accepts an IP address starting 192.168 or that you can only put an IP address in and not a domain name?

An option that might be feasible depending on your router and any other systems (and would be safer than opening your controller for all to access) would be to access it via SSH.  This would allow the TDC software on you laptop or whatever to connect to a local port on that laptop (e.g., 127.0.0.1:1001 where 127.0.0.1 is a loopback address - the IP address of any computer for itself and 1001 is the port number) which then gets forwarded over an encrypted and authenticated connection to either your router or some other box on your LAN where it is connected to the correct port on the controller.

SSH is pretty standard stuff on Unix-like systems but a bit more esoteric on Windows.  As I understand it PuTTY is an easy way to get most of the capabilities of SSH on Windows though I've only played with it very briefly.
Logged
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #4 on: February 12, 2011, 12:12:39 PM »

However I haven't worked out if you can do this via the software as it seems to only accept an internal IP address. Any ideas?

What do you mean by this?  Do you mean that it only accepts an IP address starting 192.168 or that you can only put an IP address in and not a domain name?

An option that might be feasible depending on your router and any other systems (and would be safer than opening your controller for all to access) would be to access it via SSH.  This would allow the TDC software on you laptop or whatever to connect to a local port on that laptop (e.g., 127.0.0.1:1001 where 127.0.0.1 is a loopback address - the IP address of any computer for itself and 1001 is the port number) which then gets forwarded over an encrypted and authenticated connection to either your router or some other box on your LAN where it is connected to the correct port on the controller.

SSH is pretty standard stuff on Unix-like systems but a bit more esoteric on Windows.  As I understand it PuTTY is an easy way to get most of the capabilities of SSH on Windows though I've only played with it very briefly.

Yes I mean the software will only connect with a LAN IP not a WAN address.  It says 'no such host is known'.  I guess it's only designed to connect to internal IP addresses i.e. 192.168.1.xxx.

I'm not too worried about opening the controller to the web. At present there doesn't seem to be any way to view the data never mind control it but I take your point.  I've used PuTTY before to SSH into other net devices I have.  However I'm not sure how to set it up as you describe.  I see where you're coming from but am not sure which port the software uses to access the data from the controller.  I've given the Ethernet adaptor port 81 for web access but I think this is different to the access port used to actually scrape the data which the software uses.  Anyone know the port number which the TDC software uses?  Is the port number the same for both the display software and the logging software?

Logged
EccentricAnomaly
Guest
« Reply #5 on: February 12, 2011, 01:58:45 PM »

Anyone know the port number which the TDC software uses?  Is the port number the same for both the display software and the logging software?

I did follow the original monster thread on connection to Ivan's TDC at the time, but that was a while ago, but have only dipped into the first couple of pages now.  The model I have in my head is that that TDC3-e is a TDC with a Lantronix box/board inside it.  The Lantronix board has an HTTP interface (port 80 usually, not quite sure what the discussion of port 81 is about) for its own configuration and another port for a straightforward TCP connection which it passes through to the serial port of the main TDC-3 controller.

I think the port mapped to the serial port is 10001 (not 1001 as I gave in my example above) as shown in this screen shot.
Logged
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #6 on: February 12, 2011, 02:03:52 PM »

Anyone know the port number which the TDC software uses?  Is the port number the same for both the display software and the logging software?

I did follow the original monster thread on connection to Ivan's TDC at the time, but that was a while ago, but have only dipped into the first couple of pages now.  The model I have in my head is that that TDC3-e is a TDC with a Lantronix box/board inside it.  The Lantronix board has an HTTP interface (port 80 usually, not quite sure what the discussion of port 81 is about) for its own configuration and another port for a straightforward TCP connection which it passes through to the serial port of the main TDC-3 controller.

I think the port mapped to the serial port is 10001 (not 1001 as I gave in my example above) as shown in this screen shot.

Thanks.

Port 81 is the port I've chosen for HTTP access.  I changed it deliberately from port 80 because I have a NAS drive on port 80 already.

It's the serial port of 10001 I was looking for.

I'll have a play around with PuTTY and see what I can come up with.  However it would have been much easier if Sorel had simply used a GUI web interface instead of writing additional software.  It's an odd choice given that most devices these days with ethernet capability have a user friendly web interface.

Logged
EccentricAnomaly
Guest
« Reply #7 on: February 12, 2011, 02:37:53 PM »

I've used PuTTY before to SSH into other net devices I have.  However I'm not sure how to set it up as you describe.

Here's a screenshot (under Ubuntu) of PuTTY's configuration page for tunnels with an example of the sort of tunnel I think you'd need.

I assume PuTTY under Windows would be the same. I installed it on Ubuntu a while ago to see if it did anything useful but it just seems to be a more awkward (GUI) version of what you can do more straightforwardly from the command line in Linux.

As a sort of worked example, here's the shell script I use to set up tunnels to send and receive e-mail (with the ISP names replaced by "iii" and "jjj" and a server name replaced by "sss").

Code:
#!/bin/bash
ssh -L 2025:mail.iii.com:25 -L 2110:pop3.jjj.co.uk:110 -Nv ed@sss.iii.com

It says that connections to port 2025 on my laptop are to be forwarded, via the account 'ed' on the machine sss.iii.com, to port 25 (SMTP - for outgoing mail) on the server at mail.iii.com and that connections to port 2110 on my laptop are to be forwarded to port 110 (POP3 for incoming mail) on the appropriate server at ISP jjj. My main e-mail account is now actually with ISP iii but they support encrypted POP3 access anyway so I don't need to tunnel that connection.

Of course, this means that I have to tell my e-mail client (Thunderbird) to use the 2025 and 2110 ports instead of the default 25 and 110 for SMTP and POP3 respectively. The reason for doing this is that port numbers below about 1000 (1024?) are privileged and can only be set up by root accounts. Using port 10001 this wouldn't apply and the easiest thing would be to use this port number directly.

I also have to tell Thunderbird to connect back to my laptop ('loopback', IP address 127.0.0.1) rather than to the relevant hosts.  If Thunderbird didn't like using 127.0.0.1 for any reason another option would be to use the actual IP address of my laptop's ethernet interface (192.168.27.7). I think this is more-or-less equivalent to the loopback address in that packets wouldn't actually be sent on the local LAN but their probably would be a bit more overhead fragmenting the stream into smaller packets and copying buffers around. Dunno.


* putty.ssh.screenshot.png (47.19 KB, 567x537 - viewed 258 times.)
Logged
EccentricAnomaly
Guest
« Reply #8 on: February 12, 2011, 02:42:03 PM »

However it would have been much easier if Sorel had simply used a GUI web interface instead of writing additional software.  It's an odd choice given that most devices these days with ethernet capability have a user friendly web interface.

I think they just bought the Lantronix boards and stuffed them in their controllers with a connection to their existing serial ports then extended their existing serial software to connect over TCP.
Logged
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #9 on: February 12, 2011, 02:45:36 PM »

Yes it looks that way.

I'm reading over the previous thread about this again.  It seems some people were getting there without using the supplied software.  If only Sorel had designed their software to accept domain names as well as local IPs then it would have been a lot simpler.

I shall keep plugging away and see what I can come up with.  Hopefully some of the contributors to the previous thread will pop along and update us on their progress  Smiley
Logged
Poolguy
Full Member
***
Offline Offline

Posts: 120



« Reply #10 on: February 14, 2011, 08:23:10 AM »

Andy

I've also answered you on the other thread.

Look into
www.poolguyenergy.com

This software is written specially for this application;

Email me if you want more info
enquiries@poolguy.fr

Andrew
Logged

Navitron Distributor for France
Akvaterm Distributor for France
SUNeLog Distributor
Elite Thermal Cover European Distributor
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #11 on: February 14, 2011, 12:43:36 PM »

Many thanks.  I'll have a look at the website and email you.

Have another bigger problem at present.  I now can't get the TDC3 to connect at all.  Have tried disconnecting power to the controller and reapplying but access is still not working either through the software or trying to access the web interface.

Any suggestions on getting the connection back?  Any way to reset the controller so it defaults to factory settings including the ethernet adaptor?
Logged
wookey
Hero Member
*****
Offline Offline

Posts: 2672


WWW
« Reply #12 on: February 15, 2011, 12:01:49 AM »


Port 81 is the port I've chosen for HTTP access.  I changed it deliberately from port 80 because I have a NAS drive on port 80 already.

This suggests confusion. Every port is available on every IP address, so when you access a NAS at say 192.168.1.2:80 that doesn't 'use up' port 80 on any box except that one. So you can still access the TDC on 192.168.0.50:80 (or whatever IP it is on).

Anyway it's the serial port which is interesting on 10001. Easiest way to access that is with telnet:
telnet 192.168.0.50 10001
then enter TDC serial commands.  (you could also use nc, but that more binary-oriented then telnet). I can't see the point of messing about with ssh tunnels for this simple access.

Ah, checking the original thread I see that the serial protocol is binary rather than ascii based so you'll need to work a little harder to get data out of it. Use the perl tests djh provided, and the module he wrote as a basis for  automatable access.
Logged

Wookey
EccentricAnomaly
Guest
« Reply #13 on: February 15, 2011, 10:15:18 AM »

This suggests confusion. Every port is available on every IP address, so when you access a NAS at say 192.168.1.2:80 that doesn't 'use up' port 80 on any box except that one. So you can still access the TDC on 192.168.0.50:80 (or whatever IP it is on).

It would, however, "use up" port 80 on his router as seen from the WAN side if the router can do NAT on IP addresses but not map ports: accessing port 80 from the wild internet would map to port 80 on the NAS drive, accessing port 81 to port 81 on the TDC. My Netgear DG834, for example, won't map ports as far as I can see.

Quote
Anyway it's the serial port which is interesting on 10001. Easiest way to access that is with telnet:
telnet 192.168.0.50 10001
then enter TDC serial commands.  (you could also use nc, but that more binary-oriented then telnet). I can't see the point of messing about with ssh tunnels for this simple access.

Andyhanson said the TDC-provided software could only access "local" IP addresses.  He wasn't clear (much confusion) whether he really meant local or just direct IP addresses rather than domain names. Still, if he really meant local then an SSH tunnel would allow the TDC to appear to be local.

Actually, I suspect that if he typed the IP address of his home router's WAN interface into the TDC software it'd work fine.

Another reason for using SSH would be to avoid exposing the TDC port to any passing port scanner.  The chances of anything really malicious (somebody changing settings to cause a stagnation, for example) happening are tiny but there is the chance that it might get DOSed - the Lantronix board seems to only support a single connection, doesn't it?

One thing we didn't discuss was where the SSH daemon was going to run.  I was rather assuming that he could SSH into his NAS box.

Quote
Ah, checking the original thread I see that the serial protocol is binary rather than ascii based so you'll need to work a little harder to get data out of it. Use the perl tests djh provided, and the module he wrote as a basis for  automatable access.

Why not just use the provided software as the OP was trying to do?
Logged
andyhanson
Newbie
*
Offline Offline

Posts: 17


« Reply #14 on: February 15, 2011, 11:09:41 AM »

There shouldn't have been confusion with regards the IP address.  I stated the software only accepts internal IP addresses i.e. local IPs within the LAN.  It will NOT accept domain names OR the WAN IP through the router.  The software must be specifically written to only accept local IP addresses which is odd.

Anyway at present the controller is still completely inaccessible and there doesn't seem to be a way of resetting the Ethernet adaptor.  I've reset the controller to factory defaults but as the Ethernet is a third party addon it doesn't seem to reset this. 
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!