Serial Communication with Homeseer

Pop your questions regarding Home automation software here.....

Serial Communication with Homeseer

Postby Verkenner » Thu Feb 17, 2011 11:05 pm

Hi All,

Want to send text to a MK158 Serial-display-kit from Velleman.
http://www.velleman.eu/distributor/prod ... ?id=350997

Connected the RS-232-wiring with 2 wires (Ground and Data).
With terminal emulator FOXTerm I send (and read) to the MK158 terminal. That works (with win7) with speed 2400 b/s.

But sending text from Homeseer to the display only B~ is on the Velleman-display.

In the HS-logging (no errors):
17-2-2011 21:33:22 Event Event Trigger "Com Port"
17-2-2011 21:33:22 Event Running script in background: comport.txt


This is the HomeSeer-script in the Event:

sub main()
Dim PortNumber
Portnumber=8
hs.OpenComPort PortNumber,"2400,N,8,1",1,"",""
hs.SendToComPort PortNumber,"Biertje?"
hs.Closecomport PortNumber
end sub


Perhaps the script is ok.
But is handshaking needed? Or VCC (+) wiring?
Anybody connected this Velleman-MK158 to Homeseer?


Any help appeciated !
Verkenner
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 337
Joined: May 2008
Location: Netherlands

Re: Serial Communication with Homeseer

Postby esschenk » Thu Feb 17, 2011 11:52 pm

Hello Verkenner,

I Have made a homemade Serial Display
mayne this will help
I dont no if the commands are usefull
dont forget to open the comport in the startup script

http://www.domotica.famschenk.eu/Wireless_Display.html

Ed
User avatar
esschenk
Member
Member
 
Posts: 425
Joined: February 2008
Location: Netherlands

Re: Serial Communication with Homeseer

Postby Digit » Fri Feb 18, 2011 12:05 am

Maybe you have to add a Carriage Return (CR), Chr(13) .
Check the manual.
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

Re: Serial Communication with Homeseer

Postby Verkenner » Fri Feb 18, 2011 10:29 am

Sorry next time in English.

Ed, Digit, dank voor de hulp.

Naar aanleiding van jullie suggesties en voorbeelden heb ik het script aangepast.
Dit werkt wel:

sub main()
Dim PortNumber
Portnumber=8
hs.OpenComPort PortNumber,"2400,N,8,1",1,"",""

hs.SendToComPort PortNumber,"1"
hs.WaitSecs 1
hs.SendToComPort PortNumber,"2"
hs.WaitSecs 1
hs.SendToComPort PortNumber,"3"
hs.WaitSecs 1
hs.SendToComPort PortNumber,"4"
hs.WaitSecs 1
hs.SendToComPort PortNumber,"5"
hs.WaitSecs 1
hs.SendToComPort PortNumber,"6"

hs.Closecomport PortNumber
end sub


De oorzaak lijkt een timing probleem (mede omdat de MK158 geen handshaking heeft).
En wellicht omdat de COM-poort van de PC veel sneller is.

Groet van Verkenner
Last edited by Verkenner on Fri Feb 18, 2011 6:07 pm, edited 1 time in total.
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 337
Joined: May 2008
Location: Netherlands

Re: Serial Communication with Homeseer

Postby Digit » Fri Feb 18, 2011 10:57 am

What, en er komt nog steeds "Biertje?" op het scherm?? :lol:
User avatar
Digit
Global Moderator
Global Moderator
 
Posts: 3388
Joined: March 2006
Location: Netherlands

HS.walking-fridge

Postby Verkenner » Fri Feb 18, 2011 6:57 pm

Yes, with this script :D

10 Loop:
20 hs.Open-the-fridge
30 hs.SendToComPort PortNumber,"5", fetch a bottle
40 hs.WaitSecs 1
50 hs.SendToComPort PortNumber,"B", fetch a bottle
60 hs.WaitSecs 1
70 hs.SendToComPort PortNumber,"I", fetch a bottle
80 hs.WaitSecs 1
90 hs.SendToComPort PortNumber,"E", fetch a bottle
100 hs.WaitSecs 1
110 hs.SendToComPort PortNumber,"R", fetch a bottle
120 hs.close-the-fridge
130 Do loop as long as Temp_Fridge is <5 degrees C

HIK :D
Verkenner
Best regards, Verkenner
Verkenner
Member
Member
 
Posts: 337
Joined: May 2008
Location: Netherlands


Return to Questions & Discussions Forum

Who is online

Users browsing this forum: No registered users and 1 guest