Please login or register.

Login with username, password and session length
Pages: 1 2 [3] 4 5 ... 7

Author Topic: installing helper programs to pi for X10 integration  (Read 26897 times)

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: installing helper programs to pi for X10 integration
« Reply #30 on: October 23, 2018, 06:48:58 PM »

Can you confirm that Mochad is running uninterrupted now. If this is the case you now need to add a delay to your Domoticz Systemd service file to ensure that Mochad is up and running before the Domoticz server. Domoticz would start fairly quick and would miss the Mochad daemon service.

Something alomg these lines https://stackoverflow.com/questions/43001223/how-to-ensure-that-there-is-a-delay-before-a-service-is-started-in-systemd

Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #31 on: October 23, 2018, 07:59:02 PM »

So my last issue was mochad loosing communications with the cm15 due to having transceiver turned on - pretty weird...

All that time of not working, mochad WAS running in the background _ i could see it on the running list with ps -A and ps aux commands.  So no timer issue.  I am in process of searching whole SD card for file named systemd but have yet to find it.  It would be interesting to see what is in it. 

Mochad has been rock solid now all day and domoticz is interfacing solid with it also.  My issue must have been that transceive turned on or that file that is running every time mochad gives domoticz a command (_domoticz_main).  I have not deleted it yet to verify that it has no affect.  Will do, but enjoying it working for now...

Since it was working, I addressed the built in broadlink RM issue;  turns out I had wrong IP address set (0.3 instead of 0.2) ...  When it first worked I had used domoticz's automatic find the RM module and just copy pasted the IP and MAC address;  later, in screwing with it I deleted it and redid it and punched in wrong IP.   So it is communicating now too with domoticz.  I do not know if it actually works (learn code then spit it back out as a switch icon) because I must be net to it in workshop to teach it...  Tomorrow is another day!

Assuming that works, I will change my pi pw back to raspberry and make an 8gb image and make it available on line.
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: installing helper programs to pi for X10 integration
« Reply #32 on: October 23, 2018, 08:31:42 PM »

So my last issue was mochad loosing communications with the cm15 due to having transceiver turned on - pretty weird...

All that time of not working, mochad WAS running in the background _ i could see it on the running list with ps -A and ps aux commands.  So no timer issue.  I am in process of searching whole SD card for file named systemd but have yet to find it.  It would be interesting to see what is in it. 

Mochad has been rock solid now all day and domoticz is interfacing solid with it also.  My issue must have been that transceive turned on or that file that is running every time mochad gives domoticz a command (_domoticz_main).  I have not deleted it yet to verify that it has no affect.  Will do, but enjoying it working for now...

Since it was working, I addressed the built in broadlink RM issue;  turns out I had wrong IP address set (0.3 instead of 0.2) ...  When it first worked I had used domoticz's automatic find the RM module and just copy pasted the IP and MAC address;  later, in screwing with it I deleted it and redid it and punched in wrong IP.   So it is communicating now too with domoticz.  I do not know if it actually works (learn code then spit it back out as a switch icon) because I must be net to it in workshop to teach it...  Tomorrow is another day!

Assuming that works, I will change my pi pw back to raspberry and make an 8gb image and make it available on line.

Mike Systemd is the name of the service that launches the application. If it was Mochad than the Systemd service would be called something like mochad.service or if it was Domoticz it would be called domoticz.service. Generally these would be files you would create yourself to launch on system boot and they would run unattended on your system.

Read up on Systemd to get an understanding on how this works. These files are usually stored in the folder /etc/systemd/system.

Gotta sign off for a while now. Back to the day job as they say :)
Logged

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 160
  • Posts: 1458
Re: installing helper programs to pi for X10 integration
« Reply #33 on: October 23, 2018, 10:36:14 PM »

Nice job and glad you made it work. Thanks for sharing everything.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #34 on: October 24, 2018, 07:31:30 PM »

tnx brobin, not out of the woods all the way yet...  broadlink plugin seems to only work for IR at this point and not RF.  So it will not learn X10 codes - yet. 

I see on forums one other person found this to be true also... 

First try with broadlink android app likewise does IR but not RF... 
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: installing helper programs to pi for X10 integration
« Reply #35 on: October 25, 2018, 08:15:33 AM »

tnx brobin, not out of the woods all the way yet...  broadlink plugin seems to only work for IR at this point and not RF.  So it will not learn X10 codes - yet. 

I see on forums one other person found this to be true also... 

First try with broadlink android app likewise does IR but not RF...
I'm not at all familiar with the plugin so this is just a thought
It is possible the plugin was only coded to learn IR like for the tiny BlackBean.
 If you manually add a RF code will it send it?
If you still have HA-Bridge setup on your Windows PC you can copy the RF code for the device you wish the plugin to send.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #36 on: October 25, 2018, 08:30:21 AM »

RIGHT ON TUICEMEN!   You are so right!

The python3 code called broadlink ONLY does IR learning since the author did not / does not have any RF stuff to test it - so his RF code does not work!  A few others have modified versions that work for some people.  Matt seems willing to make his official version work, so I offered to buy him a Broadlink RM Pro+ and send him an x10 keyfob to test with!  Will see if he takes me up on it!

I will also be trying some of these other versions today if I get time.

I have learned that the broadlink has TWO steps to learn RF codes - interesting stuff!  Since iit can learn and emulate both 432mhz and 310mhz signals, it learns by FIRST doing a frequency SWEEP to find rf signals...  Once found, it then goes into SECOND step and records the digital code riding on that RF signal.  Pretty cool.  There is a new(er?) android app called 'Broadlink Hub"  that automatically scans network and finds the broadlink device, then has simple buttons to learn IR and separate one called 'freq sweep' - now I know the meaning of that! - to find and learn RF.  Unfortunately it does not find any of my X10 stuff. 


Meanwhile I do have  my security codes from your help with the habridge, and yes, I think I can decode how to implement it into a new ini file to load into this system. 

Also, Matt did build a small webserver, generator of modified e-control files and import into domoticz;  unfortunately I am not smart enough yet to make it work - but I am getting there!

And last, I reinstalled e-control on my android phone and will today sometime try to learn X10 codes anew, in anticipation of learning how to use the broadlink automatic built in import function.
Logged

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #37 on: October 25, 2018, 08:34:05 AM »

Hey Tuicemen, you ever have an issue where your broadlink changes IP addresses?  Mine seems to be bouncing from 192.168.0.3 (normal) to 192.168.0.2...   and back.  It changed from .3 to .2 at 3am last night and is still on that... 
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751
Re: installing helper programs to pi for X10 integration
« Reply #38 on: October 25, 2018, 10:06:52 AM »

For anyone wanting to sniff wifi traffic on the Raspberry Pi without Broadlink this is a useful tool https://www.raspberrypi.org/forums/viewtopic.php?t=152867?

Mike have you set a static ip for your Broadlink. Are you using iPv6 or IPv4 on your system. How does your provider assign ip addresses.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: installing helper programs to pi for X10 integration
« Reply #39 on: October 25, 2018, 11:42:53 AM »

Hey Tuicemen, you ever have an issue where your broadlink changes IP addresses?  Mine seems to be bouncing from 192.168.0.3 (normal) to 192.168.0.2...   and back.  It changed from .3 to .2 at 3am last night and is still on that...
Yep, but this is easily fixed by going into your router and do a IP reservation for the mac address of the broadlink.
 Since you can't setup the Broadlink internally with a static IP you have to have the router do it. In fact all static IPs should be done from the router so an IP isn't assigned to something else before the device tries to activate its connection. >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #40 on: October 25, 2018, 06:05:18 PM »

Yep, but this is easily fixed by going into your router and do a IP reservation for the mac address of the broadlink.
 Since you can't setup the Broadlink internally with a static IP you have to have the router do it. In fact all static IPs should be done from the router so an IP isn't assigned to something else before the device tries to activate its connection. >!

I wish I could do this but my router is not smart enough to do that.

I installed e-control and it will not learn any Rf codes.  Neither will broadliink app.  I was able to import a whole batch of X10 commands from someone else who shared theirs and they seem to send ok.  Not sure why I can no longer teach rf to the RM2.
« Last Edit: October 25, 2018, 06:08:40 PM by mike »
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: installing helper programs to pi for X10 integration
« Reply #41 on: October 25, 2018, 07:20:39 PM »

Yep, but this is easily fixed by going into your router and do a IP reservation for the mac address of the broadlink.
 Since you can't setup the Broadlink internally with a static IP you have to have the router do it. In fact all static IPs should be done from the router so an IP isn't assigned to something else before the device tries to activate its connection. >!

I wish I could do this but my router is not smart enough to do that.

the setting is usually found under the DHCP Server setup and sometimes can be refered to as "static IP leases"  which my dsl router does. My cable router refers to it as IP reservations but it is still under the DHCP server setup.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

mike

  • Hero Member
  • *****
  • Helpful Post Rating: 14
  • Posts: 1057
Re: installing helper programs to pi for X10 integration
« Reply #42 on: October 26, 2018, 08:40:33 AM »

I have such a DUMB model/router, it even has a well documented problem of stepping on its own toes many times a day with a major memory leak, requiring reboots many times per day.   Official Verizon product....

I had asked the mfgr, Actiontec, over a year ago when this first came up with hG and they assured me this modem did not have leases I could set or assign. 

Anyway, in checking again today, I found the IQrouter and a thread showing folks just setting my 784 modem into bridge mode and letting the IQrouter handle the rest - it surelly will let me preassign IP to MACs...    going to check then buy one today...
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!
Re: installing helper programs to pi for X10 integration
« Reply #43 on: October 26, 2018, 08:55:21 AM »

Many ISP will replace their modem/routers with the newer model free of charge, they currently issue they just don't advertise it.
Call them up and ask for a replacement and see what they say. >!
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

brobin

  • Hero Member
  • *****
  • Helpful Post Rating: 160
  • Posts: 1458
Re: installing helper programs to pi for X10 integration
« Reply #44 on: October 26, 2018, 09:40:08 AM »

I don't know what the monthly fee is for the Verizon modem but you might want to buy your own modem and router.  I have Comcast and they charge about $11/mo for a cable modem/router combo but I bought my own modem for $70 plus a good router for $80 and it all paid for itself in 14 months - and that was 5 years ago! Even if it breaks every 15 months (it won't) you'd still be ahead of the game.   Then you can configure your router anyway you like and upgrade it as the need arises. I'm pretty sure you can do the same with Verizon as I see the "Verizon compatible" DSL modems at all the usual places.  I use a Motorola modem and an Asus router. 
Logged
Pages: 1 2 [3] 4 5 ... 7
 

X10.com | About X10 | X10 Security Systems | Cameras| Package Deals
© Copyright 2014-2016 X10.com All rights reserved.