Hi,
I just switched over from Vera to Homeseer. I know my way around with LUA and programming plugins in Vera but HomeSeer is a whole new ball game. I've never scripted in C# nor VB.
I hope someone can answer some of my questions.
I'm running HS3Pro on a Linux Debian Jessie VM.
1. VB vs C#
The HomeSeer documentation states that C# offers better performance over vb scripting still all scripts that are on the updates are written in vb why?
2. Are there other benefits other then performance writing in VB vs C#
3. Where and how should I start?
Should I install Windows with HS3 and Visual studio as a dev client and use the created scripts in the event window of HomeSeer or are there other possibilities for testing the created scripts/plugins.
4. I wanted to start recreating some of my Lua scripts. example doorbell is pressed create 4 variables that saves the picture and push 1 picture by ftp to my server and send 4 pictures to my mail. clear the variables.
just to pick one element of the script. the sendmail is possible in various options
a. the hs.SendEmail (only allows 1 attachement)
b. objEmail.Send (haven't tested this yet.
c. c# new MailMessage(); (see below)
I tried to use
But this gives me the error
Is this because I'm missing some dependencies?
5. Last question. What is the best practice in creating events.
Use the GUI as much as possible or create a script that will do the same?
I just switched over from Vera to Homeseer. I know my way around with LUA and programming plugins in Vera but HomeSeer is a whole new ball game. I've never scripted in C# nor VB.
I hope someone can answer some of my questions.
I'm running HS3Pro on a Linux Debian Jessie VM.
1. VB vs C#
The HomeSeer documentation states that C# offers better performance over vb scripting still all scripts that are on the updates are written in vb why?
2. Are there other benefits other then performance writing in VB vs C#
3. Where and how should I start?
Should I install Windows with HS3 and Visual studio as a dev client and use the created scripts in the event window of HomeSeer or are there other possibilities for testing the created scripts/plugins.
4. I wanted to start recreating some of my Lua scripts. example doorbell is pressed create 4 variables that saves the picture and push 1 picture by ftp to my server and send 4 pictures to my mail. clear the variables.
just to pick one element of the script. the sendmail is possible in various options
a. the hs.SendEmail (only allows 1 attachement)
b. objEmail.Send (haven't tested this yet.
c. c# new MailMessage(); (see below)
I tried to use
Code:
public void email_send() { MailMessage mail = new MailMessage(); SmtpClient SmtpServer = new SmtpClient("SMTP-SERVER"); mail.From = new MailAddress("FROM-EMAIL"); mail.To.Add("TO-EMAIL"); mail.Subject = "Test Mail - 1"; mail.Body = "test"; SmtpServer.Port = 25; SmtpServer.Send(mail); }
Code:
he type or namespace name `MailMessage' could not be found. Are you missing a using directive or an assembly reference? {interactive}(17,5): error CS0246: The type or namespace name `SmtpClient' could not be found.
5. Last question. What is the best practice in creating events.
Use the GUI as much as possible or create a script that will do the same?
Comment