SmartAxiom / openhab

Automatically exported from code.google.com/p/openhab
0 stars 0 forks source link

Commands are sent twice in GreenT UI #188

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
When pressing a Button in GreenT UI all commands are sent twice:

21:20:03.883 INFO  runtime.busevents[:42] - Licht_EG_Buero received command ON
21:20:04.175 INFO  runtime.busevents[:42] - Licht_EG_Buero received command ON

In the classic openHAB UI the behavior is as expected - one click and as result 
one command.

Browser: Chrome
openHAB: 1.1

Original issue reported on code.google.com by pjatisch...@gmail.com on 19 Jan 2013 at 6:05

GoogleCodeExporter commented 8 years ago

Original comment by kai.openhab on 19 Jan 2013 at 9:15

GoogleCodeExporter commented 8 years ago
Thanks for the report. I'll check this issue next week.

Original comment by mishoboss on 23 Jan 2013 at 12:49

GoogleCodeExporter commented 8 years ago
Anything new about this topic?

Original comment by pjatisch...@gmail.com on 22 Apr 2013 at 8:07

GoogleCodeExporter commented 8 years ago
I noticed this behavior as well. I assumed the second command was a to help 
ensure the API received the command.

Original comment by Amos.Kit...@gmail.com on 11 May 2013 at 12:37

GoogleCodeExporter commented 8 years ago
Same problem here as well. My TV has togled mute command, meaning that first 
mute command will enable mute and next command will disable mute. So mute does 
not work via greent UI as expected.

Original comment by pauli.an...@gmail.com on 2 Jun 2013 at 5:41

GoogleCodeExporter commented 8 years ago
I noticed this behavior as well. There's unneeded network congestion especially 
with z-wave.

Original comment by daniel.a...@gmail.com on 14 Jun 2013 at 8:11

GoogleCodeExporter commented 8 years ago
Hi all, 
thank you for the reports. Unfortunately the last few months I have no free 
time at all, due to some major changes in my life. I really hope to find some 
time and fix this issue (and some other issues too) and release a new version. 
However I can't say when will happen that. I hope to be soon, but I don't give 
any guarantee.

Thank you one more time for using GreenT UI and the patience.

Regards,
Mihail

Original comment by mishoboss on 14 Jun 2013 at 8:27

GoogleCodeExporter commented 8 years ago
I quickly debug the problem and it seems that problem is caused by double 
events. So firstly click event will send a command and then immediately after 
click, the singletap event will send a command as well.

Ext.define('Oph.field.Toggle', {
    extend: 'Ext.field.Toggle',
    xtype: 'oph_togglefield',

...

singletap: function () {
    sendCommand(component.config.oph_item, component.formatOutputValue(component.getValue()));
},
click: function () {
    sendCommand(component.config.oph_item, component.formatOutputValue(component.getValue()))
}

I'm not familiar with sencha touch, but why there is two similar events 
handlers?

Br,
Pali

Original comment by pauli.an...@gmail.com on 14 Jun 2013 at 3:19

GoogleCodeExporter commented 8 years ago
Hi Mihail,

I removed click event on toggle and it seems to work fine. I tested with Safari 
and Chrome browsers on OS X and with iPhone and iPad as well.

But I still wonder that, maybe there was good reason why both single tap and 
click was handled?

if you agree that click event on toggle is leftover and you are currently too 
busy to fix the problem, I can commit fix on my clone and ask Thomas or Kai to 
commit to main repo?

Br,
Pali

Original comment by pauli.an...@gmail.com on 15 Jun 2013 at 8:21

GoogleCodeExporter commented 8 years ago
Hi, I think these duplicate events was made due to the fact older versions of 
iOS didn't recognized the click event. Something like that. I can't remember 
quite good. If you tested it and it works, you can give it to me and I will 
push the uptade. GreenT has its own update facility and when there is a new 
version, all clients out there get notified about this and can automatically 
update.

Thanks for putting efford on this!

Original comment by mishoboss on 15 Jun 2013 at 10:05

GoogleCodeExporter commented 8 years ago
> I can commit fix on my clone and ask Thomas or Kai to commit to main repo?

Would be perfect, I'll include it then, so that it is also part of the 1.3.0 
release (so that a new installation does not need to be directly updated 
through Mihails mechanism).

Original comment by kai.openhab on 16 Jun 2013 at 9:21

GoogleCodeExporter commented 8 years ago
I committed change on my clone.

Changeset: 
http://code.google.com/r/paulianttila-ihc-binding/source/detail?r=467caeb47498a3
7aae18f06d91778383d40bd397

Original comment by pauli.an...@gmail.com on 16 Jun 2013 at 6:20

GoogleCodeExporter commented 8 years ago
Thanks a lot Pali, changeset is pulled into main repo:
https://code.google.com/p/openhab/source/detail?r=06e30cdc1970641f16f289cdc7fef4
ea4cc5524c

Original comment by kai.openhab on 16 Jun 2013 at 8:23