sendrf Not Working

Started by k22, November 18, 2007, 04:45:09 PM

Previous topic - Next topic

k22

I cannot get sendrf to work on Windows XP Pro SP2 using the CM19A and VB.net.  What am I doing wrong?  I can receive commands flawlessly and am using the most updated driver that I can find.

Imports ActiveHomeScriptLib
Public Class Form1
    Dim WithEvents ActiveHomeObj As ActiveHomeScriptLib.ActiveHome
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ActiveHomeObj = New ActiveHome
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ActiveHomeObj.SendAction("sendrf", "a2 off")
    End Sub
End Class

Tuicemen

Quote from: k22 on November 18, 2007, 04:45:09 PM
I cannot get sendrf to work on Windows XP Pro SP2 using the CM19A and VB.net.  What am I doing wrong?  I can receive commands flawlessly and am using the most updated driver that I can find.

Imports ActiveHomeScriptLib
Public Class Form1
    Dim WithEvents ActiveHomeObj As ActiveHomeScriptLib.ActiveHome
    Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        ActiveHomeObj = New ActiveHome
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        ActiveHomeObj.SendAction("sendrf", "a2 off")
    End Sub
End Class

Heres what works for me:
Option Strict Off
Option Explicit On
Imports ActiveHomeScriptLib
Public Class Form1
Dim WithEvents X10Obj As ActiveHomeScriptLib.ActiveHome
Dim trx10 As Transx10Class

Private Sub Form1_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Try
            X10Obj = New ActiveHome
        Catch
            MsgBox("This program requires X10's ActiveHomePro SDK software for X10 remote control operation!", MsgBoxStyle.Information)
        End Try
End sub

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
trx10.Intialize(X10Obj)
trx10.transmit("A2", "SendRF", "ON)
End sub
End Class

Hope this is helpful! ;)
Please Read Topic:
General Forum Etiquette
Before you post!

k22


Tuicemen

I pulled the code quickly from a Program,that uses X10 code over the phone line!
It was a Class I had to make to enable! Sorry for the confusion! :-[
Your send action code should be:
dim housecode as string="a2"
dim power as string="off"
ActiveHomeObj.SendAction("sendrf", housecode + " " + power)

Sending house code and power as one has never worked for me! :(
Please Read Topic:
General Forum Etiquette
Before you post!

PrimeGuild

Well, the RF is normally received by a Transreceiver module which in turn sends a PLC over the lines, so if it works for you, you could try sending a PLC instead of an RF.

SMF spam blocked by CleanTalk