Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add CM19A & RF protocol #3

Open
sebastienvg opened this issue Nov 8, 2014 · 19 comments
Open

add CM19A & RF protocol #3

sebastienvg opened this issue Nov 8, 2014 · 19 comments
Assignees

Comments

@sebastienvg
Copy link

I don't have the CM15PRO however I've been using Mochad for a couple years now with a CM19A.
I managed to setup pimatic-mochad to talk to Mochad but the codes sent from pimatic-mochad don't seem to trigger anything.

For example, this is what is sent (rather what I see on Mochad console) when I toggle the device from pimatic

11/08 10:55:23 Tx PL HouseUnit: G1
11/08 10:55:23 Tx PL House: G Func: On

when I would need

11/08 11:08:19 Rx RF HouseUnit: G1 Func: On

or

11/08 11:08:21 Rx RF HouseUnit: G1 Func: Off

I am trying to edit mocha.coffee but I am unsure how to go about and am I even trying to edit the right file. Can I pick your brain with this?

@petski
Copy link
Owner

petski commented Nov 21, 2014

I'd love to help, but I'm busy lately. I'll try to find some time this weekend

@petski
Copy link
Owner

petski commented Nov 30, 2014

@punchlinegroup: RF support was added to pimatic-mochad by @edorsey! Could you please verify if the patch works for you? Please update to the latest version of petski/pimatic-mochad and add an extra "protocol": "rf" for the unit you're trying to communicate with. Looking forward to your reply.

@sebastienvg
Copy link
Author

I just installed pimatic-mochad and added the following to my config.js

"devices": [ { "id": "CM15Pro", "class": "Mochad", "name": "CM15Pro", "host": "localhost", "port": 1099, "units": [ { "id": "office-white-light", "class": "MochadSwitch", "name": "Office White Light", "housecode": "G", "unitcode": 1, "protocol": "rf" } ] },

as well as

{ "plugin": "mochad" }

however when I use the button in mobile-front-end I still get

12/01 12:42:58 Tx PL HouseUnit: G1 12/01 12:42:58 Tx PL House: G Func: On

while looking at mochad output.

@edorsey
Copy link

edorsey commented Dec 1, 2014

@punchlinegroup the mochad output didn't change, but the way that pimatic-mochad handles the output did. So, does using pimatic-mochad to control rf devices work?

@petski
Copy link
Owner

petski commented Dec 1, 2014

@punchlinegroup And please make sure you're running the latest version of pimatic-mochad (via git)

@petski
Copy link
Owner

petski commented Dec 1, 2014

For your convenience, I just release version 0.8.2 of pimatic-mochad. Update pimatic-mochad using the default update feature in pimatic-mobile-frontend

@sebastienvg
Copy link
Author

Awesome, it works now! Thank you so much.

@sebastienvg
Copy link
Author

I was wondering if it's possible to have the status of the buttons in the mobile-front-end react to commands sent from real remote such as X10 Model HR12A?

@edorsey
Copy link

edorsey commented Dec 2, 2014

I believe that is a problem with x10, rather than the software. The RF wall units to not appear to rebroadcast things that happen on the powerline, so the CM19a needs to be able to "hear" the RF signals from whatever device you are using to control.

@sebastienvg
Copy link
Author

I am not so sure, I am thinking that if the plugin would listen to mochad and reflect the status of the buttons/switches instead of sending the command only that behaviour would make more sense.Not sure if I explained that properly let me know if not.

@edorsey
Copy link

edorsey commented Dec 2, 2014

It does that. I have a HR12A, as well. Whenever I use the HR12a close enough to the CM19a, the UI in pimatic is updated, but if I move further away from the CM19a, it can't hear the RF from HR12A, so the pimatic UI gets out of sync.

@edorsey
Copy link

edorsey commented Dec 2, 2014

Also, the RF wall units don't appear to rebroadcast powerline signals over RF.

@sebastienvg
Copy link
Author

Then I must be missing something because I am using the remote one meter away from the CM19A I can see the commands coming on the pi while

nc localhost 1099

and the devices turn on or off according to what I press

@petski
Copy link
Owner

petski commented Dec 2, 2014

@punchlinegroup What exactly do you see with nc when you turn the lights on/off via the RF-remote? (P.S. github should have chat-channel support :P)

@sebastienvg
Copy link
Author

I see the same thing when using a remote than when I use a button in the mobile-front-end
for example:

12/02 20:15:50 Tx RF HouseUnit: G1 Func: On
ON from shell

12/02 20:16:08 Rx RF HouseUnit: G1 Func: On
ON from remote

12/02 20:16:26 Rx RF HouseUnit: G1 Func: Off
OFF from remote

12/02 20:16:40 Tx RF HouseUnit: G1 Func: Off
OFF from shell

@sebastienvg sebastienvg reopened this Dec 6, 2014
@petski
Copy link
Owner

petski commented Dec 7, 2014

Hmmm, notice the difference between Tx and Rx. Pimatic-mochad only enters certain logic when the "direction" is "Tx". What kind of unit is G1 in your case?

@edorsey
Copy link

edorsey commented Dec 8, 2014

When you are using the hardware switch 1 meter away from the CM19a, do the
toggle buttons in pimatic update?

I tested this with my CM19a and if I use an RF remote within range of the
CM19a, then the pimatic updates and the button's state remain accurate (and
mochad reports the Rx). However, if I go all the way to the second story of
my house (CM19a is in the basement) and try to use an RF remote. Mochad no
longer reports an Rx (or Tx) from the RF remote. This is because the CM19a
cannot "hear" the RF remote. Other devices in the house (powerline RF
units) do pick up the RF signal and re-broadcast the RF signals over the
Powerline. However, the RF powerline units DO NOT rebroadcast powerline
signals as RF, which was my fundamental mis-understanding of how the whole
thing worked. I will be getting a CM15a to resolve the issue in the near
future (because the powerline has all the data to make sure the UI stays up
to date).

One possible software fix for this issue is to use a non-toggle on/off
button. That way, the pimatic UI emulates what x10 looks like in their
actual hardware. So instead of the pimatic needing to know whether a light
is currently on or off, your know and choose the correct action. This is
the same way I was planning to handle dimming/brightening.

On Sun, Dec 7, 2014 at 7:39 AM, Patrick Kuijvenhoven <
[email protected]> wrote:

Hmmm, notice the difference between Tx and Rx. Pimatic-mochad only enters
certain logic when the "direction" is "Tx". What kind of unit is G1 in your
case?


Reply to this email directly or view it on GitHub
#3 (comment).

@sebastienvg
Copy link
Author

@petski G1 is a transceiver module (the one with antenna that you can only set the letter).

@edorsey I pretty much have the same configuration than you, the cm19a is in the basement. Pimatic doesn't update the toggle button even when I use the remote within cm19a range. I am thinking getting the cm15a as well but leaving in canada I'll probably have to get two since it's my understanding that canadian houses have two separated legs in which case the PL signals won't always be received.

I really hope @petski can adjust the plugin to work-around cm19a "limitations"

@sebastienvg
Copy link
Author

Hi @petski & @edorsey, is any of you able to add a Sensor type of thing to pimatic-mochad? Like something that would reports DS12A and MS16A/MS18A status? I am looking at mochad-device-schema.coffee and mochad.coffee but I clueless anything I try ends up not working at best. Any help or pointer would be really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants