Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 04, 2016, 02:08:32 AM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Simple Sensatronics Tray Tool...  (Read 10606 times)

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
IDEA: Simple Sensatronics Tray Tool...
« on: January 17, 2012, 07:54:05 AM »
Hello!  I am a big fan of Sensatronics sensors, especially because we use one at our house to monitor the current temperature.  Although the protocol to access it is very simple, I cannot find a simple tray tool to do what I would like.  Released as freeware, I think this tool would be very useful.

Suggestions:

-sit in the system tray
-display the current temperature
-display red if over 80 degrees, black, and blue at 32 or below
-when you click it, it displays an empty box to type in the IP address of the unit
-it compares the current value with the previous value, and shows horizontal arrow if no change,
up arrow if temperature is rising, and down arrow if temperature is falling
-allow you to select interval for checking (1 min. /5 min. /10 min.)


All the other programs are either huge memory hogs, cost $500, or do too much.  If something small like this isn't too complicated to write, I think it would be pretty neat!  The most common products are the E4 and EM1. 

Here is the protocol it uses:

"Write Your Own
 
The Model E Temperature monitor runs an internal Web server that
listens for TCP/IP HTTP /GET requests on Port 80, and responds to
three different URL requests – /index.html, /temp and /config.
 
/index.html: This is the main index page that returns an HTML-
formatted Web containing the temperatures of all connected
probes. This index page also provides details about the
Temperature Monitor such as manufacturer, serial number, unit,
and probe names. 
 
/temp: This request will return an HTML-free Web page,
consisting of a simple ASCII string of pipe-delimited data.   
 
The data will be in the format of 
 
“PROBE1_NAME|TEMP|PROBE2_NAME|TEMP…”
 
This URL is typically used by OEMs who are packaging the
Temperature Monitor for use with their own software and need
an easy and efficient way to get at the probe temperature data. 
This URL is also handy for those wishing to write their own
software interface to simply and quickly obtain the temperatures
and incorporate them into their existing Network Management
Software.   
 
Here’s an example:
 
Probe 1| 74.5|Probe 2|35.5|Probe 3| 79.0|Probe 4| 54.4
 
Sensatronics Model E Temperature Monitor                                                                        16

To query the Temperature Monitor from within your own software, you
will need an understanding of TCP/IP Sockets and the HTTP protocol.
Consult the documentation of the specific programming language for
details. After successfully initializing and opening up a TCP/IP socket to
the Temperature Monitor, you will be able to communicate with it using
the HTTP Protocol. 
 
To request the /temp URL simply send the following string
   
“GET /temp HTTP/1.0 <CR><LF><CR><LF>”
 
Using the Telnet command is a convenient way of retrieving data from
the Temperature Monitor. Open a telnet session to the Temperature
Monitor unit’s IP Address on Port 80. 
 
For example, if the Temperature Monitor was configured on IP
192.168.2.101, you would send the following command:
 
telnet 192.168.2.101 80
 
If successful, you will be able to send command directly to the
Temperature Monitor. Recall that one such command is /temp:
 
GET /temp HTTP/1.0
 
Followed by pressing  Enter  twice.
 
This will return a non-HTML ASCII, pipe-delimited string – just as it would
if you were to open your Web browser and type the following in the URL
address bar: 
 
http://192.168.2.101/temp
 
Here’s an example of a return string:
 
Probe 1| 71.3|Probe 2|34.5|Probe 3| 77.0|Probe 4| 52.3
Sensatronics Model E Temperature Monitor                                                                         

Source:  http://www.sensatron...s/manual_model_e.pdf






skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #1 on: January 17, 2012, 12:54:19 PM »
Welcome to the site.  =]  I should be able to help with this.  I'll contact you via PM.

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #2 on: January 17, 2012, 01:16:34 PM »
Oh, wow; thank you!  I've wanted to use this outdoors where it belongs for a long time now, but was dismayed at the lack of little utilities.  Our family uses a Radioshack wireless unit in the dining room, and I got this one so we could check from our computers.

Lots of people would benefit from this program. 

I am very excited!

Thank you for the welcome.  :-) 

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #3 on: January 20, 2012, 07:06:31 PM »
Many thanks to LEDAdd1ct for working closely with me on this.  There are still a few bits and bobs to add but I think it's ready for a public release.  Granted, the audience for this will be limited to folks with Sensatronics sensor units and, after checking prices on their website, they are not cheap.  I think the app turned out well.  Here are some screenshots:

main.pngIDEA: Simple Sensatronics Tray Tool... options.pngIDEA: Simple Sensatronics Tray Tool...

Website | Download
v1.0.1 - 2012-01-20
    + Public release

v1.0.0 - 2012-01-19
    + Private builds.

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #4 on: January 21, 2012, 02:52:13 PM »
The build turned out very, very nicely:

-it's tiny
-it uses barely any memory
-it fits neatly in the system tray
-it offers an optional trend indicator
-it changes color at the upper and lower extremes
-it doesn't write to the registry (completely portable)


kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,120
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #5 on: January 21, 2012, 08:36:01 PM »
Nice work, Skwire!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #6 on: January 21, 2012, 09:41:30 PM »
Thanks.  This was a neat one to code.

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #7 on: January 22, 2012, 11:15:41 AM »
Here are some suggestions humbly submitted for possible future incorporation:

-dump the current temperature with decimal point and degree symbol to simple text file at a specified interval, and overwrite at same interval.  There are programs out there which will work with a simple text file.  So if the temp is 54.3°, and you tell it to write the file in the program's current directory once a minute, then once a minute it writes a text file called "temp.txt" whose sole contents are "54.3°" and nothing else. 

The temperature rises to 55.2°.  After one minute elapses, it overwrites the temp.txt file so that its sole contents are "55.2°" and nothing else. 

-a simple log file with date, time, and current temp.  Each new reading gets inserted on a new line in the text file at an interval of your choosing, say, every 30 minutes:

1/22/12   12:10 P.M.  54.3°
1/22/12   12:40 P.M.  55.2°
1/22/12   1:10  P.M.   57.1°

-resizable, separate window with temperature, including decimal point and degree symbol.  You can choose white text on black background or black text on white background.  Whenever the program polls the temperature server, it updates the window.  When you drag the bottom right corner of the window, it dynamically adjusts the font to be larger or smaller, filling the window.   

I have no idea how hard it is to dump data to a text file or make a window.

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #8 on: January 22, 2012, 01:54:33 PM »
Here's one I thought up while vacuuming (anyone know any good tricks for the spelling on that one?)

-for the trend indicator, it sometimes fluctuates between two values, which may falsely give the impression that the temperature is rising or falling.  Perhaps there could be a check box, and when you check it, it performs a checking function like this:

1)  Look at current value (z)
2)  Look at previous value (y)
3)  Look at previous value (x)

Only show trend indicator rising if:

z > y > x

and,

Only show trend indicator falling if:

z < y < x

else show steady arrow

An example with numbers:

1)  Current value is 52.4°
2)  Previous value was 52.2°
3)  Previous value was 52.2°

Program will show steady arrow

1)  Current value is 52.4°
2)  Previous value was 52.2°
3)  Previous value was 52.0°

Program will show rising arrow

1)  Current value is 52.4°
2)  Previous value was 52.8°
3)  Previous value was 52.8°

Program will show steady arrow

1)  Current value is 52.4°
2)  Previous value was 52.8°
3)  Previous value was 60.1°

Program will show falling arrow

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #9 on: January 22, 2012, 07:57:40 PM »
1)  Look at current value (z)
2)  Look at previous value (y)
3)  Look at previous value (x)

I think we ought to make this default behaviour.  No need for a checkbox.  I'll just put a note in the help tab that the trend indicator will be more accurate after three polls.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #10 on: January 22, 2012, 08:18:18 PM »
Website | Download
v1.0.2 - 2012-01-22
    + Added a third column of temperatures to make the trend indicator more
      representative of the temperature actually trending in a given direction.
      (Thanks, LEDAdd1ct)

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #11 on: January 22, 2012, 09:03:47 PM »
Awesome!

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #12 on: January 23, 2012, 03:03:18 PM »
When I hover my mouse over the trend indicator in the system tray, "S" pops up as the tooltip.

Could we have:

"Temperature Steady"

"Temperature Rising"

and

"Temperature Falling"

?

Also, although the new algorithm appears to be working on the trend indicator arrow in the display table, it doesn't seem to be working on the arrow in the system tray.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #13 on: January 23, 2012, 11:03:15 PM »
See if this build works better for you:

Website | Download
v1.0.3 - 2012-01-23
    + Added trend data to the tray toolip.  (Thanks, LEDAdd1ct)
    ! Fixed an issue where the trend icon didn't match up with the list icon.
      (Thanks, LEDAdd1ct)

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #14 on: January 24, 2012, 04:55:39 PM »
I haven't had a chance to try the new version, but I've been tinkering, and I think I have some quick, useful code.  I made a few requests for additional features, and I see no reason why I shouldn't present those features in a way that will (hopefully?) be easy to integrate into the program as a whole.

Here are the two features I requested:

Feature One

A simple file which contains the current temperature, including decimal and degree symbol, and nothing more.  This file gets overwritten each time the temperature is checked.  This can be used in a variety of other programs.  Here is the code I cobbled together:

FileDelete, C:\current.temp.txt
FileAppend, 73.3°, C:\current.temp.txt
return


How it works:

a)  If a file named "current.temp.txt" exists it gets deleted.

b)  The current temperature gets inserted into a file named "current.temp.txt"


What it needs to work in the program:

1)  The temperature I used, 73.3°, will need to be replaced with whatever value the most recent temperature is, whatever that variable is.

2)  The path I used, "C:\" will need to be replaced with whatever directory the program is run from, i.e., same directory the settings file and executable reside in.  
-------------------------------------------------------------------------------------------------------------------

Feature Two

A log file which appends the date, time, and most recent temperature to a new line in a file.  Here is the code:

FormatTime, CurrentDateTime,, MMM-dd-yyyy h:mm tt
SendInput %CurrentDateTime%
FileAppend,%CurrentDateTime% 73.3°`n, C:\log.txt
return

What it needs to work in the program:

1)  The temperature I used, 73.3°, will need to be replaced with whatever value the most recent temperature is, whatever that variable is.

2)  The path I used, "C:\" will need to be replaced with whatever directory the program is run from, i.e., same directory the settings file and executable reside in.

This will add a new line with the date, time, and current temperature to a file called "log.txt"

I tried a number of different time and date formats, and chose the one I like best, the one I find most intuitive and easiest to read.

-------------------------------------------------------------------------------------------------------------------

Additional Requirements:

1)  A checkbox for each choice in the "Options" screen

2)  A name, such as

"Save most recent temperature to current.temp.txt"

and,

"Write log file to log.txt"

3)  Integrating into the rest of the code  

-------------------------------------------------------------------------------------------------------------------

I apologize for not knowing enough to integrate it myself, but I thought that if you desire something, you should make an effort to figure it out on your own.   :Thmbsup:
« Last Edit: January 24, 2012, 05:04:41 PM by LEDAdd1ct »

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #15 on: January 25, 2012, 09:51:33 AM »
@LEDAdd1ct:  Yep, what you're requesting is rather trivial to implement.  It's a matter of me finding the time to do so.  =]

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #16 on: January 25, 2012, 09:58:56 AM »
Trivial, eh?  And here I was, thinking that after drinking a cup of vegetable juice I'd gained amazing powers of programming. 

 ;D

Thanks for the ping back.  I'm working on getting that gigabit switch for the garage to get this sensor outside in the yard where it belongs!

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #17 on: January 25, 2012, 10:04:37 AM »
Trivial, eh?  And here I was, thinking that after drinking a cup of vegetable juice I'd gained amazing powers of programming.

You know...this is how you start programming...by doing exactly what you did in your post!   :Thmbsup:   I see people all that time that want to program but won't even attempt to do what you did in your post.  Keep on playing with AHK and you'll be making apps in no time.  BTW, just to be clear, my "trivial" statement wasn't meant to belittle your post and efforts.   :) 

Thanks for the ping back.  I'm working on getting that gigabit switch for the garage to get this sensor outside in the yard where it belongs!

I'll try to get your requests implemented soon.    :D

LEDAdd1ct

  • Participant
  • Joined in 2012
  • *
  • default avatar
  • Posts: 12
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #18 on: January 25, 2012, 12:13:30 PM »
Thanks for clarifying. 

It took a lot of googling around and trial and error and copying and pasting and tweaking to make it do what I want.  I can only imagine getting a whole program together! 

AHK really is so versatile.  When I first heard about it, I really only thought about it with respect to sitting in the system tray and performing hotkey functions, shortcuts.  But it can do so much, and the fact that it is in plain English, and you can try it as you go...it's really neat. 


schiznik

  • Participant
  • Joined in 2015
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #19 on: January 22, 2015, 10:34:38 AM »
Hi,

Found this whilst looking for setup info on a sensatronics E4 I've acquired... Now that I've managed to get the probe working, this app seems perfect for keeping an eye on things.

I've set the web page to show temps in Celsius, however the app seems to only show Fahrenheit - I'd like to change the reported temperatures to Celsius if possible rather than Fahrenheit, I couldn't see a way of doing so in the app.

Is this possible? Is the source code available for me to have a go at modifying it myself?

Thanks in advance!

:)

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #20 on: January 22, 2015, 04:36:36 PM »
Hi, schiznik, and welcome to DonationCoder.    :)

I've set the web page to show temps in Celsius, however the app seems to only show Fahrenheit - I'd like to change the reported temperatures to Celsius if possible rather than Fahrenheit, I couldn't see a way of doing so in the app.

Almost three years to the day from the last release.   :D

Website | Download
v1.0.4 - 2015-01-22
    + Added option to use Celsius.  (Thanks, schiznik)

schiznik

  • Participant
  • Joined in 2015
  • *
  • Posts: 2
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #21 on: January 23, 2015, 05:30:07 AM »
wow that was quick!

Seems to be working almost perfectly - the temp initially loads as Fahrenheit but the changes to Celsius after pressing refresh.

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 4,664
    • View Profile
    • Donate to Member
Re: IDEA: Simple Sensatronics Tray Tool...
« Reply #22 on: January 23, 2015, 07:06:35 AM »
Seems to be working almost perfectly - the temp initially loads as Fahrenheit but the changes to Celsius after pressing refresh.

Please verify the bus is fixed in this version:

Website | Download
v1.0.5 - 2015-01-23
    ! Celsius temps didn't display properly until the first refresh.
      (Thanks, schiznik)