Please login or register.

Login with username, password and session length
Pages: 1 [2]

Author Topic: Home Assistant and X10 on the Raspberrry Pi-Installation instructions (Revision)  (Read 25349 times)

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

Mochad is on the same PI.
That link tells me nothing! What lviper posted tells me more then that either link which by the way I've already read  as well as the switch and component instructions (more then once).
If this is what it takes to get X10 working in HA, guessing at locations then I'm out.
Read this read that! I just want to test the dam thing! If I decide I like it then I'll read more.

 Installation should be the hardest thing about this not configuring it. B:( B:(

Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

Also remember, while mochad will see your palmpad and turn on your light, HA won't. It will still show off in HA. To turn off a light in HA that is currently on you will need to turn it on then off.
Are you saying that HA can't see incoming RF commands and act on them?  That can't be right since motion sensors send an RF command which many people use as triggers for other things.  The most basic config is to set a module to the same HU code as the motion sensor, but I certainly don't think that should be considered the only approach.

No, HA does not see the RF signals directly. This was my whole problem when trying to figure my current solution and why I didn't use mochad. THere is a mochad_dispatch that will publish security rf to HA using MQTT, but it doesn't support regular rf.

I'm using Heyu with the CM11a and a W800USB from WGL Design for wireless. Once everything is setup in Heyu and working, I publish my MS16 motion and DS10a security sensors to HA using MQTT. Sounds more difficult then it actually is.

In theory if you had both a CM11a and CM15a you could achieve what I have. But you would have to use both mochad and Heyu. Let mochad and CM15 forward rf to plc. Then let heyu and the cm11 pickup the plc and act on it using Heyu scripts to publish to HA using mqtt.
Logged

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294


Now where do I add the mochad lines? ::) :'

At the end of the file is fine. You can add a comment line also which is what I did.

example:
Code: [Select]
# mochad x10 configuration
mochad:
  host: localhost
  port: 1099

light:
  - platform: mochad
    devices:
      - address: a1
        name: a1 device name
      - address: a5
        name: a5 device name
Logged

petera

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 27
  • Posts: 1751

Mochad is on the same PI.
That link tells me nothing! What lviper posted tells me more then that either link which by the way I've already read  as well as the switch and component instructions (more then once).
If this is what it takes to get X10 working in HA, guessing at locations then I'm out.
Read this read that! I just want to test the dam thing! If I decide I like it then I'll read more.

 Installation should be the hardest thing about this not configuring it. B:( B:(

Iviper managed to setup X10 with Mochad using Home Assistant on the Raspberry Pi.

I'm finding the more help I'm offering the more temperatures are rising so I'm backing away from the X10 forum for the moment. I just suggested reading up a little more on the platform but as you say you just want to get it going.

Good luck with your exploits if you choose to persevere.
Logged

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

If this is what it takes to get X10 working in HA, guessing at locations then I'm out.
Read this read that! I just want to test the dam thing! If I decide I like it then I'll read more.

 Installation should be the hardest thing about this not configuring it. B:( B:(

I learned quickly that HA IS NOT a "point and click to setup and configure platform." There is a lot of configuration file editing going on. I think that's what adds to the power of HA allowing for extremely indepth settings that aren't limited by a GUI.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

tempers aren't rising just frustration with not getting a simple answer like, Where in the configuration file does my Mochad X10 entry need to be?
I know what they should look like! and thats all the documentation I've found states. If it doesn't mater that's fine, but if I put it where it is required and it doesn't work I know a setting is off and I can debug.
If it has to be before groups or in groups thats what I need to know.
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

tempers aren't rising just frustration with not getting a simple answer like, Where in the configuration file does my Mochad X10 entry need to be?
I know what they should look like! and thats all the documentation I've found states. If it doesn't mater that's fine, but if I put it where it is required and it doesn't work I know a setting is off and I can debug.
If it has to be before groups or in groups thats what I need to know.

Did you see my reply a few posts back? It really doesn't matter where in the configuration.yaml file you put the mochad stuff. I usually just put my new stuff at the end.

Only time when it matters is for example when using light:. You can't have 2 sections that start with light. Example.

This is wrong
Code: [Select]
light:
  - platform: mochad
    devices:
    - address: a1

light:
  - platform: x10
    devices:
    - id: a2

It should be like this:
Code: [Select]
light:
  - platform: mochad
    devices:
    - address: a1

  - platform: x10
    devices:
    - id: a2

2 different platforms using light devices.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!


Now where do I add the mochad lines? ::) :'

At the end of the file is fine. You can add a comment line also which is what I did.

example:
Code: [Select]
# mochad x10 configuration
mochad:
  host: localhost
  port: 1099

light:
  - platform: mochad
    devices:
      - address: a1
        name: a1 device name
      - address: a5
        name: a5 device name
Thanks I'll attempt this If I can remember how to get back to the configuration file.
I know I don't have it entered at the end of the file.
One more question once this info is entered in the configuration file what can I expect to see in the UI? that will help me determine if the setting is right,  sometimes you just luck out other times your pulling hair and mine currently is to short to get a hold of. rofl
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

Thanks I'll attempt this If I can remember how to get back to the configuration file.
I know I don't have it entered at the end of the file.
One more question once this info is entered in the configuration file what can I expect to see in the UI? that will help me determine if the setting is right,  sometimes you just luck out other times your pulling hair and mine currently is to short to get a hold of. rofl

Once you log in to the Rpi I just type in the following to get to my configuration file. I'm sure there's a easier faster way but it works for me.
Code: [Select]
cd /home/homeassistant/.homeassistant
To edit the file I do this.
Code: [Select]
sudo nano configuration.yaml
The code doesn't have to be at the end, I just keep adding new stuff to the end to make it easier. But you do have to enter different platform information under the same device type as I mentioned above.

Once you have the configs entered and you saved your file, you need to restart HA either from the command line or from the web interface (aka frontend). Then you should see a card called Lights with each of your x10 devices listed. You'll have a different card if you used switch. Each device will have 2 lightening bolts to the right, one for on and one for off.

Here is a pic of one of my cards. Where mine says Other Lights you should have Lights. Where the sliders to the right are in mine you will have the 2 lightening bolts.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

Success! :)%
I see modules but only my switches respond I suspect it is how I have them entered as I see the address uses caps B:(
I'm not sure if it was the location of the entry or the IP change form local host to the actual IP, but at least I'm getting somewhere. ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

Success! :)%
I see modules but only my switches respond I suspect it is how I have them entered as I see the address uses caps B:(
I'm not sure if it was the location of the entry or the IP change form local host to the actual IP, but at least I'm getting somewhere. ::) :'

It was probably the ip instead of localhost. I think I had the same problem.
Logged

Tuicemen

  • Administrator
  • Hero Member
  • ****
  • Helpful Post Rating: 283
  • Posts: 10509
  • I don't work for X10, I use it successfuly!

Yes did some experimenting  the actual IP works as does 127.0.0.1 but not localhost.
The killer for this is HA doesn't report PLC or RF received events so devices never change status unless controlled from the interface. Not sure I could live with that. there must be a work around. ::) :'
Logged
Please Read Topic:
General Forum Etiquette
Before you post!

lviper

  • PI Expert
  • Hero Member
  • ******
  • Helpful Post Rating: 10
  • Posts: 294

Yes did some experimenting  the actual IP works as does 127.0.0.1 but not localhost.
The killer for this is HA doesn't report PLC or RF received events so devices never change status unless controlled from the interface. Not sure I could live with that. there must be a work around. ::) :'

You just experienced the main reason I didn't go this route.

If you have a CM11 I believe there may be a way. A hack of a way and not really ideal, but in theory it should work.

Use the cm15 with mochad. Let mochad forward your rf to plc. Then the cm11 and heyu can pick up on that. The cm11 and heyu will update the status in HA.

So for example. Say you have a light on A1. You would have mochad forward your A1 rf to the powerline. Heyu would see it and know A1 was turned on. Then HA would know it was turned on from heyu's state engine.

Basically use the cm11a and mochad as I use my w800usb. You should also be able to use mochad with mochad_dispatch to act on the security rf. Of course this is all theory from my experience of what I have tried and where I ended up.
Logged
Pages: 1 [2]
 

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