wow! thankyou very much. Will give it a try first thing in the morning.
-
[SOLVED]Help with protocol for masterplug UK wall sockets
-
well thanks again.
Have got all the tests to pass with gulp. Now how do i integrate into pimatic to test?
-
nvm trying to create a pull request now
-
I lied!
Whilst trying to create a pull request, I realised i working from an old fork of rfcontroljs.
Having rebased to the pimatic fork, and changed lib-controller.coffee to match i now cant get it to pass the tests.
here is the error im getting. I presume its because the binary doesnt match.
2) #decodePulses() switch31 should decode the pulses: AssertionError: pulse 0000220100010101000000010101000001000100010000000101010000000101000100010000000001010103 of switch31 should be detected. + expected - actual -false +true at Context.<anonymous> (test/lib-controller.coffee:930:9)
here is the relevant part of my lib-controller.coffee
{ protocol: 'switch31' pulseLengths: [452, 1336, 3392, 10124], pulses: [ '0000220100010101000000010101000001000100010000000101010000000101000100010000000001010103' '0000220100010101000000010101000001000100010000000101010000000101000100000101010100000003' ], values: [ { all: false, channel: 1, id: 47333, state: true } { all: false, channel: 1, id: 47333, state: false } ] },
i have no idea where it is going wrong as there isnt much debug info.
-
I think you should update src/controller.coffee
-
Awesome! That was it. Now the tests pass. Thankyou very much for your help.
-
Pull request done!
-
Tested on my own pimatic install and its working as it should. Thanks again
-
That’s great! Would be cool if you could test if you could pair the wall socket with a different ID from pimatic. And if you have a second remote, test if that one is recognized as well. Maybe buy a second set, do some testing, and return
-
It works if i set a different id in pimatic. I can successfully pair with the socket. i may go and get another set. They were cheap enough.