genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
395 stars 155 forks source link

Having x10 remote actually work for a while #364

Closed pjanits closed 1 year ago

pjanits commented 5 years ago

Expected behavior

Homegenie works

Actual behavior

Hi all, After starting from scratch several times at one point I actually saw my x10 remote start the sc1200 alarm AND the hg 90 basic alarm. I saw the proper wording in the top right corner and the actions take place. Disarm also. The lights would also turn on and off from remote. Of course something went wrong ( memory space in /dev/root and I had to start over. I nerver saw it again, but it must work somehow. I have rasp 3b+ and am currently using HomeGenie Version v1.2-stable.37. It may have been the previous version that it worked with. It’s all maddenly tragic and fun at the same time. If I could only find the magic again I would be happy. Cm15a was connected at all times. Pete

Steps to reproduce the problem starting from a fresh install

1. 2. 3.

Specifications

Additional configuration notes

mralapete commented 5 years ago

Attach a copy of your current log to see if HG is functioning correctly.

Have you confirmed that your controller and your security panel is actually working correctly. The CM15a controller needs its memory cleared before it will function correctly with HG, Do you have any other X10 software you could use to confirm that you hardware is not faulty.

Have you any other X10 controllers and software working on the same LAN. If so disable them and run your tests again.

genemars commented 5 years ago

mono --version new hg requires mono version 4.6.2 or later

pjanits commented 5 years ago

Mono JIT compiler version 5.4.0.201 

Pete N9SWH General Class

On Tuesday, February 12, 2019, 8:16:49 AM EST, Generoso Martello <notifications@github.com> wrote:  

mono --version new hg requires mono version 4.6.2 or later

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

genemars commented 5 years ago

I'd suggest to try a standard raspbian stretch install without adding external mono repo.

pjanits commented 5 years ago

Here's my setup:

x10 sc1200 alarm system. 9 years old. Currently has the internal time clock running fast. The power line part of signaling the lamp modules has failed and no longer sends signals ans of course the timers no longer work either. Not sure if it's the special power wall wart that died or something inside the sc1200 unit. So it only sends and recieves rf signals from the sensors and remotes. This still works flawlessly. And has no connection to any of my CM15a 's

1 x10 CM15a running AHP stuff. Works Just fine but doesn't see any security rf signals on AHP from the Alarm system. Never did. Well it does see the key remote but not the sensors.

1 x10 CM15a with no programming in it. This is what I have hooked up to Homegenie. I can read the RF signals from all of the sensors and door/window switches and the remote key fob. If i manually set the alarm in Homgeneie ( the 90 basic alarm) everything works great. Open anything and alarm triggers. Very exciting. This is in the Home or Away mode. If I press the arm button on my remote this happens, the sc1200 alarm works as it should. The homegenie sees the keypress and shows it in the upper right corner that it is active, but the 90 basic alarm never sets. It did this several times before everything crashed for another reason.

The log show it see the signal come in and that's all. I need to know where this signal goes next in the code. Either something isn't set right or I'm crazy. I know it worked several times when I did have it working. I can't remember if I did anything unusual or not. I'm pretty sure there is no interference from any other cm15a that I have running as the log definitely shows it receives the proper signal.

I think I may have to download the source code and go thru the painful tracing involved.

Here is a partial log. Not sure what is going on with the webservice gateway at 192.168.1.15 as that is an address of another computer on my network. I wish I understood the Magic HA gateway better, but it seems to be passing over the proper signals and codes.

"2019-02-11 15:16:39.8989 Info HomeAutomation.EnergyMonitor 1 - Program.UiRefresh Energy Monitor data updated"
"2019-02-11 15:16:40.0311 Info WebServiceGateway 192.168.1.15 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.EnergyMonitor/1/ [OPEN]"
"2019-02-11 15:16:40.0336 Info WebServiceGateway 192.168.1.15 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Modules.Get/HomeAutomation.EnergyMonitor/1/ [CLOSED AFTER 0.002 seconds]"
"2019-02-11 15:16:48.3135 Info WebServiceGateway 192.168.1.15 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/ [OPEN]"
"2019-02-11 15:16:48.3159 Info WebServiceGateway 192.168.1.15 HTTP GET 200 /api/HomeAutomation.HomeGenie/Config/Interfaces.List/ [CLOSED AFTER 0.002 seconds]"
2019-02-11 15:16:48.5624 Debug 5D-29-95-9A-06-F9-42-00
2019-02-11 15:16:48.5631 Debug RFCOM: 5D-29-95-9A-06-F9-42-00
"2019-02-11 15:16:48.5635 Info HomeAutomation.X10 RF X10 RF Receiver Receiver.RawData 29 95 9A 06 F9 42 00"
2019-02-11 15:16:48.5635 Debug Security Event Remote_ArmAway Address 17045
"2019-02-11 15:16:48.5648 Info HomeAutomation.X10 S-REMOTE X10 Security Remote Sensor.Key ArmAway"
2019-02-11 15:16:48.6904 Debug 5D-29-95-9A-06-F9-42-00
2019-02-11 15:16:48.6907 Warn Ignoring repeated message within 150ms
2019-02-11 15:16:48.8263 Debug 5D-29-95-9A-06-F9-42-00
2019-02-11 15:16:48.8267 Warn Ignoring repeated message within 150ms
2019-02-11 15:16:48.9464 Debug 5D-29-95-9A-06-F9-42-00
2019-02-11 15:16:48.9467 Warn Ignoring repeated message within 150ms
2019-02-11 15:16:49.0743 Debug 5D-29-95-9A-06-F9-42-00
2019-02-11 15:16:49.0747 Debug RFCOM: 5D-29-95-9A-06-F9-42-00
"2019-02-11 15:16:49.0747 Info HomeAutomation.X10 RF X10 RF Receiver Receiver.RawData 29 95 9A 06 F9 42 00"
2019-02-11 15:16:49.0747 Debug Security Event Remote_ArmAway Address 17045
"2019-02-11 15:16:49.0758 Info HomeAutomation.X10 S-REMOTE X10 Security Remote Sensor.Key ArmAway"
2019-02-11 15:16:57.2103 Debug 5D-29-95-9A-86-79-42-00
2019-02-11 15:16:57.2112 Debug RFCOM: 5D-29-95-9A-86-79-42-00
"2019-02-11 15:16:57.2119 Info HomeAutomation.X10 RF X10 RF Receiver Receiver.RawData 29 95 9A 86 79 42 00"
2019-02-11 15:16:57.2127 Debug Security Event Remote_Disarm Address 17045
"2019-02-11 15:16:57.2143 Info HomeAutomation.X10 S-REMOTE X10 Security Remote Sensor.Key Disarm"
2019-02-11 15:16:57.3463 Debug 5D-29-95-9A-86-79-42-00
2019-02-11 15:16:57.3466 Warn Ignoring repeated message within 150ms
2019-02-11 15:16:57.4759 Debug 5D-29-95-9A-86-79-42-00

pjanits commented 5 years ago

When snooping in the widget for Homegenie/generic/securitysystem I see an error TypeError: Cannot read property 'command' of undefined Line 6963, Column 20 What ever that means. Javascript side

tuicemen commented 5 years ago

I believe you probably created a macro so that when your keyflob arm signal was seen it armed away the security system and another for disarm. I don't believe the HG security system(90) is watching any RF event by default.

genemars commented 5 years ago

x10 sc1200 alarm system. 9 years old. Currently has the internal time clock running fast. The power line part of signaling the lamp modules has failed and no longer sends signals ans of course the timers no longer work either.

This is a well known issue with the SC1200 power adapter. The power adapter is not a simple power adapter but it also carry the duty of decoding/encding messages over the powerline. I believe that the X10 functionality of the power adapter is broken. Replacing it with a new one should solve this issue.

The homegenie sees the keypress and shows it in the upper right corner that it is active, but the 90 basic alarm never sets. It did this several times before everything crashed for another reason

this is the expected behavior but you can create a simple wizard script that will arm/disarm HG alarm system when you press the keyfob keys Though I do not encourage the use of X10 RF to arm or disarm HG since anyone could buy a X10 remote and arm/disarm the alarm system. The SC1200 implement another layer of security by "pairing" the keyfob and sensors in a kinda secure way so that other remotes and sensors that are not paired will not be recognized.

Here is a partial log. Not sure what is going on with the webservice gateway at 192.168.1.15 as that is an address of another computer on my network.

the IP address you see in the log is the address of the client that is connecting to HG (your browser).

Attached to this message there are the wizard scripts that you can use to Arm/Disarm the security alarm system by using the X10 remote.

1009-X10Remote.zip

pjanits commented 5 years ago

Thanks

pjanits commented 5 years ago

Tuicemen ,

It sure is. I just added modules from x10 finding into the security group. No macros made. Everything just shows up. In x10 modules they are prefaced by an S-00BXXXX . Just bring them into the security group and figure which is which and rename them. The HA passes it over I guess.

tuicemen commented 5 years ago

@pjanits so you created a security group and added the HG security system(90) then your security modules and everything works (keyflob ars/disarms the HG security system(90)? This without the scripts (macros) @genemars posted?

I have all my security sensors, and remotes added to HG but these (remotes) did not control (arm/disarm) the HG security system only my X10 security console (DS7000). I had to create scripts(macros) simular to what @genemars posted except I used the actual RF code.

mralapete commented 5 years ago

As @genemars stated your power supply for the SC panel acts as a power line carrier adaptor and it does sound like it is failing.

Also I’d disable any other X10 controllers you have on the LAN so there’s no chance of X10 signal collision. You should clear the memory of the X10 controller you are using with HG too.

You’re HG setup is definitely transmitting the relevant X10 signals to your SC panel. The problem is definitely further down the power line.

pjanits commented 5 years ago

Tuiceman Correct except one time I reinstalled the system the remotes did work. Arm, disarm, and lights on off all activated the HG security system. That is what is driving me nuts. I saw it work, so why can't it always work? I have read your posts regarding this and thought that was the way it was until I saw it work.. My x10 is the sc1200 so it's different from your I guess. But still. If all the sensors work with HG all the time why not the remotes too? Crazy but fun. Seems it should without any macros or scripts.

pjanits commented 5 years ago

I ordered a new supply today. We'll see.The HG is NOT sending anything to the sc1200 it only reads the rf the SC panel is putting out. The fact that all the sensors are seen and acted upon in HG security tells me there is no interference at all. The remotes are seen and reported but not acted upon in HG. In other words it won't arm or disarm or activate the security lights in HG. Pete N9SWH General Class

On Tuesday, February 12, 2019, 8:21:12 PM EST, mralapete <notifications@github.com> wrote:  

As @genemars stated your power supply for the SC panel acts as a power line carrier adaptor and it does sound like it is failing.

Also I’d disable any other X10 controllers you have on the LAN so there’s no chance of X10 signal collision. You should clear the memory of the X10 controller you are using with HG too.

You’re HG setup is definitely transmitting the relevant X10 signals to your SC panel. The problem is definitely further down the power line.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

mralapete commented 5 years ago

Personally speaking I wouldn’t bother with an X10 security panel if I was serious about security. I’d opt for a professional security panel like the Ademco or the GE Concord 4.

They are much more secure and work very well with home automation.In fact there’s a program already written for the Ademco in HG.

tuicemen commented 5 years ago

The Cm15a is known for poor (weak) RF transmissions and I had thought all X10 security consoles only recieved Rf and only send pl, maybe I'm wrong. HG sends pl unless specified to send RF. There are so many things that can affect both signals. If you've not trouble shooted purchasing a new wallwart will not help however it does eliminate one possible cause of the console issue

pjanits commented 5 years ago

Maybe I was hasty on that. THe sc1200 . send out a are you there sig to each sensor/switch about every 20 min. Maybe that is what the CM15a is picking up.  As my powerline part of the sc1200 is dead, it's not coming from there. The keychain is rf as you know and I'm not sure if it's getting picked up directly by HG ( my suspicion is it is )or being resentby the sc1200. Easy way test that is pull all the power from sc1200.Pete N9SWH General Class

On Wednesday, February 13, 2019, 7:27:56 AM EST, Tuicemen <notifications@github.com> wrote:  

The Cm15a is known for poor (weak) RF transmissions and I had thought all X10 security consoles only recieved Rf and only send pl, maybe I'm wrong. HG sends pl unless specified to send RF. There are so many things that can affect both signals. If you've not trouble shooted purchasing a new wallwart will not help however it does eliminate one possible cause of the console issue

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

tuicemen commented 5 years ago

I don't believe the SC1200 works as a RF repeater. Also even if your SC1200 pl was not dead there is no pl equivalent for security signals.

Also a repeated RF signal should not affect HG. If your HG was not rebuilt from a working backup of when your system behaved, be sure you check use as security sensor under the security option of modules you wish to be seen by the HG security system.

pjanits commented 5 years ago

So with the sc1200 disabled I still get signals from the sensors/switches. It seems they wake up every so often and check in. It would be nice to see battery level. Hmmmm I see a widget shows that but I'm not sure the sensor/switches can report it yet. Anyhow the sc1200 doesn't repeat, you are correct about that.

tuicemen commented 5 years ago

I've never been able to get the battery level to report correctly but I do know the x10 sensors report the status. I'm just not sure the x10 driver is coded for it @genemars may chime in on that.

pjanits commented 5 years ago

The only failures or false triggers I have ever had was the battery in some sensor/switch died while I was out of town.

tuicemen commented 5 years ago

I usually change my batteries twice a year at the off grid place but only once a year in the city. The only false alarm I had was after initial install when the double sided sticky tape failed on a door sensor. I didn't have cameras installed at that time, they would have saved me a two hour drive.

pjanits commented 5 years ago

I received the new sc1200 power supply today and I am glad to announce you were all right. The sc1200 now has PL again! Thanks.

pjanits commented 5 years ago

Also the clock is running right on the button. This makes me think maybe some internal interference in the power supply may have been killing the PL signals. I will open it up someday soon and look for bad capacitor.

tuicemen commented 5 years ago

Nice to see your sc1200 is now back up and running as it should. Now you just need to get HG talking to it. ;) unless you've figured that process out.

tuicemen commented 5 years ago

@pjanits are your door/window sensors updating their status in the HG Security System history screen? Are all sensors and your key flob modules in HG displaying correct status when activated?

pjanits commented 5 years ago

Yes Pete N9SWH General Class

On Saturday, February 16, 2019, 6:47:34 PM EST, Tuicemen <notifications@github.com> wrote:  

@pjanits are your door/window sensors updating their status in the HG Security System history screen? Are all sensors and your key flob modules in HG displaying correct status when activated?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

tuicemen commented 5 years ago

Ok so All you need to do is download the zip file @genemars posted and unzip it. then go into the HG web UI and click configure/programs/security on the bottom right click actions then import program and browse to the unzipped folder and add the Arm away and Disarm files. I suggest you edit them so a RF code signal switches the security instead of the reported RF state.

If you have a problem let me know