ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

Arduino RC Switch - Format for RC codes #129

Open dooney100 opened 8 years ago

dooney100 commented 8 years ago

I have sniffed remote controls and they are 333107 etc i.e. only 6 digits. When they are converted into binary with python2 then they don't seem to match the requested format in heimcontrol.js interface. Any ideas - do I need to add extra digits to the remote codes to make them 8 digits?

tjanson commented 8 years ago

How did you sniff the codes? Did you use the RC-Switch ReceiveDemo script? Also, what do the switches on your outlet look like (compare with this)?

dooney100 commented 8 years ago

I used the ReceiveDemosimple.pde file on arduino. I am using this remote for power sockets - http://www.amazon.co.uk/gp/product/B00JTRSG88?psc=1&redirect=true&ref=oh_aui_detailpage_o08_s00

tjanson commented 8 years ago

Unfortunately it’s quite possible that this remote’s code protocol is unsupported. It might help to see the exact output of the advanced ReceiveDemo script, but I’m afraid you are the first with this kind of remote.

Have you been able to replicate the codes with the RC-Switch library (on its own, without Heimcontrol) (or any other software, for that matter)?

dooney100 commented 8 years ago

thanks for your response - I'll paste the output of ReceiveDemo script in a separate message. Below is the message from heimcontrol when i try to enter the remote codes. I thought it might be something to do with heimcontrol software just requesting a minimum number of digits for entry into the form which could be changed somewhere in the heimcontrol code? If I add extra digits to the form entry then it accepts the code ok.

image

tjanson commented 8 years ago

I would try to make sure sending the code works somehow, e.g., using SendDemo (in binary mode, no protocol abstraction) or similar. That would verify that you have the code itself as well as the pulse length correctly, that the transmitter actually works, and so on.

Once that’s done, getting it working within Heimcontrol will be easy.

dooney100 commented 8 years ago

ok - seems like rc controls are 24 bit hardcoded in heimcontrol. I think this can be changed in /plugins/arduino/views/settings.jade

tjanson commented 8 years ago

No, they are not hardcoded. Again, I suggest you take things step by step and get RC-Switch working by itself, then tackle Heimcontrol integration. I’ll be glad to help if you have specific questions.

(As a side note, going via Arduino isn’t necessary – the Raspberry Pi’s own GPIOs can drive the 433 MHz transmitter too.)