Active TopicsActive Topics  Display List of Forum MembersMemberlist  Search The ForumSearch  HelpHelp
  RegisterRegister  LoginLogin
PowerHome Programming
 PowerHome Messageboard : PowerHome Programming
Subject Topic: support for temperhum software Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 01 2013 at 02:38 | IP Logged Quote krommetje

Hi all,

Can PH be used for reading or interfacing with TEMPERHUM software? Maybe a VB.NET intergration possible?

software e.g. API-call for VB.NET can be dl. here:

Scroll down to half the page

There is also UTAC but my test-stick has not been able to interface with this package

Edited by krommetje - February 01 2013 at 03:21
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 08 2013 at 04:15 | IP Logged Quote krommetje

Here is an update:

been working on a macro to import temperature, humidity and dewpoint from a TEMPERHUM USB key and here is howto:

Go into OPTIONS of the temperhum software and set logging to CSV into the directory of your desire.

TEMPERHUM software writes a filename like this:

2013-2-8 9h34m8s.csv

I need a workaround for this to give the log a filename which is easier tom work with, how I still have to figure out...

the macro I have created up until now:
Code:

insert into macroheader values ('TEMPERTEST','TEMPERTEST',1,0,1);
insert into macrodetail values ('TEMPERTEST',1,26,'',NULL,'START',1,'','');
insert into macrodetail values ('TEMPERTEST',2,27,'',NULL,'if(ph_fileexists("c:\logs\2013-2 -1 10h8m23s.txt") = 0,"WAIT","")',1,'','');
insert into macrodetail values ('TEMPERTEST',3,15,'[LOCAL1]',NULL,'ph_readfile("c:\logs\2013-2-8 9h34m8s.csv")',0,'','');
insert into macrodetail values ('TEMPERTEST',4,38,'',0,'ph_deletefile("2013-2-8 9h34m8s.csv") ',1,'','');
insert into macrodetail values ('TEMPERTEST',5,10,'TEMPER1',NULL,'RIGHT(ph_getvar_s(1,1),40 )',0,'','');
insert into macrodetail values ('TEMPERTEST',6,10,'TEMPER',NULL,'DEC(LEFT(right("{TEMPER1}" , 40),5))',0,'','');
insert into macrodetail values   ('TEMPERTEST',7,10,'TEMPERHUMID',NULL,'DEC(right(left("{TEMP ER1}", 13),5))',0,'','');
insert into macrodetail values   ('TEMPERTEST',8,10,'TEMPERDEWPOINT',NULL,'DEC(right(left("{T EMPER1}", 18),4))',0,'','');
insert into macrodetail values ('TEMPERTEST',9,38,'',0,'ph_writefile("c:\logs\temperhist.lo g",0,ph_getvar_s(1,1))',1,'','');
insert into macrodetail values ('TEMPERTEST',10,26,'',NULL,'WAIT',1,'','');
insert into macrodetail values ('TEMPERTEST',11,31,'',NULL,'60',1,'','');
insert into macrodetail values ('TEMPERTEST',12,27,'',NULL,'"START"',1,'','');


the macro is pretty straightforward: I read the file and store it in [LOCAL1] then I store the last 40 chars of the file in a GV named TEMPER1. Then I filter out the needed values and store them I their seperate GV's

like I said: I need a workaround for the filename, once PH restarts or the temperhum software restarts, the filename changes as well....

edit: check the code for spaces added by the board software!

Edited by krommetje - February 08 2013 at 04:17
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 17 2013 at 06:06 | IP Logged Quote krommetje

Can Someone help me with the workaround for the filename?
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 17 2013 at 07:50 | IP Logged Quote TonyNo

What do you need?
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: February 18 2013 at 23:26 | IP Logged Quote krommetje

The Temperhum software writes the logfile with a name like this:

2013-2-1 10h8m23s.txt

... the name is equal to the startup Date and Time of the software

So each time when the Temperhum software restarts a different logfilename exists so you should ech time you have to restart (or the logfile grows enormously) you have to manually enter the new logfilename into the macro.

you see what I mean?
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 
TonyNo
Moderator Group
Moderator Group
Avatar

Joined: December 05 2001
Location: United States
Online Status: Offline
Posts: 2889
Posted: February 19 2013 at 07:32 | IP Logged Quote TonyNo

Oh, wow. That complicates things.
Back to Top View TonyNo's Profile Search for other posts by TonyNo Visit TonyNo's Homepage
 
krommetje
Super User
Super User
Avatar

Joined: December 29 2004
Location: Netherlands
Online Status: Offline
Posts: 695
Posted: May 18 2013 at 03:02 | IP Logged Quote krommetje

Found this page:

http://www.property-protection.nl/Temper/

the OCX can be found here too but also here

maybe this helps?

Edited by krommetje - May 18 2013 at 03:06
Back to Top View krommetje's Profile Search for other posts by krommetje Visit krommetje's Homepage
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum