pimatic / pimatic-homeduino

Pimatic plugin for using 433mhz devices and sensors with a connected Arduino with homeduino sketch
https://pimatic.org/
GNU General Public License v2.0
37 stars 29 forks source link

sliding back dimmers #63

Closed rspaargaren closed 8 years ago

rspaargaren commented 8 years ago

I already have post the topic on pimatic forum. But my biggest guess it is related to the homeduino plugin....? After setting the dimlevel the slider slides back to almost zero. Here is some input: Unfortunately I still have the problem of sliding back dimmers. Did not have time to get more info on it. Now I did some debugging:

 21:23:04.162 [pimatic-homeduino] Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:4 Pin:4 Repeats:1
 21:23:04.856 [pimatic-homeduino] data: "ACK"
 21:23:04.904 [pimatic-homeduino] data: "RF receive 348 2636 215 1262 10416 0 0 0 0102030203020302030203030202030302020302030203030203020203020303020302030202030203020303020203030203020203020302020203020302030203020303020203020304"
 21:23:04.921 [pimatic-homeduino] received: [ 215, 348, 1262, 2636, 10416 ] 1310121012101210121012121010121210101210121012121012101012101212101210121010121012101212101012121012101012101210101012101210121012101212101012101214
 21:23:04.946 [pimatic-homeduino] dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 4, state: undefined }
 21:23:06.676 [pimatic-homeduino] Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:7 Pin:4 Repeats:1
 21:23:07.356 [pimatic-homeduino] data: "ACK"
 21:23:07.413 [pimatic-homeduino] data: "RF receive 348 2636 216 1262 10416 0 0 0 0102030203020302030203030202030302020302030203030203020203020303020302030202030203020303020203030203020203020302020203020302030203020303020302030204"
 21:23:07.429 [pimatic-homeduino] received: [ 216, 348, 1262, 2636, 10416 ] 1310121012101210121012121010121210101210121012121012101012101212101210121010121012101212101012121012101012101210101012101210121012101212101210121014
 21:23:07.450 [pimatic-homeduino] dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 7, state: undefined }
 21:23:26.398 [pimatic-homeduino] Sending Protocol: dimmer1 id:1337110 unit:0 all:false dimlevel:0 Pin:4 Repeats:1
 21:23:27.082 [pimatic-homeduino] data: "ACK"
 21:23:27.119 [pimatic-homeduino] data: "RF receive 348 2648 215 1263 10412 0 0 0 0102030203020302030203030202030302020302030203030203020203020303020302030202030203020303020203030203020203020302020203020302030203020302030203020304"
 21:23:27.135 [pimatic-homeduino] received: [ 215, 348, 1263, 2648, 10412 ] 1310121012101210121012121010121210101210121012121012101012101212101210121010121012101212101012121012101012101210101012101210121012101210121012101214
 21:23:27.156 [pimatic-homeduino] dimmer1: { id: 1337110, all: false, unit: 0, dimlevel: 0, state: undefined }

09.06.2016 21:23:27 Lamp Bank (KAKU_BANK) State off
 09.06.2016 21:23:27 Lamp Bank (KAKU_BANK) Dimlevel 0 %
 09.06.2016 21:23:07 Lamp Bank (KAKU_BANK) Dimlevel 1 %
 09.06.2016 21:23:07 Lamp Bank (KAKU_BANK) Dimlevel 49 %
 09.06.2016 21:23:04 Lamp Bank (KAKU_BANK) Dimlevel 1 %
 09.06.2016 21:23:04 Lamp Bank (KAKU_BANK) Dimlevel 26 %

I have stripped the config file down to only one dimmer and the homeduino plugin. The rest has been removed. But still the same behaviour…:-( Even disabled the receiver by changing the receiver pin of the homeduino config. but no luck. This is the config of the KAKU Switch

 {
“id”: “KAKU_BANK”,
“name”: “Lamp Bank”,
“class”: “HomeduinoRFDimmer”,
“protocols”: [
 {
“name”: “dimmer1”,
“options”: {
“id”: 1337110,
“unit”: 0
 },
“send”: true,
“receive”: true,
“rfrepeats”: 1
 }
 ]
 },
rspaargaren commented 8 years ago

OK I have found the source for the behaviour. It was introduced after the following commit: https://github.com/pimatic/pimatic-homeduino/commit/68564926a9bc78ca53928f7834a623d7373628f0 I manually changed back the lines and now the slider stays at position... :-)

mwittig commented 8 years ago

You're right! Thank you very much for investigating this. I'll file a bug fix shortly, but it'll take a little bit longer to get a new release.