pimatic / pimatic

A home automation server and framework for the raspberry pi running on node.js
http://pimatic.org
GNU General Public License v2.0
598 stars 144 forks source link

[pimatic-homeduino] no stable receiving without arduino #351

Open joenex1 opened 10 years ago

joenex1 commented 10 years ago

Homeduino plugin is sending succesfully. The receiving however is not stable, For example, with a remote control (AYCT-102):

I connected a LED to the output of the LPF and it constantly flickers. When the remote control is pressed it goes ON and OFF for a short period. I can't see any difference here between a short press or long press. My setup looked like this:

dsc_0664

I've rebuild it and added wires between the resistor and the ATTiny45. I do not have the condensators installed like suggested by wo_rasp:

http://forum.pilight.org/Thread-Europe-Only-Band-pass-filter-parts?page=5

incmve commented 10 years ago

Try it without the resistors.

Quote from pilight:

I use this circuit without resistors. if you want you can even power the ATTiny with 3.3V, it works for 4 out 5 ATTiny's, but i think the timing is less accurate.

I have had the attiny with resistors and had some trouble with reception, without resistors it worked fine for me.

sweetpi commented 10 years ago

Die it work better with pilight?

Do you get debug outputs in the log when the button is pressed short and it does not react?

The prefilter method does currently not work such well. So also consider switching to the arduino method, which is the one more stable.

joenex1 commented 10 years ago

incmve, which resistors do you suggest to remove? The one between the ATTiny and the GPIO?

sweetpi, i will re-test pilight (forgot if it worked) this weekend and look at the debug outputs if it doesn't react!

Fritz4all commented 10 years ago

No resistors worked fine for me.

incmve commented 10 years ago

untitled @joenex1 I didn't use any resisitor.

koffienl commented 10 years ago

Same from here : get rid of the resistors. They are not needed and give more problems. Also, IIRC @Fritz4all had more receive problems with LPF than without. I suggest replacing it with a arduino nano clone.

Fritz4all commented 10 years ago

True, ordered a Arduino, removed the LPF and switched to the arduino, no more false positives, send or receive misses ;-)

We ordered 3 assembled with usb cable : http://www.ebay.com/itm/141287092498?ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649

incmve uses this one and works to : http://www.ebay.com/itm/311064700128?ssPageName=STRK:MESINDXX:IT&_trksid=p3984.m1436.l2649 (cheaper, but no usb cable)

joenex1 commented 10 years ago

Ok. I first removed the resistors: no noticeable improvement. Then I removed the LPF: it feels like less misses now but still definitely too much, around 10%. The cpu usage also increased to 35% idle. Sweetpi, I enabled the debug settings but nothing is visible in the daemon.log when the receiver misses.

I'll think about the Arduino, it can only be programmed using the USB cable right?

koffienl commented 10 years ago

Should be possible with the extra header (ICSP) , but you have to use the USB anyway for connecting to the device with pimatic. Programming from the Pi is really easy with the scripts available.

The link @Fritz4all gave, with the assembled version came in with 8 or 9 days :+1:

Icesory commented 10 years ago

A Antenna should improve your receiver. A cable wit a lenght around 17cm shoud connected to the antenna pin. Or you buy a realy good antenna [Diamond SRH771] 70cm band

joenex1 commented 10 years ago

Thx Icesory, I've connected an antenna and will check if it's improved.

Maybe another issue worth mentioning in this topic, when I press on/off on the group button of the AYCT-102, all my devices (9) will turn on/off. Not only the ones included in the group! Is this known already?

koffienl commented 10 years ago

I don't see the relation between pimatic and pressing a button on a physical remote ?

joenex1 commented 10 years ago

Koffie, the KAKU remote has 5 buttons. 4x devices and one button which can be used to turn several devices on/off simultaneously. Pimatic should only update the devices which are linked to the group, right?

koffienl commented 10 years ago

No it should not. Your device has a unique unit number (factory default). When you send a group on/off every KaKu device that was connected to tha unit number (read: that remote control) will switch on or off. Pimatic has nothing do to with the group command.