0
1

Вот код:

this.ZWAY_DATA_CHANGE_TYPE = {
  "Updated": 0x01,       // Value updated or child created
  "Invalidated": 0x02,   // Value invalidated
  "Deleted": 0x03,       // Data holder deleted - callback is called last time before being deleted
  "ChildCreated": 0x04,  // New direct child node created

  // ORed flags
  "PhantomUpdate": 0x40, // Data holder updated with same value (only updateTime changed)
  "ChildEvent": 0x80     // Event from child node
};

var self = this;

zway.devices[5].data.isFailed.bind(function(type, arg) {
  if (!(type & self.ZWAY_DATA_CHANGE_TYPE["PhantomUpdate"])) {
    debugPrint("new value" + this.value);
  }
});

Вот лог:

[2014-08-27 13:32:39.978] Executing script: zway.devices[5].instances[2].commandClasses[37].Set(255)
[2014-08-27 13:32:39.982] Adding job: SwitchBinary Set
[2014-08-27 13:32:39.983] Adding job: SwitchBinary Get
[2014-08-27 13:32:39.989] SENDING (cb 0x05): ( 01 0E 00 13 05 07 60 0D 01 02 25 01 FF 25 05 75 )
[2014-08-27 13:32:40.000] RECEIVED ACK
[2014-08-27 13:32:40.014] RECEIVED: ( 01 04 01 13 01 E8 )
[2014-08-27 13:32:40.015] SENT ACK
[2014-08-27 13:32:40.016] Delivered to Z-Wave stack
[2014-08-27 13:32:40.027] RECEIVED: ( 01 05 00 13 05 00 EC )
[2014-08-27 13:32:40.028] SENT ACK
[2014-08-27 13:32:40.028] Job 0x13 (SwitchBinary Set): Delivered
[2014-08-27 13:32:40.028] SETDATA devices.5.data.lastPacketInfo.delivered = True
[2014-08-27 13:32:40.028] SETDATA devices.5.data.lastPacketInfo.packetLength = 10 (0x0000000a)
[2014-08-27 13:32:40.028] SETDATA devices.5.data.lastPacketInfo.deliveryTime = 11 (0x0000000b)
[2014-08-27 13:32:40.028] SETDATA devices.5.data.lastPacketInfo = **********
[2014-08-27 13:32:40.029] SendData Response with callback 0x05 received: received by recipient
[2014-08-27 13:32:40.029] SETDATA devices.5.data.lastSend = 125373 (0x0001e9bd)
[2014-08-27 13:32:40.029] Job 0x13 (SwitchBinary Set): success
[2014-08-27 13:32:40.029] Removing job: SwitchBinary Set
[2014-08-27 13:32:40.097] SENDING (cb 0x06): ( 01 0D 00 13 05 06 60 0D 01 02 25 02 25 06 88 )
[2014-08-27 13:32:40.109] RECEIVED ACK
[2014-08-27 13:32:40.120] RECEIVED: ( 01 04 01 13 01 E8 )
[2014-08-27 13:32:40.121] SENT ACK
[2014-08-27 13:32:40.122] Delivered to Z-Wave stack
[2014-08-27 13:32:40.133] RECEIVED: ( 01 05 00 13 06 00 EF )
[2014-08-27 13:32:40.137] SENT ACK
[2014-08-27 13:32:40.138] Job 0x13 (SwitchBinary Get): Delivered
[2014-08-27 13:32:40.139] SETDATA devices.5.data.lastPacketInfo.delivered = True
[2014-08-27 13:32:40.140] SETDATA devices.5.data.lastPacketInfo.packetLength = 9 (0x00000009)
[2014-08-27 13:32:40.141] SETDATA devices.5.data.lastPacketInfo.deliveryTime = 16 (0x00000010)
[2014-08-27 13:32:40.143] SETDATA devices.5.data.lastPacketInfo = **********
[2014-08-27 13:32:40.144] SendData Response with callback 0x06 received: received by recipient
[2014-08-27 13:32:40.145] SETDATA devices.5.data.lastSend = 125382 (0x0001e9c6)
[2014-08-27 13:32:40.145] Job 0x13 (SwitchBinary Get): success
[2014-08-27 13:32:40.146] Removing job: SwitchBinary Get
[2014-08-27 13:32:40.157] RECEIVED: ( 01 0D 00 04 00 05 07 60 0D 02 01 25 03 FF 43 )
[2014-08-27 13:32:40.158] SENT ACK
[2014-08-27 13:32:40.159] SETDATA devices.5.data.lastReceived = 0 (0x00000000)
[2014-08-27 13:32:40.160] SETDATA devices.5.instances.2.commandClasses.37.data.level = True
[2014-08-27 13:32:58.979] Job 0x13: deleted from queue
[2014-08-27 13:32:59.047] Job 0x13: deleted from queue

Где я ошибся?

