Dear folks,
because it took me some time and digging to find out how to exactly use the extremely helpful rawshutter protocol in rfcontroljs, I wanted to share my findings with the community.
First of all, the results from my new config.json file.
// within the devices array
{
"id":"shutter4",
"name":"Rollo 4",
"class":"HomeduinoRFShutter",
"protocols":[
{
"name":"rawshutter",
"options":{
"pulseLengths":[
884,
1772,
5676,
36900
],
"pulsesDown":"210010000001001001001021001100111021110011100023",
"pulsesUp":"210010000001001001000021001100111021110011100023",
"pulsesStop":"200110000001001000000121001100111021110011100023"
}
}
]
},
{
"id":"shutter3",
"name":"Rollo 3",
"class":"HomeduinoRFShutter",
"protocols":[
{
"name":"rawshutter",
"options":{
"pulseLengths":[
884,
1772,
5676,
36900
],
"pulsesDown":"210010000001001100001021001100111021110011100023",
"pulsesUp":"210010000001001100000021001100111021110011100023",
"pulsesStop":"2001100000010011100121001100111021110011100023"
}
}
]
},
{
"id":"shutter2",
"name":"Rollo 2",
"class":"HomeduinoRFShutter",
"protocols":[
{
"name":"rawshutter",
"options":{
"pulseLengths":[
884,
1772,
5676,
36900
],
"pulsesDown":"210010000001000011001021001100111021110011100023",
"pulsesUp":"210010000001000011000021001100111021110011100023",
"pulsesStop":"200110000001000010000121001100111021110011100023"
}
}
]
},
{
"id":"shutter1",
"name":"Rollo 1",
"class":"HomeduinoRFShutter",
"protocols":[
{
"name":"rawshutter",
"options":{
"pulseLengths":[
884,
1772,
5676,
36900
],
"pulsesDown":"21001000000100000000001021001100111021110011100023",
"pulsesUp":"21001000000100000000000021001100111021110011100023",
"pulsesStop":"200110000001000000100121001100111021110011100023"
}
}
]
}
I am running my WAREMA on Channel 5 (on the little arrow in the battery department), Group A, Devices 1-4.
I was unable to abstract the up/down/stop values to a protocol, therefore opted to use the new rawshutter protocol.
how I got there
My Raspberry PI 2 running pimatic is connected to a 433mhz sender and receiver. I had checked that they both work and I get reproducible results from a known protocol.
First, I enabled the debug output for homeduino by setting up the following in my config.json. I am not sure whether I would have needed all of these config options, but it got me where I wanted to be. I am only posting excerpts of my changes, so do not copy&paste.
"settings": {
"debug": true,
"logLevel": debug,
"database": {
"messageLoging": [{
"level": "debug",
"tags": [],
"expire": "1d"
}]
},
"plugins": [{
"plugin": "homeduino",
"debug": true
}]
}
This brought me to a state where I could read the received messages in the log output of pimatic. (Note: the pimatic-mobile-frontend will require you to enable “debug” log output in addition to my config changes).
Verify this by getting really close to your receiver and pressing buttons of a remote that you know works with pimatic.
Then I pressed the buttons I needed to know for my shutter, and wrote down in sublime text what I pressed and what pimatic received from it.
I wrote “UPUP” instead of “UP”, to get a better column layout, I got this:
4 DOWN received: [ 884, 1772, 5676, 36900 ] 210010000001001001001021001100111021110011100023
4 UPUP received: [ 884, 1772, 5896, 36900 ] 210010000001001001000021001100111021110011100023
4 STOP received: [ 884, 1772, 5900, 36896 ] 200110000001001000000121001100111021110011100023
3 DOWN received: [ 884, 1768, 5684, 36896 ] 210010000001001100001021001100111021110011100023
3 UPUP received: [ 884, 1772, 5896, 36896 ] 210010000001001100000021001100111021110011100023
3 STOP received: [ 888, 1768, 5900, 36892 ] 2001100000010011100121001100111021110011100023
2 DOWN received: [ 884, 1772, 5680, 36896 ] 210010000001000011001021001100111021110011100023
2 UPUP received: [ 884, 1772, 5896, 36904 ] 210010000001000011000021001100111021110011100023
2 STOP received: [ 884, 1772, 5904, 36900 ] 200110000001000010000121001100111021110011100023
1 DOWN received: [ 884, 1772, 5684, 36884 ] 21001000000100000000001021001100111021110011100023
1 UPUP received: [ 884, 1772, 5892, 36892 ] 21001000000100000000000021001100111021110011100023
1 STOP received: [ 884, 1768, 5908, 36884 ] 200110000001000000100121001100111021110011100023
I tried to poke around with the blocks to find some kind of pattern, but every assumption I found proved wrong quite fast. Didn’t matter, I decided for the rawshutter protocol.
Well, then I used the marvellous multi-cursor feature of Sublime Text like a boss and brought the values I posted into a format that rawshutter understands (see above).
It’s worth noting that the manchester code used by warema shutters doesn’t care too strictly about pulse lengths, so I just took one pulse length array for all of the shutters.
I hope this write-down helps you finding a suitable protocol for your shutters! Feel free to drop a question or PN if you have one. I’ll try to answer quickly.