pimatic/rfcontroljs

Request: Impuls protocol

PimButton opened this issue · 13 comments

Is it possible to add support for the Impuls protocol?
It's fairly documented over here: http://wiki.pilight.org/doku.php/impuls

I would love to switch to a pimatic-only setup, thanks for all of the great work so far!

I would implement that in the next days

Also some debug output would be cool for test cases.

I recorded some debug info for the impuls protocol:

Systemcode: 31 programcode:1 ON

debug [pimatic-homeduino]: received: [ 146, 463, 4700 ] 10101010101010101010010101100110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 463 146 4700 0 0 0 0 0 01010101010101010101101010011001100110011001101012"
debug [pimatic-homeduino]: received: [ 119, 168, 476, 4779 ] 20202020202020202020120212201220022002201220121203
debug [pimatic-homeduino]: data: "RF receive 476 119 168 4779 0 0 0 0 01010101010101010101201020012001100110012001202013"

Systemcode: 31 programcode: 1 OFF

debug [pimatic-homeduino]: received: [ 135, 172, 465, 4736 ] 20202020202120202020121202210220022102200202022013
debug [pimatic-homeduino]: data: "RF receive 465 135 172 4736 0 0 0 0 01010101010201010101202010021001100210011010100123"
debug [pimatic-homeduino]: received: [ 155, 452, 4747 ] 10101010101010101010010101100110011001100101011002
debug [pimatic-homeduino]: data: "RF receive 452 155 4747 0 0 0 0 0 01010101010101010101101010011001100110011010100112"

Systemcode: 31 programcode:2 ON

debug [pimatic-homeduino]: received: [ 122, 152, 197, 462, 4724 ] 30303031313131313131031323131331033113310331131314
debug [pimatic-homeduino]: data: "RF receive 462 122 152 197 4724 0 0 0 01010102020202020202102030202002100220021002202024"
debug [pimatic-homeduino]: received: [ 154, 453, 4733 ] 10101010101010101010010101010110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 453 154 4733 0 0 0 0 0 01010101010101010101101010101001100110011001101012"

Systemcode: 31 programcode: 2 OFF

debug [pimatic-homeduino]: received: [ 143, 167, 461, 4723 ] 20202020202020202020022012121220022002200212122003
debug [pimatic-homeduino]: data: "RF receive 461 143 167 4723 0 0 0 0 01010101010101010101100120202001100110011020200113"
debug [pimatic-homeduino]: received: [ 149, 458, 4728 ] 10101010101010101010011001010110011001100101011002
debug [pimatic-homeduino]: data: "RF receive 458 149 4728 0 0 0 0 0 01010101010101010101100110101001100110011010100112"

Can you work with this? If you need any more, please let me know

One with other systemcode and programcode 1 or 2 where good. I will look at this in the next week

I need more data. Pls with a other Systemcode. The decode function works but for the encode i need some more data.

Here you go:

Systemcode: 15 Programcode: 1 ON

debug [pimatic-homeduino]: received: [ 140, 465, 4751 ] 10101010101010100110010101100110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 465 140 4751 0 0 0 0 0 01010101010101011001101010011001100110011001101012"
debug [pimatic-homeduino]: received: [ 151, 456, 4724 ] 10101010101010100110010101100110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 456 151 4724 0 0 0 0 0 01010101010101011001101010011001100110011001101012"

Systemcode: 15 Programcode: 1 OFF

debug [pimatic-homeduino]: received: [ 142, 162, 458, 4710 ] 20202021202020201220121202210221022012201212122003
debug [pimatic-homeduino]: data: "RF receive 458 142 162 4710 0 0 0 0 01010102010101012001202010021002100120012020200113"
debug [pimatic-homeduino]: received: [ 147, 185, 456, 4723 ] 20202020202020200220121202200220022002200202022003
debug [pimatic-homeduino]: data: "RF receive 456 147 185 4723 0 0 0 0 01010101010101011001202010011001100110011010100113"

Systemcode: 15 Programcode: 2 ON

debug [pimatic-homeduino]: received: [ 142, 465, 4741 ] 10101010101010100110011001010110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 465 142 4741 0 0 0 0 0 01010101010101011001100110101001100110011001101012"
debug [pimatic-homeduino]: received: [ 151, 455, 4731 ] 10101010101010100110011001010110011001100110010102
debug [pimatic-homeduino]: data: "RF receive 455 151 4731 0 0 0 0 0 01010101010101011001100110101001100110011001101012"

Systemcode: 15 Programcode: 2 OFF

debug [pimatic-homeduino]: received: [ 145, 175, 460, 4709 ] 20202020202020200220022002021220022002200212122003
debug [pimatic-homeduino]: data: "RF receive 460 145 175 4709 0 0 0 0 01010101010101011001100110102001100110011020200113"
debug [pimatic-homeduino]: received: [ 148, 459, 4722 ] 10101010101010100110011001010110011001100101011002
debug [pimatic-homeduino]: data: "RF receive 459 148 4722 0 0 0 0 0 01010101010101011001100110101001100110011010100112"

Ok. are you able to implement the files by your self to test some thing?

https://github.com/Icesory/rfcontroljs/tree/development

this files you need to change
lib/controller.js
lib/protocols/switch6.js

The protocol use a tristate system and at the moment it is not clear for me to solve this right. The documentation from pilight isnt correct.

Can I just overwrite those files and restart pimatic? Will test tomorrow!

Jop this is the way.

And? Have you test it?
You need now update now the helper.js too
/lib/helper.js
complete path
/home/youruser/pimatic/node_modules/pimatic-homeduino/node_modules/homeduino/node_modules/rfcontroljs

Icesory@bb06562

Seems to work perfect! Now I just have to make all the changes to my config file :)

Released with pimatic-homeduino 0.8.25. Big thanks to @Icesory for his worl 👍 .