Ссылка на исходный вопрос

задан 27 Авг '14, 14:40

Antti's gravatar image

Antti
1231217
процент согласия: 66%

отредактирован 27 Авг '14, 18:47

PoltoS's gravatar image

PoltoS ♦♦
5731412

преобразовал в отдельный вопрос и форматирование за вас сделал. пожалуйста, прочтите правила пользования ресурсом: http://ask.z-wave.me/faq/

(27 Авг '14, 18:48) PoltoS ♦♦ PoltoS's gravatar image

получилось?

(01 Сен '14, 14:23) PoltoS ♦♦ PoltoS's gravatar image

Получилось, но не совсем... Там, где был исходный вопрос еще мои два комментария, не сразу заметил создание отдельного вопроса... Можно их оттуда сюда перенести ?

(02 Сен '14, 15:51) Antti Antti's gravatar image

Дык, вы не глядя применили мой код. А я там совсем не на тот data holder вешаюсь, который вы хотите. Я на zway.devices[5].data.isFailed, а Вы ждёте zway.devices[5].instances[2].commandClasses[37].data.level

ссылка

отвечен 27 Авг '14, 19:40

PoltoS's gravatar image

PoltoS ♦♦
5731412
процент согласия: 27%


Important Things To Know Before Installing A Fence

To ensure that your canine friend is usually in your area and prevent it going at the pool area (or other areas) to prevent accidents, receive the right dog containment fence. The fence is a superb way to let your puppy roam and play safely around your back yard. Even if is contained, your canine will still feel safe should you build the correct type of fence according to their breeds.

A deer many be highly devastating to you, if you have grown valuable crops with your vineyard. This animal many storm into the investments whenever and may trample or eat your plants. As you spend quite a bit of your time and money, keep this animal from yards is essential to earn profits on the you invested. Using advanced deer fence systems created using wire could be the best deer control method, though there are many other ways to control a deer. Make sure you buy durable and strong fencing system from reputed deer fencing service providers. Choose fences that require less or no maintenance. Choosing a deer fence is not simple today. The reason? There are is a many deer fencing companies. In addition, deer control systems come in an array of sizes, shape and materials. The quality and price differs from fence to fence. You will come across 8 to 15 feet in height fences in the market, most in the farmers choose a deer fencing system with eight to ten ft . tall, as this much height is sufficient prevent deer from entering your investment funds. Fencing systems can be found in various materials, but a fence constructed with wire or mesh is a lot helpful for your gardens, orchards, nurseries, landscapes, wykonanie ogrodzenia Winylowe timber regeneration, flowers, fruits, vegetable and also other agricultural crops.
A fence can enhance a property's appearance by developing a a feeling of balance and stability. A house which could appear adrift inside a sea of grass emerges the look of being harbored and secured when contained by the fence. Homes which might be towards the sidewalk appear to have more land connected with them every time a fence separates them from the street. The fence may complement the structures on the property, possibly by utilizing a few of the architectural details in its own design. It harmonizes using the landscaping in certain settings, becoming a backdrop to get a bed of tulips or perhaps a support for climbing clematis or roses.
This in-between place is fraught with anxiety and frustration. You may be wanting to advertise your business, when you're undecided in any are of one's business, it feels as though you're swimming upstream in mud. It feels using this method because, despite doing so within your business, you're splitting your mental energy by also looking for jobs. You get excited because you get an interview which then redirects your power some place besides your small business. When you don't land the work, you figure you'll refocus your time and effort inside your business.

You can buy fencing from numerous avenues; often it is rather inexpensive, possibly even it appears, but it's most unlikely to become good quality fence. However, you'll need a fence to perform exactly like when you have replacement double glazed windows installed, or new sidings. Quality is vital; a fence should enhance the overall look of the property and there's one sure strategy to accomplish that that is certainly to secure a custom built fence.

ссылка

отвечен 28 Ноя '15, 04:57

CaitlynTruong56's gravatar image

CaitlynTruong56
1
процент согласия: 0%

Ваш ответ
toggle preview

Следить за этим вопросом

По почте:

Авторизовавшись, здесь Вы сможете подписаться на обновления по этому вопросу.

По RSS:

Ответы

Ответы и комментарии

Основы размётки

  • *курсив* или _курсив_
  • **жирный** или __жирный__
  • ссылка:[текст](http://url.com/ "Суть вопроса")
  • картинка?![alt текст](/path/img.jpg "Суть вопроса")
  • нумерованый список: 1. Foo 2. Bar
  • чтобы добавить перенос строки в тексте, сделайте два переноса строки в редакторе
  • базовые теги HTML также поддерживаются

Теги к вопросу:

×253
×158
×56
×30
×24

Задан: 27 Авг '14, 14:40

Просмотров: 26,464 раз

Отредактирован: 28 Ноя '15, 04:57

powered by OSQA