genielabs / x10-lib-dotnet

X10 Home Automation library for .NET / Mono
https://www.nuget.org/packages/XTenLib/
Apache License 2.0
7 stars 8 forks source link

RF send of simple X10 ON/OFF events #1

Closed tuicemen closed 5 years ago

tuicemen commented 5 years ago

This sees RF perfectly (with the CM15) however I and I suspect many others have a need to send RF where a PLC just will not do the trick. As well there are lots of X10 RF commands that there just is no PL equivalent for. it would be nice to be able to control the ninja pan & tilt modules with this like using the cm15 but a simple on/off ability would suit most users needs. I don't believe sending Security codes is possible with either the cm19 or cm15 but that would be nice too.

genemars commented 5 years ago

Hi tuiceman I have never heard of the CM15 sending RF. I always believed it's just a RF receiver not a RF transceiver. Is there any documentation about this? Is there any other software that implements this feature. I don't even remeber AHP sending RF with CM15.

tuicemen commented 5 years ago

mochad will do this https://sourceforge.net/projects/mochad/ but it's driver and yours conflict with each other

genemars commented 5 years ago

I precompiled binaries for the new XTenLib so you can test the CM15 RF sending.

Test_CM15_Debug.zip

tuicemen commented 5 years ago

Ok hope this works how should I use this? I assume just sudo files name ?

tuicemen commented 5 years ago

hit wrong Button!

tuicemen commented 5 years ago

Ok figured it out mono file name works however here's what I get

2018-12-18 07:19:22.9699 XTenLib.Drivers.CM15.Open Error System.Exception: X10 CM15Pro device not connected.
  at XTenLib.Drivers.CM15.Open () [0x00020] in <d605015843874d36bbd3d8bb74cf016f>:0
genemars commented 5 years ago

Stop all other applications that might be using CM15. Then:

sudo mono Test.CM15.exe
tuicemen commented 5 years ago

ok stopped HomeGenie service waited a bit and still get the same response

genemars commented 5 years ago

to ensure you really stopped HG:

ps ax | grep mono

If you see HomeGenie in the output then you didn't stop HG. Quit it the hard way:

sudo killall mono

Retry the ps ax | grep mono command now. Start the test CM15 app.

tuicemen commented 5 years ago

ok did that shows no mono devices now shows the same XTenLib test program, waiting for connection. 2018-12-18 07:45:07.8504 XTenLib.Drivers.CM15.Open Error System.Exception: X10 CM15Pro device not connected. at XTenLib.Drivers.CM15.Open () [0x00020] in :0 2018-12-18 07:45:08.0900 XTenLib.XTenManager.SendMessage Debug EB-20-60-9F-00-FF 2018-12-18 07:45:08.0997 XTenLib.XTenManager.SendMessage Warn Interface I/O error

tuicemen commented 5 years ago

maybe because it is looking for Cm15 Pro and I have the CM15A

tuicemen commented 5 years ago

I have another idea I'm using mono 5x on this pi and I remember the latest HomeGenie will not see my cm15 if HG is installed on that version I'll swap cards and test again

tuicemen commented 5 years ago

Ok we're getting some where now. the test program sees the cm15 and sends the command however A1 never went on/off I'll keep playing

tuicemen commented 5 years ago

ok the Test.CM15.exe sees all activity even if I send an A1 on/off. I seem to remember users reporting issues with sending RF to an address the Cm15 was listening for PL on.

let me did out an other RF transceiver to try this one may be bad.

tuicemen commented 5 years ago

Ok some success. I thought the test program sent a A1 on then paused then sent a A1 off it looks like it is only sending A1 off as my tranciever responds to that if I have turned it on.

genemars commented 5 years ago

This should be working now. I'm closing this. I plan to push a new HG release with this update. RF send can be done both using the Program Wizard or HG API in an automation program. HomeAutomation.X10/RF/Control.RfSend/<x10_hex_message>