HTTPS for meteohub

Moderator: Mattk

Post Reply
thoms
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Tue May 12, 2009 11:59 pm
Location: France

HTTPS for meteohub

Post by thoms » Wed Dec 09, 2009 7:31 pm

Hello,

I set up recently a HTTPS connection for my Meteohub server using stunnel. My server is an HP Thin Client running the X86 Meteohub server 4.5i. In case you might be interessed in, here is how I did it.

Stunnel4 installation
With Debian installer apt-get, this part is really easy. Just pay attention to the 4 at the end of stunnel or you will get the previous stunnel version.

Code: Select all

apt-get install stunnel4
Debian specific configuration
Edit /etc/default/stunnel4 and change

Code: Select all

ENABLED=0
into

Code: Select all

ENABLED=1
SSL configuration for Stunnel

In order to cypher connections, stunnel must have a SSL certificate. If you don't have yours, you can generate an autosigned certificated this way :

Code: Select all

cd /etc/stunnel4
openssl req -new -x509 -nodes -days 365 -out stunnel.pem -keyout stunnel.pem
Stunnel4 configuration

Edit /etc/stunnel4/stunnel.conf and insert these lines :

Code: Select all

cert = /etc/stunnel/stunnel.pem
key = /etc/stunnel/stunnel.pem
At the end of the file, comment these lines avoid activating useless services.

Code: Select all

;[pop3s]
;accept  = 995
;connect = 110
;[imaps]
;accept  = 993
;connect = 143
;[ssmtp]
;accept  = 465
;connect = 25
And uncomment the [https] section :

Code: Select all

[https]
accept  = 443
connect = 80
TIMEOUTclose = 0
[Re]start stunnel

Code: Select all

/etc/init.d/stunnel4 restart
You can now connect to your server with HTTPS.

User avatar
HeinrichH
Gold Boarder
Gold Boarder
Posts: 187
Joined: Sun Jan 04, 2009 6:27 pm
Location: Emmen-Netherlands / Panoias-Portugal
Contact:

Re:HTTPS for meteohub

Post by HeinrichH » Wed Dec 09, 2009 11:00 pm

Sorry, not interested in https access but you wrote your server is a HP Thin Client.
My server is also a HP thin Client T5730.
Are you running the system with Windows XP embedded or did you also change the configuration?
I changed the DOM for a 2.5 inch HD and installed Windows XP pro, Meteohub is running under VMware and there are some other programs running on this PC.
Checking the remote....

netsigi
Senior Boarder
Senior Boarder
Posts: 72
Joined: Wed Aug 05, 2009 7:27 pm

Re:HTTPS for meteohub

Post by netsigi » Wed Dec 09, 2009 11:07 pm

This is the good old "embedded" way to have a ssl connection. I had a few discussions about security with the developer. He clearly states also, that meteohub is intended to be in a "secure home environment" a.k.a at least good old IPv4 behind NAT. I would prefer a newer httpd. Maybe lighthttpd, xs-http or nginx.

But as quick "workaround" the solution is a improvement over stock meteohub.

thoms
Fresh Boarder
Fresh Boarder
Posts: 5
Joined: Tue May 12, 2009 11:59 pm
Location: France

Re:HTTPS for meteohub

Post by thoms » Thu Dec 10, 2009 11:35 am

HeinrichH wrote:Sorry, not interested in https access but you wrote your server is a HP Thin Client.
My server is also a HP thin Client T5730.
Are you running the system with Windows XP embedded or did you also change the configuration?
I changed the DOM for a 2.5 inch HD and installed Windows XP pro, Meteohub is running under VMware and there are some other programs running on this PC.
My HP Thin Client runs Meteohub X86 version (Linux Debian Etch'n'half). I also replaced the DOM by a 40Gb hard drive. Some people also use a CF card adapter. I made a post about the installation here : http://www.meteohub.de/joomla/index.php ... =4778#4778

Neeraj123

Re:HTTPS for meteohub

Post by Neeraj123 » Mon Feb 08, 2010 1:41 pm

I have a MeteoHub device that connects to our weather station in the office and stores the sensor values from various hygrometers in our office. They have an HTTP data request model that seems to be pretty extensive in what you can request (located here: http://www.meteohub.de/joomla/index.php ... &Itemid=29 ).

What I want to do is get some way of parsing this data from the MeteoHub in a Cacti data source so I can graph the temperature and ambient humidity in the office. I'd want to break down the data for the 4 sensors we have: thb0, th0, th5, and th6.

One caveat is that some of the sensors check in every 90 seconds and not every 60, so in order to poll the source every minute, it would have to request a broader time range in the HTTP GET and use only the most recent value.

Also, the data is stored on a filesystem in a plain-text document, so if accessing the log file and parsing for the data would be an easier path let me know. I can close this question and open a new one with that in mind.

Post Reply