Hulp gevraagd met een script (ook tegen betaling)

Forum over Homeseer scripts (DUTCH forum)

Moderators: TANE, Ruud

Post Reply
angel
Starting Member
Starting Member
Posts: 10
Joined: Wed Mar 04, 2009 2:22 pm
Location: Belgium

Hulp gevraagd met een script (ook tegen betaling)

Post by angel »

Hello, i have a proprietry light automation system which has all data in xml files. This system sends commands directly to a serial port (in my case com1). What i want to do is the following. Make use of virtual devices in HS and when clicked on/off trigger an event which send a txt file containing the commands to the serial port. I have been browsing the forum, but could not find a script which i can use (re use). What i am looking for is a script which does the following and if anybody out there is willing to help me, i would be more then thankful! This is what i need:

Baudrate is 9600bps, 8, 1, N

This is my understanding of the ASCII decimal protocol of the max200... In order to send a command:

1) wait for 'M' = 77 in decimal....
2) send 'C2' = 6702 in decimal, within 26 ms.
3) wait 80-100 ms.
4) send a decimal command like 650002.

And what you read above is what i would like to see in a HS script (txt file), whereby the 650002 is a parameter (i can copy and paste and have a number of script, one per light point, so it being a parameter is not a requirement).

Anybody able to help me??????

Many thanks in advance!
User avatar
b_weijenberg
Forum Moderator
Forum Moderator
Posts: 1744
Joined: Sun May 14, 2006 4:32 pm
Location: Netherlands

Hulp gevraagd met een script (ook tegen betaling)

Post by b_weijenberg »

Wanneer wordt de M gestuurd? Dit omdat binnen 26ms de C2 gestuurd moet worden.

Als bijlage een begin voor je. (met gratis fouten)
Succes

<b>Download Attachment:</b> [img]images/icon_paperclip.gif[/img] MAX200.txt<br />3.83KB
Post Reply

Return to “Homeseer Scripts Forum”