Дошли руки до настройки, наткнулся на непонятную ситуацию: Порт настроен P&R, если много раз подряд нажать на кнопку - перестают приходить события в openHAB.
Если не трогать кнопку секунд 30, опять начинает работать как требуется.
Завтра проверю, отвечает ли в этот промежуток мега.
---
Проверил, трудно объяснить, события от кнопки перестают приходить, но опрос по "refresh=5 сек" происходит (счетчик нажатий показывает корректное значение),
т.е. мега отрабатывает как нужно, но что-то не то с биндингом, похоже множатся незакрытые соединения и пока система их не закроет, не дает открывать новые.
Видео, если поможет разобраться
https://www.youtube.com/watch?v=-ZellNv39wQ
и после записи видео ошибки, больше кнопку не нажимал:
Код: Выделить всё
13:48:20.853 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
13:48:21.059 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
13:48:21.075 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2730 to 2736
13:48:26.098 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2736 to 2740
13:48:31.120 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2740 to 2750
13:48:36.144 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2750 to 2752
13:48:41.167 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2752 to 2756
13:48:46.190 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2756 to 2758
13:48:51.214 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2758 to 2760
13:48:56.237 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2760 to 2762
13:50:23.147 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
13:52:26.453 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
14:07:26.001 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
14:08:16.311 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
14:09:25.040 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
14:09:25.087 [ERROR] [ab.binding.megad.handler.MegaDHandler] - Connect to megadevice 192.168.1.5 error: connect timed out
А вот если быстро понажимать, см нижние строки, даже через 40с нет реакции на нажатие, хотя счетчик отрабатывает:
Код: Выделить всё
11:20:33.758 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
11:20:33.822 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
... тут ок
11:20:37.021 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:20:37.114 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
11:20:37.115 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2298 to 2344
11:20:37.211 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:20:37.301 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
... тут ок
11:20:39.084 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:20:42.137 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
... началось
11:20:42.139 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2344 to 2397
11:20:47.160 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2397 to 2445
11:20:52.184 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2445 to 2481
11:20:57.206 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2481 to 2507
11:21:02.229 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:21:02.230 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2507 to 2520
.. ждал около 40с, нажал 1 раз, события о нажатии нет, только счетчик
11:21:42.420 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2520 to 2522
11:21:52.467 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2522 to 2524
11:22:51.347 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
11:22:51.475 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:22:52.745 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2524 to 2526
11:22:53.212 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
11:22:53.381 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:22:56.199 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from OFF to ON
11:22:56.359 [INFO ] [smarthome.event.ItemStateChangedEvent] - sensButton0 changed from ON to OFF
11:22:57.768 [INFO ] [smarthome.event.ItemStateChangedEvent] - counterButton0 changed from 2526 to 2530
openHAB 2.4 пустой, запустил на Win7 x64 Pro потестить собранный щит с мегами.
Может это особенность Windows, и под Linux будет вести себя по другому?
--
Соответственно в момент "зависания" не отвечает меге что сервер онлайн и выполняется сценарий из поля Act.