Closed nbdevito closed 7 years ago
Cool, glad you're getting involved! Let's see if we can figure this out.
Thanks for including your config -- can you show me an example codesend command that's working? Do you happen to be using my rf_pi implementation or a different codesend?
In that rf_pi repo is also a copy of the popular RFSniffer program -- do you have a 315 mhz RF receiver to help debug what's going on? I don't have any 315 mhz gear, which makes things a little more difficult to tinker with on my end.
I pulled RFSniffer and codesend from 433Utils. Basically repeating all the steps I used to setup my 433 mhz outlets but with 315 receiver and transmitter.
This is the command I use at the CLI and it works. I put that into a simple cmd homebridge plugin, but it gets out of sync easily, especially with iOS 10 Homekit scenes.
arguments (I think thats what they are called) are the code, pulse length and the pin.
/var/www/rfoutlet/codesend 8374433 -l 275 -p 1
Are you sure you're using the version from 433utils? I doesn't look like it accepts flags like -l
or -p
, just takes the arguments positionally. I just want to make sure we're going off the same code to start with.
No I’m not haha oops. Got it from this one!
https://github.com/timleland/rfoutlet.git /var/www/rfoutlet
It's not entirely clear to me why that would work and this wouldn't. Let's try using my upstream nodejs library directly to help see if this is a homebridge issue or a problem with my library.
First let's verify you're using the right pin 18, as some libraries use different pin numbering.
After that, follow directions here starting with git clone https://github.com/n8henrie/node-rcswitch-gpiomem.git
. Once you get to the part that you run interactively in node: rcswitch.enableTransmit(17);
, use your values instead (following the example right above the git
line).
Are you able to get it working with nodejs interactively? If not, make sure you can get it working with your 433 mhz switch, since we know that should work.
Works fine!
var rcswitch = require(‘.’) undefined rcswitch.enableTransmit(18); true rcswitch.setPulseLength(275); true rcswitch.setRepeatTransmit(15); true rcswitch.send(8374433, 24) true
Huh. Well that means it's definitely capable of doing it. When you do it through Homebridge, does it work intermittently? Or not at all? Have you tried increasing the repeat transmissions?
EDIT: Also, anything interesting in the homebridge debug log?
Not working at all. I upped the repeat to 15, still nothing. I also stopped the service with systemctl and ran homebridge from the command line and nothing is popping up there after initializing the RCSwitch accessory. Tell me where to look at the debug log and I’ll forward it! Thank you so much for your help!
No worries.
For debug mode, just run homebridge interactively with the -D
switch (homebridge -h
will show you the other flags, IIRC). Trigger the switches while it's running -- at least one of the (working) 433 mhz to see how it should look and one of the nonworking ones -- and it should tell you what it's doing.
When I do that, it shows a lot more information about the other plugins but no feedback about RCSwitch. The 433 outlets are acting correctly, but nothing in terminal. Also nothing about the switch on the 315 module either.
Huh, I would think the working switches should give at least a debug statement (I think it was for me). Will try to look into it. Unfortunately just moved and now have virtually no internet, so my responses will likely be delayed -- sorry.
Sorry for the (extended) delay in response.
Any updates on this issue?
One other thing just came to mind -- IIRC there were some other issues in either this or a related repo regarding multiple switches with different values for pulse length, etc., seemed like something was possibly getting overwritten when the other device (with a different pulselength) was initialized.
If the issue is still active, can you try a few things:
@nbdevito -- closing due to inactivity. Please feel free to reopen if the issue persists.
So I’m successfully using your plugin on 2 433mhz switches with the transmitter on pin 17. I have a 315mhz transmitter connected to pin 18 and I cannot get it to work. I am able to use a codesend command to control the 315 outlets, so I know the module works. I am very new to this all so I’m sure its a stupid problem. Here is part of my config file: