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

pir & contact sensor seems to have issues in v0.9 #65

Closed leader21 closed 8 years ago

leader21 commented 8 years ago

from the forum https://forum.pimatic.org/topic/1954/signals-are-not-evaluated

under Pimatic 0.9 my Pir’s and my Contact Sensors are not longer evaluatet. In the debug mode I can see, when a Pir or a contact sensor is closeing, but nothing is displayed. So my Rules don’t work Under 0.8 I had no Problems with it.

Here two of my Sensors:

{
“protocols”: [
{
“name”: “alarm1”,
“options”: {
“id”: 3993419
}
}
],
“id”: “feueralarm1”,
“name”: “Feueralarm”,
“class”: “HomeduinoRFContactSensor”,
“xClosedLabel”: “Feueralarm!!!”,
“xOpenedLabel”: “kein Alarm”
}
{
“protocols”: [
{
“name”: “pir5”,
“options”: {
“id”: “14289546”,
“unit”: 9
}
}
],
“autoReset”: true,
“resetTime”: 6000,
“id”: “bewegungsmelder-flur”,
“name”: “Bewegungsmelder Flur”,
“class”: “HomeduinoRFPir”,
“xPresentLabel”: “keine Bewegung”,
“xAbsentLabel”: “Jemand ist im Flur”
}

check also these forum threads where similar problems occur https://forum.pimatic.org/topic/1938/amst-606-problem-with-0-9 https://forum.pimatic.org/topic/1946/unable-to-switch-on-homeeasy-he800s

nvirm commented 8 years ago

Also: https://forum.pimatic.org/topic/1924/homeduino-receiving-not-working-possibly-not-pimatic-fault/7

-HomeduinoRFSwitch with switch1 protocol (Nexa PE-3 Switches)

State changes are received to debug on both true and false GUI toggles ON/OFF when I press it from the GUI GUI does not toggle when I press from a physical remote (ON/OFF) Sending works from GUI (ON/OFF)

mwittig commented 8 years ago

Strange, works for me when I press the buttons on the physical remote for one second at least. Doing shorter presses is not reliably detected. I have a similiar setup with Conrad Smartplugs using Switch 1 protocol.

nvirm commented 8 years ago

Strange indeed.

Is debug separated from actual switch evaluation in the code? 1) RF->Homeduino->Pimatic evaluation to protocol -> Debug and Switch action 2) RF->Homeduino->Pimatic evaluation to debug and protocol -> Switch action

If debug and evaluation are separated, it could explain why the switches are received OK in debug, but not translated to pimatic itself. Long/Short presses make no difference I'm afraid. My Weather station for an example, works as before.

mwittig commented 8 years ago

@kitsunen It is separated as far as I can see. Can you please post the debug output you get for switches? Thanks

nvirm commented 8 years ago

ON debug [pimatic-homeduino]: contact1: { id: 12157118, all: false, contact: false, unit: 0 }

13:44:27debug [pimatic-homeduino]: pir5: { id: 12157118, all: false, presence: true, unit: 0 }

13:44:27debug [pimatic-homeduino]: switch1: { id: 12157118, all: false, state: true, unit: 0 }

13:44:27debug [pimatic-homeduino]: received: [ 284, 1268, 2604, 10196 ] 020001000101000001010001000100000100010100010000010001000100010001000100010100000101000100010001000100000100010100000100010001000103

13:44:27debug [pimatic-homeduino]: data: "RF receive 284 2604 1268 10196 0 0 0 0 010002000202000002020002000200000200020200020000020002000200020002000200020200000202000200020002000200000200020200000200020002000203"

OFF 13:44:24debug [pimatic-homeduino]: contact1: { id: 12157118, all: false, contact: true, unit: 0 }

13:44:24debug [pimatic-homeduino]: pir5: { id: 12157118, all: false, presence: false, unit: 0 }

13:44:24debug [pimatic-homeduino]: switch1: { id: 12157118, all: false, state: false, unit: 0 }

13:44:24debug [pimatic-homeduino]: received: [ 288, 1264, 2604, 10196 ] 020001000101000001010001000100000100010100010000010001000100010001000100010100000101000100010001000100000100010001000100010001000103

13:44:24debug [pimatic-homeduino]: data: "RF receive 288 2604 1264 10196 0 0 0 0 010002000202000002020002000200000200020200020000020002000200020002000200020200000202000200020002000200000200020002000200020002000203"

Sorry, not sure with github formatting!

nvirm commented 8 years ago

Update on this: When adding the devices with AutoDiscovery, receiving works too. So adding devices via GUI manually might have a bug in it (generated config looks a bit different, things are in different order).

So it's not a problem with receiving itself (atleast on my system).

mwittig commented 8 years ago

Can you please post an example of a working device config created with AutoDiscovery and non-working device config you created manually? Thanks!

2016-07-01 21:55 GMT+02:00 kitsunen notifications@github.com:

Update on this: When adding the devices with AutoDiscovery, receiving works too. So adding devices via GUI manually might have a bug in it (generated config looks a bit different, things are in different order).

So it's not a problem with receiving itself (atleast on my system).

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/pimatic/pimatic-homeduino/issues/65#issuecomment-230034608, or mute the thread https://github.com/notifications/unsubscribe/AF1ZbuRAQWIdRcf9xfG7soeTtlCAp-Kzks5qRXDAgaJpZM4I_e2y .

nvirm commented 8 years ago

This is created with Pimatic Frontend Manually: { "id": "swi-1", "name": "Swi-1", "class": "HomeduinoRFSwitch", "protocols": [ { "name": "switch1", "options": { "id": "12157118", "unit": 2 }, "send": true, "receive": true } ] }, This is created with Pimatic Frontend with Autodiscover: { "class": "HomeduinoRFSwitch", "protocols": [ { "name": "switch1", "options": { "id": 12157118, "unit": 2 } } ], "id": "switch1", "name": "Jalkalamppu" },

sweetpi commented 8 years ago

Should be fixed with latest pimatic-homeduino update.