├── .gitignore ├── .gitmodules ├── CC └── .keep ├── CODE └── .keep ├── LICENSE ├── LOG_LEVEL └── .keep ├── MF └── .keep ├── Makefile ├── NT └── .keep ├── README.md ├── VT └── .keep ├── api.cpp ├── api.go ├── api.h ├── api ├── api.cpp ├── manager.h ├── node.h ├── notification.h ├── options.h ├── shareable.h └── value.h ├── api_darwin.go ├── api_linux.go ├── api_test.go ├── configurator.go ├── device.go ├── events.go ├── go ├── logger.go ├── manager.cpp ├── network.go ├── node.cpp ├── node.go ├── notification.cpp ├── notification.go ├── options.cpp ├── overview.go ├── ozwcp └── darwin │ ├── README │ ├── README.ninja.md │ ├── config │ ├── cp.html │ ├── cp.js │ └── ozwcp ├── run.go ├── scripts ├── GenerateCC.sh ├── GenerateCODE.sh ├── GenerateLOG_LEVEL.sh ├── GenerateMF.sh ├── GenerateNT.sh ├── GenerateVT.sh ├── makeCrossLink.sh └── start-ozwcp.sh ├── shareable.cpp ├── shareable.go ├── value.cpp ├── value.go ├── zwave_types.h └── zwcli ├── .gitignore ├── Makefile ├── README.md ├── go ├── scenarios ├── configured.multisensor.added.to.network.next.insertion │ ├── log │ └── output ├── configured.multisensor.added.to.network │ ├── log │ └── output ├── configured.multisensor.battery.off │ ├── log │ └── output ├── multisensor.added.back.to.network │ ├── log │ └── output ├── multisensor.asleep.during.controller.insertion │ ├── log │ └── output ├── multisensor.removed.from.network │ ├── log │ └── output ├── multisensor.removed.with.remove.device.then.added.back │ ├── log │ └── output ├── multisensor.user.wakeup.after.removal │ ├── log │ └── output ├── reset.controller.empty.network │ ├── log │ └── output └── wakeup.button.pressed.on.new.multisensor │ ├── log │ └── output ├── scripts ├── build.sh └── scenario.sh ├── version.go └── zwcli.go /.gitignore: -------------------------------------------------------------------------------- 1 | *~ 2 | NT/NT.go 3 | CODE/CODE.go 4 | CC/CC.go 5 | LOG_LEVEL/LOG_LEVEL.go 6 | VT/VT.go 7 | MF/MF.go 8 | OZW_Log.txt 9 | ozwcp/darwin/OZW_Log.txt 10 | ozwcp/darwin/README.ninja.html 11 | ozwcp/darwin/openzwavetinyicon.png 12 | ozwcp/darwin/zwcfg_0x0161d366.xml 13 | ozwcp/darwin/zwscene.xml 14 | zwcfg_*.xml 15 | zwscene.xml 16 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "openzwave"] 2 | path = openzwave 3 | url = git@github.com:OpenZWave/open-zwave.git 4 | -------------------------------------------------------------------------------- /CC/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/CC/.keep -------------------------------------------------------------------------------- /CODE/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/CODE/.keep -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Ninja Blocks Inc. 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /LOG_LEVEL/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/LOG_LEVEL/.keep -------------------------------------------------------------------------------- /MF/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/MF/.keep -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | # 2 | # Makefile that builds the required library dependency, then installs the go module 3 | # 4 | GENERATED=NT/NT.go CC/CC.go LOG_LEVEL/LOG_LEVEL.go CODE/CODE.go VT/VT.go MF/MF.go 5 | 6 | all: build 7 | 8 | build: here 9 | 10 | here: deps fmt 11 | mkdir -p NT 12 | go install 13 | 14 | libs: 15 | cd openzwave && make 16 | 17 | clean: clean-src 18 | cd openzwave && make clean 19 | go clean -i 20 | rm -rf $(GENERATED) 21 | 22 | clean-src: 23 | find . -name '*~' -exec rm {} \; 24 | 25 | fmt: 26 | gofmt -s -w *.go 27 | 28 | deps: libs 29 | scripts/GenerateNT.sh 30 | scripts/GenerateCODE.sh 31 | scripts/GenerateCC.sh 32 | scripts/GenerateLOG_LEVEL.sh 33 | scripts/GenerateVT.sh 34 | scripts/GenerateMF.sh 35 | 36 | control-panel: 37 | @echo "run 'scripts/start-ozwcp.sh', configure the device as /dev/cu.SLAB_USBtoUART, then hit initialize." -------------------------------------------------------------------------------- /NT/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/NT/.keep -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | go-openzwave 2 | ============ 3 | A minimal 'Go' binding to the C++ openzwave library. 4 | 5 | Note that only the subset of functionality required to support Ninja's current requirements is exposed. 6 | 7 | Building 8 | ======== 9 | To build run `make` in the project directory. Once the non-Go dependencies are built `go install` will suffice to rebuild it. 10 | 11 | This build relies on the cgo tool to provide access to the openzwave C++ library. Cross-compilation and cgo cannot create linux/arm targets so to build 12 | the linux/arm target you need to run the build natively on a linux/arm host. 13 | 14 | Abstractions 15 | ============ 16 | There is a set of C functions and structure declarations for each abstraction in C++ that the Go Layer needs access to. The type specific declarations are located in a file called api/{type}.h. 17 | 18 | Each declaration file has two sections - a C section which will be consumed by the 'Go' cgo tool and the implementation and a C++ section which will be consumed only by the implementation. 19 | The C++ section must be guarded by an #ifdef __cplusplus directive in order to prevent it being parsed by the C parser, in particular the C parser that the #cgo tool will invoke. 20 | 21 | References to implementation types should only appear in the C++ section of each type declaration. 22 | 23 | Any includes for OpenWave C++ header files should be moved into the "implementation dependencies" section of api.h and guarded with #ifdef __cplusplus directives. 24 | 25 | As a rule, .cpp files should only need to include "api.h" 26 | 27 | Memory Management 28 | ================= 29 | The C structures must not refer to any C++ types or objects. As a rule, there should be a triplet of functions `new{Type}()`, `free{Type}()` and `export{Type}()` for each abstraction. 30 | 31 | The `export{Type}` must perform a deep copy of all required parts of the C++ representation to the C representation that can be used by `Go`. It should call the `new{Type}` function of its 32 | own type and the `export{Type}` functions of related types. The object returned by the export function must not contain any references to memory that are also retained by the C or C++ layer. 33 | 34 | The `Go` consumer must guarantee to call the `free{Type}` function when an exported object is no longer required. The `free{Type}` function should deallocate any allocations performed by the corresponding `export{Type}` function during the original export of the object, usually by call free(void *) on directly allocated memory and `free{Type}` on memory allocated by the `export{RelatedType}` functions 35 | of related types. 36 | 37 | Code Generation 38 | =============== 39 | This module uses bash scripts to analyse the OpenZWave++ code and generate typesafe Go enumerations for the relevant constants. These generation steps run as part of the 'deps' step of the project Makefile. Note that use of code generation for the sub-packages means that `go get -d` will fail for these projects because of a chicken and egg problem. This can be fixed by manually checking out this project and then running `make deps` before running `go get -d` in the consuming project. 40 | 41 | Dependencies 42 | ============ 43 | openzwave - 1.4 - https://github.com/OpenZWave/open-zwave/tree/v1.4 44 | 45 | Files 46 | ===== 47 | * api.h - a two-part (C and C++) header file. Should be the only include required by the implementation. Implementation types are restricted to the C++ part of the file. 48 | * api/{type}.h - a two-part (C and C++) header that contains the shared C abstraction and type specific C++ functions used by the implementation of a specific C abstraction. 49 | * {type}.cpp - a C++ implementation of the functions declared in api/{type}.h 50 | * api.go - 'Go' glue-code required to marhsall to and from the functions declared in api/*.h 51 | * scripts/Generate{PREFIX}.sh - code generators for various type safe enumerations extracted from the OpenZWave source. 52 | -------------------------------------------------------------------------------- /VT/.keep: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/VT/.keep -------------------------------------------------------------------------------- /api.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // api.cpp 3 | // 4 | // Provides marshalling between C and C++ abstractions. There is typically one C function in this module for each Go function in api.go 5 | // 6 | 7 | #include "api.h" 8 | 9 | -------------------------------------------------------------------------------- /api.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // 4 | // Provides a facade for the C++ API that exposes just enough of the underlying C++ 5 | // API to be useful to implementing the Ninja Zwave driver 6 | // 7 | // The functions in this module are responsible for marshalling to and from the C functions 8 | // declared in api.hpp and api.cpp. 9 | // 10 | 11 | // 12 | // The following #cgo directives assumed that 'go' is a symbolic link that references the gopath that contains the current directory, e.g. ../../../.. 13 | // 14 | // All 'go' packages that have this package as a dependency should include such a go link and will then inherit the library built in this package. 15 | // 16 | 17 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 18 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 19 | // #include "api.h" 20 | import "C" 21 | 22 | // A value-less type that is used to represent signals generated by the API, particularly quit signals used to 23 | // ask an EventLoop to quit. 24 | 25 | type api struct { 26 | shareable 27 | loop EventLoop 28 | callback NotificationCallback 29 | eventCallback EventCallback 30 | deviceFactory DeviceFactory 31 | device string 32 | quitEventLoop chan int 33 | shutdownDriver chan int 34 | logger Logger 35 | networks map[uint32]*network 36 | quitDeviceMonitor chan int 37 | } 38 | 39 | // 40 | // The API interface is available to implementors of the EventLoop type when the 41 | // Configurator.Run() method is called. 42 | // 43 | type API interface { 44 | // The EventLoop should return from the function when a signal is received on this channel 45 | QuitSignal() chan int 46 | 47 | // the API logger 48 | Logger() Logger 49 | 50 | // Get a network by HomeID 51 | // Returns network, or nil if no network exists matching the specified HomeID 52 | GetNetwork(homeId uint32) Network 53 | 54 | // Shutdown the event loop 55 | Shutdown(exit int) 56 | } 57 | 58 | // 59 | // Begin the construction of the API by returning a Configurator 60 | // 61 | // configPath is the name of the directory containing openzwave configuration files; 62 | // userPath is the name of the directory containing user specific openzwave configuration files; 63 | // overrides are command line options (uptto --) that can overide the configuration provided by the previous two options. 64 | // 65 | // For more information about these parameters, refer to the documentation for the C++ OpenZWave::Options class. 66 | // 67 | func BuildAPI(configPath string, userPath string, overrides string) Configurator { 68 | var ( 69 | cConfigPath *C.char = C.CString(configPath) 70 | cUserPath *C.char = C.CString(userPath) 71 | cOverrides *C.char = C.CString(overrides) 72 | ) 73 | //defer C.free(unsafe.Pointer(cConfigPath)) 74 | //defer C.free(unsafe.Pointer(cUserPath)) 75 | //defer C.free(unsafe.Pointer(cOverrides) 76 | C.startOptions(cConfigPath, cUserPath, cOverrides) 77 | var r *api 78 | r = &api{ 79 | loop: defaultEventLoop, 80 | callback: nil, 81 | eventCallback: defaultEventCallback, 82 | deviceFactory: defaultDeviceFactory, 83 | device: defaultDriverName, 84 | quitEventLoop: make(chan int, 0), 85 | shutdownDriver: make(chan int, 2), 86 | logger: &defaultLogger{}, 87 | networks: make(map[uint32]*network), 88 | quitDeviceMonitor: make(chan int, 2)} 89 | r.shareable.init(r) 90 | return r 91 | } 92 | 93 | func (a *api) QuitSignal() chan int { 94 | return a.quitEventLoop 95 | } 96 | 97 | func (a *api) Logger() Logger { 98 | return a.logger 99 | } 100 | 101 | func (a *api) GetNetwork(homeId uint32) Network { 102 | net, ok := a.networks[homeId] 103 | if !ok { 104 | return nil 105 | } 106 | return net 107 | } 108 | 109 | func (a *api) getNetwork(homeId uint32) *network { 110 | net, ok := a.networks[homeId] 111 | if !ok { 112 | net = newNetwork(homeId) 113 | a.networks[homeId] = net 114 | } 115 | return net 116 | } 117 | 118 | func (a *api) notifyEvent(event Event) { 119 | if a.eventCallback != nil { 120 | a.eventCallback(a, event) 121 | } 122 | } 123 | -------------------------------------------------------------------------------- /api.h: -------------------------------------------------------------------------------- 1 | #ifndef API_H 2 | #define API_H 3 | // 4 | // api.h 5 | // 6 | // Provides marshalling between C and C++ abstractions. There is typically one C function in this module for each Go function in api.go 7 | // 8 | // See api.cpp for additional information. 9 | // 10 | 11 | #include 12 | #include 13 | #include 14 | #include "zwave_types.h" 15 | 16 | #ifdef __cplusplus 17 | #include 18 | 19 | // 20 | // __cplusplus will be true only in code that is part of the implementation (C++ code) 21 | // 22 | // In these cases, we include the implementation C++ headers so that individual modules 23 | // do not have to. 24 | // 25 | 26 | #include "Value.h" 27 | #include "Manager.h" 28 | #include "Notification.h" 29 | #include "Options.h" 30 | #include "platform/Log.h" 31 | 32 | // 33 | // The following ifdef magic is absolutely required to ensure that #cgo that doesn't understand how to parse C++ headers doesn't 34 | // see the extern "C" declaration during the C parse of these headers. Failure to include this magic will result in link error 35 | // 36 | // See also http://stackoverflow.com/questions/1713214/how-to-use-c-in-go 37 | // 38 | extern "C" { 39 | #else 40 | #endif 41 | 42 | #include "api/shareable.h" 43 | typedef void API; 44 | #include "api/manager.h" 45 | #include "api/node.h" 46 | #include "api/value.h" 47 | #include "api/notification.h" 48 | #include "api/options.h" 49 | 50 | 51 | #ifdef __cplusplus 52 | #include "_cgo_export.h" 53 | } 54 | 55 | #endif 56 | 57 | #endif 58 | -------------------------------------------------------------------------------- /api/api.cpp: -------------------------------------------------------------------------------- 1 | Manager * startManager(API * api) 2 | { 3 | Manager * manager = newManager(OpenZWave::Manager::Create()); 4 | manager->manager->AddWatcher( OnNotification, api ); 5 | return manager; 6 | } 7 | 8 | void stopManager(API * api) 9 | { 10 | Manager * manager = asManager(api); 11 | manager->manager->RemoveWatcher(OnNotification, api); 12 | freeManager(manager); 13 | } 14 | 15 | -------------------------------------------------------------------------------- /api/manager.h: -------------------------------------------------------------------------------- 1 | extern void startManager(API * api); 2 | extern void stopManager(API * api); 3 | extern bool addNode(uint32 homeId, bool secure); 4 | extern bool addDriver(char * device); 5 | extern bool removeDriver(char * device); 6 | -------------------------------------------------------------------------------- /api/node.h: -------------------------------------------------------------------------------- 1 | typedef void GoNode; 2 | 3 | typedef struct NodeId { 4 | uint32 homeId; 5 | uint8 nodeId; 6 | } NodeId; 7 | 8 | typedef struct Node { 9 | struct NodeId nodeId; 10 | uint8 basicType; 11 | uint8 genericType; 12 | uint8 specificType; 13 | char * nodeType; 14 | char * manufacturerName; 15 | char * productName; 16 | char * nodeName; 17 | char * location; 18 | char * manufacturerId; 19 | char * productType; 20 | char * productId; 21 | } Node; 22 | 23 | extern void freeNode(Node *); 24 | #ifdef __cplusplus 25 | extern Node * exportNode(API * api, uint32 homeId, uint8 nodeId); 26 | #endif 27 | -------------------------------------------------------------------------------- /api/notification.h: -------------------------------------------------------------------------------- 1 | typedef void GoNotification; 2 | 3 | typedef struct Notification { 4 | uint8 notificationType; 5 | uint8 notificationCode; 6 | Node * node; //owned 7 | Value * value; // owned 8 | } Notification; 9 | 10 | extern void freeNotification(Notification *); 11 | 12 | #ifdef __cplusplus 13 | extern Notification * exportNotification(API * manager, OpenZWave::Notification const* notification); 14 | #endif 15 | -------------------------------------------------------------------------------- /api/options.h: -------------------------------------------------------------------------------- 1 | extern void startOptions(char * config, char * user, char * overrides); 2 | extern void addIntOption(char *, int ); 3 | extern void addBoolOption(char *, bool flag); 4 | extern void addStringOption(char *, char * value, bool append); 5 | extern void endOptions(); 6 | -------------------------------------------------------------------------------- /api/shareable.h: -------------------------------------------------------------------------------- 1 | typedef struct shareable { 2 | int sharedIndex; 3 | } shareable; 4 | 5 | shareable * newShareable(int i); 6 | -------------------------------------------------------------------------------- /api/value.h: -------------------------------------------------------------------------------- 1 | typedef void GoValue; 2 | 3 | typedef struct ValueID { 4 | uint64 id; 5 | uint8 valueType; 6 | uint8 commandClassId; 7 | uint8 instance; 8 | uint8 index; 9 | 10 | } ValueID; 11 | 12 | typedef struct Value { 13 | uint32 homeId; 14 | ValueID valueId; 15 | char * value; 16 | char * label; 17 | char * units; 18 | char * help; 19 | int32_t min; 20 | int32_t max; 21 | bool isSet; 22 | } Value; 23 | 24 | extern void freeValue(Value *); 25 | extern bool setUint8Value(uint32 homeId, uint64 id, uint8 value); 26 | extern bool getUint8Value(uint32 homeId, uint64 id, uint8 *value); 27 | extern bool setBoolValue(uint32 homeId, uint64 id, bool value); 28 | extern bool getBoolValue(uint32 homeId, uint64 id, bool *value); 29 | extern bool setFloatValue(uint32 homeId, uint64 id, float value); 30 | extern bool getFloatValue(uint32 homeId, uint64 id, float *value); 31 | extern bool setIntValue(uint32 homeId, uint64 id, int value); 32 | extern bool getIntValue(uint32 homeId, uint64 id, int *value); 33 | extern bool setStringValue(uint32 homeId, uint64 id, char * value); 34 | extern bool getStringValue(uint32 homeId, uint64 id, char ** value); 35 | extern bool refreshValue(uint32 homeId, uint64 id); 36 | extern bool setPollingState(uint32 homeId, uint64 id, bool state); 37 | 38 | #ifdef __cplusplus 39 | extern Value * exportValue(API *, uint32 homeId, OpenZWave::ValueID const &); 40 | #endif 41 | -------------------------------------------------------------------------------- /api_darwin.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | const defaultDriverName = "/dev/cu.SLAB_USBtoUART" 4 | -------------------------------------------------------------------------------- /api_linux.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | const defaultDriverName = "/dev/ttyUSB0" 4 | -------------------------------------------------------------------------------- /api_test.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | import "testing" 4 | 5 | func Test_RoundtripMarshaling(t *testing.T) { 6 | a := &api{} 7 | a.init(a) 8 | c := a.C() 9 | aa := unmarshal(c).Go().(*api) 10 | if a != aa { 11 | t.Fatalf("failed to round trip") 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /configurator.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // #include "api.h" 6 | import "C" 7 | 8 | // This interface is used to configure the API by setting various options, 9 | // and the controller device name. When configuration is finished, call the Run method 10 | // with an EventLoop function. 11 | // 12 | // To obtain a reference to this interface, call BuildAPI(). 13 | // 14 | // The result of the Run function can be passed as a parameter to Os.Exit(). 15 | // 16 | // 17 | type Configurator interface { 18 | //Configure the logger implementation. 19 | SetLogger(Logger) Configurator 20 | 21 | //Configure the synchronous notification callback. 22 | SetNotificationCallback(NotificationCallback) Configurator 23 | 24 | //Configure the synchronous events callback 25 | SetEventsCallback(eventCallback EventCallback) Configurator 26 | 27 | //Configure the synchronous events callback 28 | SetDeviceFactory(deviceFactory DeviceFactory) Configurator 29 | 30 | //Configure the event loop function 31 | SetEventLoop(EventLoop) Configurator 32 | 33 | // Add an integer option. 34 | AddIntOption(option string, value int) Configurator 35 | 36 | // Add a boolean option. 37 | AddBoolOption(option string, value bool) Configurator 38 | 39 | // Add a string option. 40 | AddStringOption(option string, value string, append bool) Configurator 41 | 42 | // Set the device name used by the driver. 43 | SetDeviceName(device string) Configurator 44 | 45 | // Run the event loop forever 46 | Run() int 47 | } 48 | 49 | // configure the C++ Options object with an integer value 50 | func (a *api) AddIntOption(option string, value int) Configurator { 51 | var cOption *C.char = C.CString(option) 52 | //defer C.free(unsafe.Pointer(cOption)) 53 | 54 | C.addIntOption(cOption, C.int(value)) 55 | return a 56 | } 57 | 58 | // configure the C++ Options object with a boolean value 59 | func (a *api) AddBoolOption(option string, value bool) Configurator { 60 | var cOption *C.char = C.CString(option) 61 | 62 | //defer C.free(unsafe.Pointer(cOption)) 63 | C.addBoolOption(cOption, C._Bool(value)) 64 | return a 65 | } 66 | 67 | // configure the C++ Options object with a string value 68 | func (a *api) AddStringOption(option string, value string, append bool) Configurator { 69 | var cOption *C.char = C.CString(option) 70 | 71 | //defer C.free(unsafe.Pointer(cOption)) 72 | C.addStringOption(cOption, C.CString(value), C._Bool(append)) 73 | return a 74 | } 75 | 76 | // set the device name 77 | func (a *api) SetDeviceName(device string) Configurator { 78 | if device != "" { 79 | a.device = device 80 | } 81 | return a 82 | } 83 | 84 | // set the logger 85 | func (a *api) SetLogger(logger Logger) Configurator { 86 | a.logger = logger 87 | return a 88 | } 89 | 90 | // Clients of the API should provide Configuration.Run() with an implementation of this type to 91 | // handle the notifications generated by the API. 92 | // 93 | // The implementor can return a non-zero code to indicate that the process should exit now. 0 means 94 | // that the loop can be restarted, if required. 95 | // 96 | type EventLoop func(API) int 97 | 98 | // set the event loop 99 | func (a *api) SetEventLoop(loop EventLoop) Configurator { 100 | a.loop = loop 101 | return a 102 | } 103 | 104 | // A type of function that can receive notifications from the OpenZWave library when they occur. 105 | // 106 | // This callback is processed synchronously. This means that the implementor: 107 | // MUST NOT block; MUST NOT hand the reference to the notification to a goroutine which lives beyond 108 | // the callback call; MUST NOT store the reference to the notification in a structure that lives beyond 109 | // the duration of the callback call. 110 | type NotificationCallback func(API, Notification) 111 | 112 | // set the synchronous call back 113 | func (a *api) SetNotificationCallback(callback NotificationCallback) Configurator { 114 | a.callback = callback 115 | return a 116 | } 117 | 118 | type EventCallback func(API, Event) 119 | 120 | // set the synchronous call back 121 | func (a *api) SetEventsCallback(eventCallback EventCallback) Configurator { 122 | a.eventCallback = eventCallback 123 | return a 124 | } 125 | 126 | // set the device factory 127 | func (a *api) SetDeviceFactory(deviceFactory DeviceFactory) Configurator { 128 | a.deviceFactory = deviceFactory 129 | return a 130 | } 131 | -------------------------------------------------------------------------------- /device.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // A device is an abstraction used by higher-level parts of the system for the underlying ZWave node. 4 | type Device interface { 5 | NodeAdded() 6 | NodeChanged() 7 | NodeRemoved() 8 | ValueChanged(Value) 9 | } 10 | 11 | type DeviceFactory func(API, Node) Device 12 | 13 | type emptyDevice struct { 14 | } 15 | 16 | func defaultDeviceFactory(api API, node Node) Device { 17 | return &emptyDevice{} 18 | } 19 | 20 | func (*emptyDevice) NodeAdded() { 21 | } 22 | 23 | func (*emptyDevice) NodeChanged() { 24 | } 25 | 26 | func (*emptyDevice) NodeRemoved() { 27 | } 28 | 29 | func (*emptyDevice) ValueChanged(value Value) { 30 | } 31 | -------------------------------------------------------------------------------- /events.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | type Event interface { 4 | GetNode() Node 5 | } 6 | 7 | type nodeEvent struct { 8 | node Node 9 | } 10 | 11 | type NodeAvailable struct { 12 | nodeEvent 13 | } 14 | 15 | type NodeChanged struct { 16 | nodeEvent 17 | } 18 | 19 | type NodeUnavailable struct { 20 | nodeEvent 21 | } 22 | 23 | func (event nodeEvent) String() string { 24 | return event.node.(*node).String() 25 | } 26 | 27 | func (event nodeEvent) GetNode() Node { 28 | return event.node.(*node) 29 | } 30 | -------------------------------------------------------------------------------- /go: -------------------------------------------------------------------------------- 1 | ../../../.. -------------------------------------------------------------------------------- /logger.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | import "log" 4 | 5 | // A logger interface. Modelled on github.com/juju/loggo so that can be used substituted by default. 6 | type Logger interface { 7 | // Log an info message. 8 | Infof(message string, args ...interface{}) 9 | // Log a warning message. 10 | Warningf(message string, args ...interface{}) 11 | // Log an error message. 12 | Errorf(message string, args ...interface{}) 13 | // Log a debug message. 14 | Debugf(message string, args ...interface{}) 15 | // Log a trace message. 16 | Tracef(message string, args ...interface{}) 17 | } 18 | 19 | type defaultLogger struct { 20 | } 21 | 22 | func (*defaultLogger) Infof(message string, args ...interface{}) { 23 | log.Printf(message, args...) 24 | } 25 | 26 | func (*defaultLogger) Warningf(message string, args ...interface{}) { 27 | log.Printf(message, args...) 28 | } 29 | 30 | func (*defaultLogger) Errorf(message string, args ...interface{}) { 31 | log.Printf(message, args...) 32 | } 33 | 34 | func (*defaultLogger) Debugf(message string, args ...interface{}) { 35 | log.Printf(message, args...) 36 | } 37 | 38 | func (*defaultLogger) Tracef(message string, args ...interface{}) { 39 | log.Printf(message, args...) 40 | } 41 | -------------------------------------------------------------------------------- /manager.cpp: -------------------------------------------------------------------------------- 1 | #include "api.h" 2 | 3 | // forwards the notification from the C++ API to the Go layer - caller must free. 4 | static void OnNotification (OpenZWave::Notification const* notification, API * api) 5 | { 6 | Notification * exported = exportNotification(api, notification); 7 | onNotificationWrapper(exported, api); 8 | } 9 | 10 | void startManager(API * api) 11 | { 12 | OpenZWave::Manager::Create(); 13 | OpenZWave::Manager::Get()->AddWatcher( OnNotification, api ); 14 | } 15 | 16 | void stopManager(API * api) 17 | { 18 | OpenZWave::Manager::Get()->RemoveWatcher(OnNotification, api); 19 | OpenZWave::Manager::Destroy(); 20 | } 21 | 22 | bool addNode(uint32 homeId, bool secure) { 23 | return OpenZWave::Manager::Get()->AddNode(homeId, secure); 24 | } 25 | 26 | bool addDriver(char * device) 27 | { 28 | return OpenZWave::Manager::Get()->AddDriver(device); 29 | } 30 | 31 | bool removeDriver(char * device) 32 | { 33 | return OpenZWave::Manager::Get()->RemoveDriver(device); 34 | } 35 | -------------------------------------------------------------------------------- /network.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src 5 | // #include "api.h" 6 | import "C" 7 | 8 | import ( 9 | "github.com/ninjasphere/go-openzwave/NT" 10 | ) 11 | 12 | const ( 13 | MAX_NODES = 232 // max set by ZWave protocol 14 | ) 15 | 16 | // represents a single Zwave network 17 | type Network interface { 18 | // the identifier of the home network 19 | GetHomeId() uint32 20 | // tell the controller to allow new nodes to register 21 | // Secure: try to register securely 22 | // returns true if the registration request succeeded 23 | AddNode(secure bool) bool 24 | } 25 | 26 | type network struct { 27 | homeId uint32 28 | nodes map[uint8]*node 29 | } 30 | 31 | func newNetwork(homeId uint32) *network { 32 | return &network{homeId, make(map[uint8]*node)} 33 | } 34 | 35 | func (nw *network) GetHomeId() uint32 { 36 | return nw.homeId 37 | } 38 | 39 | func (nw *network) AddNode(secure bool) bool { 40 | return bool(C.addNode(C.uint32(nw.GetHomeId()), C.bool(secure))) 41 | } 42 | 43 | func (nw *network) notify(api *api, nt *notification) { 44 | notificationType := nt.GetNotificationType() 45 | switch notificationType.Code { 46 | 47 | // network level events 48 | case NT.DRIVER_READY, 49 | NT.DRIVER_RESET: 50 | // reset network object to reset state 51 | nw.reset() 52 | break 53 | 54 | // group associations 55 | case NT.GROUP, 56 | NT.AWAKE_NODES_QUERIED, 57 | NT.ALL_NODES_QUERIED_SOME_DEAD, 58 | NT.ALL_NODES_QUERIED: 59 | unhandled(api, nt) 60 | break 61 | // move network into running state 62 | 63 | // notifications 64 | case NT.NOTIFICATION: 65 | fallthrough 66 | default: 67 | node := nt.GetNode() 68 | if node.GetId() <= MAX_NODES { 69 | nw.handleNodeEvent(api, nt, nw.takeNode(nt)) 70 | } else { 71 | unhandled(api, nt) 72 | } 73 | } 74 | } 75 | 76 | func (nw *network) handleNodeEvent(api *api, nt *notification, nodeV *node) { 77 | 78 | notificationType := nt.cRef.notificationType 79 | id := (uint8)(nodeV.cRef.nodeId.nodeId) 80 | 81 | n, ok := nw.nodes[id] 82 | 83 | switch notificationType { 84 | case NT.NODE_REMOVED: 85 | if ok { 86 | delete(nw.nodes, id) 87 | n.notify(api, nt) 88 | } 89 | break 90 | 91 | case NT.ESSENTIAL_NODE_QUERIES_COMPLETE: 92 | case NT.NODE_QUERIES_COMPLETE: 93 | // move the node into the initialized state 94 | // begin admission processing for the node 95 | // network or node level events 96 | n.notify(api, nt) 97 | break 98 | 99 | case NT.NODE_NEW, 100 | NT.NODE_ADDED: 101 | if !ok { 102 | nw.nodes[id] = nodeV 103 | } 104 | fallthrough 105 | 106 | // 107 | // node level events 108 | // 109 | case NT.NODE_NAMING, 110 | NT.NODE_PROTOCOL_INFO, 111 | NT.VALUE_ADDED, 112 | NT.VALUE_REMOVED, 113 | NT.VALUE_CHANGED, 114 | NT.VALUE_REFRESHED: 115 | fallthrough 116 | default: 117 | // network or node level events 118 | n.notify(api, nt) 119 | break 120 | 121 | } 122 | } 123 | 124 | func (nw *network) reset() { 125 | nw.nodes = make(map[uint8]*node) 126 | } 127 | 128 | func (nw *network) takeNode(nt *notification) *node { 129 | id := uint8(nt.node.cRef.nodeId.nodeId) 130 | n, ok := nw.nodes[id] 131 | if !ok { 132 | n = nt.swapNodeImpl(nil) 133 | nw.nodes[id] = n 134 | } else { 135 | nt.swapNodeImpl(n) 136 | } 137 | return n 138 | } 139 | -------------------------------------------------------------------------------- /node.cpp: -------------------------------------------------------------------------------- 1 | #include "api.h" 2 | 3 | static Node * newNode(uint32 homeId, uint8 nodeId) 4 | { 5 | Node * tmp = (Node *)malloc(sizeof(Node)); 6 | *tmp = (Node){0}; 7 | tmp->nodeId.homeId = homeId; 8 | tmp->nodeId.nodeId = nodeId; 9 | return tmp; 10 | } 11 | 12 | void freeNode(Node * node) 13 | { 14 | if (node->nodeType) free(node->nodeType); 15 | if (node->manufacturerName) free(node->manufacturerName); 16 | if (node->productName) free(node->productName); 17 | if (node->location) free(node->location); 18 | if (node->manufacturerId) free(node->manufacturerId); 19 | if (node->productType) free(node->productType); 20 | if (node->productId) free(node->productId); 21 | free(node); 22 | }; 23 | 24 | Node * exportNode(API * api, uint32 homeId, uint8 nodeId) 25 | { 26 | Node * result = newNode(homeId, nodeId); 27 | OpenZWave::Manager * cppRef = OpenZWave::Manager::Get(); 28 | 29 | result->basicType = cppRef->GetNodeBasic(homeId, nodeId); 30 | result->genericType = cppRef->GetNodeGeneric(homeId, nodeId); 31 | result->specificType = cppRef->GetNodeSpecific(homeId, nodeId); 32 | result->nodeType = strdup(cppRef->GetNodeType(homeId, nodeId).c_str()); 33 | result->manufacturerName = strdup(cppRef->GetNodeManufacturerName(homeId, nodeId).c_str()); 34 | result->productName = strdup(cppRef->GetNodeProductName(homeId, nodeId).c_str()); 35 | result->nodeName = strdup(cppRef->GetNodeName(homeId, nodeId).c_str()); 36 | result->location = strdup(cppRef->GetNodeLocation(homeId, nodeId).c_str()); 37 | result->manufacturerId = strdup(cppRef->GetNodeManufacturerId(homeId, nodeId).c_str()); 38 | result->productType = strdup(cppRef->GetNodeProductType(homeId, nodeId).c_str()); 39 | result->productId = strdup(cppRef->GetNodeProductId(homeId, nodeId).c_str()); 40 | return result; 41 | } 42 | -------------------------------------------------------------------------------- /node.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // 6 | // #include "api.h" 7 | import "C" 8 | 9 | import ( 10 | "fmt" 11 | 12 | "github.com/ninjasphere/go-openzwave/NT" 13 | ) 14 | 15 | type state int 16 | 17 | const ( 18 | STATE_INIT state = iota 19 | STATE_READY = iota 20 | ) 21 | 22 | type Node interface { 23 | GetHomeId() uint32 24 | GetId() uint8 25 | 26 | GetDevice() Device 27 | 28 | GetProductId() *ProductId 29 | GetProductDescription() *ProductDescription 30 | GetNodeName() string 31 | 32 | GetValue(commandClassId uint8, instanceId uint8, index uint8) Value 33 | GetValueWithId(valueId ValueID) Value 34 | } 35 | 36 | type ProductId struct { 37 | ManufacturerId string 38 | ProductId string 39 | } 40 | 41 | type ProductDescription struct { 42 | ManufacturerName string 43 | ProductName string 44 | ProductType string 45 | } 46 | 47 | type node struct { 48 | cRef *C.Node 49 | classes map[uint8]*valueClass 50 | state state 51 | device Device 52 | } 53 | 54 | type valueClass struct { 55 | commandClass uint8 56 | instances map[uint8]*valueInstance 57 | } 58 | 59 | type valueInstance struct { 60 | instance uint8 61 | values map[uint8]*value 62 | } 63 | 64 | func newGoNode(cRef *C.Node) *node { 65 | return &node{cRef, make(map[uint8]*valueClass), STATE_INIT, nil} 66 | } 67 | 68 | func (n *node) String() string { 69 | cRef := n.cRef 70 | 71 | return fmt.Sprintf( 72 | "Node["+ 73 | "homeId=0x%08x, "+ 74 | "nodeId=%03d, "+ 75 | "basicType=%02x, "+ 76 | "genericType=%02x, "+ 77 | "specificType=%02x, "+ 78 | "nodeType='%s', "+ 79 | "manufacturerName='%s', "+ 80 | "productName='%s', "+ 81 | "location='%s', "+ 82 | "manufacturerId=%s, "+ 83 | "productType=%s, "+ 84 | "productId=%s]", 85 | uint32(cRef.nodeId.homeId), 86 | uint8(cRef.nodeId.nodeId), 87 | uint8(cRef.basicType), 88 | uint8(cRef.genericType), 89 | uint8(cRef.specificType), 90 | C.GoString(cRef.nodeType), 91 | C.GoString(cRef.manufacturerName), 92 | C.GoString(cRef.productName), 93 | C.GoString(cRef.location), 94 | C.GoString(cRef.manufacturerId), 95 | C.GoString(cRef.productType), 96 | C.GoString(cRef.productId)) 97 | } 98 | 99 | func (n *node) GetHomeId() uint32 { 100 | return uint32(n.cRef.nodeId.homeId) 101 | } 102 | 103 | func (n *node) GetId() uint8 { 104 | return uint8(n.cRef.nodeId.nodeId) 105 | } 106 | 107 | func (n *node) notify(api *api, nt *notification) { 108 | 109 | var event Event 110 | 111 | notificationType := nt.cRef.notificationType 112 | switch notificationType { 113 | case NT.NODE_REMOVED: 114 | event = &NodeUnavailable{nodeEvent{n}} 115 | if n.device != nil { 116 | n.device.NodeRemoved() 117 | } 118 | api.notifyEvent(event) 119 | // TODO: free the C structure. 120 | break 121 | 122 | case NT.VALUE_REMOVED: 123 | n.removeValue(nt) 124 | break 125 | 126 | case NT.ESSENTIAL_NODE_QUERIES_COMPLETE, 127 | NT.NODE_QUERIES_COMPLETE: 128 | // move the node into the initialized state 129 | // begin admission processing for the node 130 | 131 | switch n.state { 132 | case STATE_INIT: 133 | n.state = STATE_READY 134 | 135 | event = &NodeAvailable{nodeEvent{n}} 136 | // 137 | // Use a callback to construct the device for this node, then 138 | // pass the event to the device. 139 | // 140 | 141 | n.device = api.deviceFactory(api, n) 142 | if n.device != nil { 143 | n.device.NodeAdded() 144 | } 145 | 146 | break 147 | default: 148 | event = &NodeChanged{nodeEvent{n}} 149 | if n.device != nil { 150 | n.device.NodeChanged() 151 | } 152 | // 153 | // Pass the event to the node. 154 | // 155 | } 156 | api.notifyEvent(event) 157 | break 158 | 159 | case NT.VALUE_ADDED, 160 | NT.VALUE_CHANGED, 161 | NT.VALUE_REFRESHED: 162 | v := n.takeValue(nt) 163 | if n.device != nil { 164 | n.device.ValueChanged(v) 165 | } 166 | break 167 | 168 | case NT.NODE_NAMING, 169 | NT.NODE_PROTOCOL_INFO: 170 | // log the related information for diagnostics purposes 171 | 172 | } 173 | } 174 | 175 | // take the value structure from the notification 176 | func (n *node) takeValue(nt *notification) *value { 177 | commandClassId := (uint8)(nt.value.cRef.valueId.commandClassId) 178 | instanceId := (uint8)(nt.value.cRef.valueId.instance) 179 | index := (uint8)(nt.value.cRef.valueId.index) 180 | 181 | instance := n.createOrGetInstance(commandClassId, instanceId) 182 | v, ok := instance.values[index] 183 | if !ok { 184 | v = nt.swapValueImpl(nil) 185 | instance.values[index] = v 186 | 187 | } else { 188 | nt.swapValueImpl(v) 189 | } 190 | return v 191 | } 192 | 193 | func (n *node) createOrGetInstance(commandClassId uint8, instanceId uint8) *valueInstance { 194 | class, ok := n.classes[commandClassId] 195 | if !ok { 196 | class = &valueClass{commandClassId, make(map[uint8]*valueInstance)} 197 | n.classes[commandClassId] = class 198 | } 199 | instance, ok := class.instances[instanceId] 200 | if !ok { 201 | instance = &valueInstance{instanceId, make(map[uint8]*value)} 202 | class.instances[instanceId] = instance 203 | } 204 | return instance 205 | } 206 | 207 | func (n *node) GetValue(commandClassId uint8, instanceId uint8, index uint8) Value { 208 | var v *value 209 | class, ok := n.classes[commandClassId] 210 | if ok { 211 | instance, ok := class.instances[instanceId] 212 | if ok { 213 | v, ok = instance.values[index] 214 | } 215 | } 216 | if ok { 217 | return v 218 | } else { 219 | return &missingValue{} // accessor that does nothing 220 | } 221 | return v 222 | } 223 | 224 | func (n *node) GetValueWithId(valueId ValueID) Value { 225 | return n.GetValue(valueId.CommandClassId, valueId.Instance, valueId.Index) 226 | } 227 | 228 | func (n *node) removeValue(nt *notification) { 229 | commandClassId := (uint8)(nt.value.cRef.valueId.commandClassId) 230 | instanceId := (uint8)(nt.value.cRef.valueId.instance) 231 | index := (uint8)(nt.value.cRef.valueId.index) 232 | 233 | class, ok := n.classes[commandClassId] 234 | if !ok { 235 | return 236 | } 237 | 238 | instance, ok := class.instances[instanceId] 239 | if !ok { 240 | return 241 | } 242 | 243 | value, ok := instance.values[index] 244 | _ = value 245 | 246 | if !ok { 247 | return 248 | } else { 249 | // TODO: free the C structure 250 | delete(instance.values, index) 251 | if len(instance.values) == 0 { 252 | delete(class.instances, instanceId) 253 | if len(class.instances) == 0 { 254 | delete(n.classes, commandClassId) 255 | } 256 | } 257 | } 258 | 259 | } 260 | 261 | func (n *node) GetDevice() Device { 262 | return n.device 263 | } 264 | 265 | func (n *node) GetProductId() *ProductId { 266 | return &ProductId{C.GoString(n.cRef.manufacturerId), C.GoString(n.cRef.productId)} 267 | } 268 | 269 | func (n *node) GetProductDescription() *ProductDescription { 270 | return &ProductDescription{ 271 | C.GoString(n.cRef.manufacturerName), 272 | C.GoString(n.cRef.productName), 273 | C.GoString(n.cRef.productType)} 274 | } 275 | 276 | func (n *node) GetNodeName() string { 277 | return C.GoString(n.cRef.nodeName) 278 | } 279 | 280 | func (n *node) free() { 281 | C.freeNode(n.cRef) 282 | } 283 | -------------------------------------------------------------------------------- /notification.cpp: -------------------------------------------------------------------------------- 1 | 2 | #include "api.h" 3 | static Notification * newNotification(uint8 notificationType) 4 | { 5 | Notification * tmp = (Notification *)malloc(sizeof(Notification)); 6 | *tmp = (Notification){0}; 7 | tmp->notificationType = notificationType; 8 | return tmp; 9 | } 10 | 11 | // exports a C++ notification into a copy that can be consumed by the Go Layer. The consumer 12 | // must propagate the responsibility to free the returned object to its callers. 13 | Notification * exportNotification(API * api, OpenZWave::Notification const* notification) 14 | { 15 | Notification * result = newNotification(notification->GetType()); 16 | result->node = exportNode(api, notification->GetHomeId(), notification->GetNodeId()); 17 | OpenZWave::Notification::NotificationType nt = notification->GetType(); 18 | result->notificationCode = -1; 19 | 20 | switch (nt) { 21 | case OpenZWave::Notification::Type_ValueAdded: 22 | case OpenZWave::Notification::Type_ValueRemoved: 23 | case OpenZWave::Notification::Type_ValueChanged: 24 | case OpenZWave::Notification::Type_ValueRefreshed: 25 | result->value = exportValue(api, notification->GetHomeId(), notification->GetValueID()); 26 | break; 27 | case OpenZWave::Notification::Type_Notification: 28 | result->notificationCode = notification->GetNotification(); 29 | break; 30 | default: 31 | break; 32 | // do nothing 33 | } 34 | return result; 35 | } 36 | 37 | 38 | void freeNotification(Notification * notification) 39 | { 40 | if (notification->node) { 41 | freeNode(notification->node); 42 | } 43 | if (notification->value) { 44 | freeValue(notification->value); 45 | } 46 | free(notification); 47 | } 48 | -------------------------------------------------------------------------------- /notification.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // 6 | // #include "api.h" 7 | import "C" 8 | 9 | import ( 10 | "fmt" 11 | 12 | "github.com/ninjasphere/go-openzwave/CODE" 13 | "github.com/ninjasphere/go-openzwave/NT" 14 | ) 15 | 16 | // The type of notifications received from the API 17 | type Notification interface { 18 | GetNode() Node 19 | GetNotificationType() *NT.Enum 20 | } 21 | 22 | // The type of notifications received via the API's Notifications() channel. 23 | type notification struct { 24 | cRef *C.Notification 25 | node *node // should be freed by the receiver, iff it is not null 26 | value *value // should be freed by the receiver, iff it is not null 27 | } 28 | 29 | // Converts the notification into a string representation. 30 | func (n *notification) String() string { 31 | return fmt.Sprintf( 32 | "Notification["+ 33 | "notificationType=%v/%v, "+ 34 | "node=%v, "+ 35 | "value=%v]", 36 | NT.ToEnum(int(n.cRef.notificationType)), 37 | CODE.ToEnum(int(n.cRef.notificationCode)), 38 | n.GetNode(), 39 | n.GetValue()) 40 | } 41 | 42 | func (n *notification) free() { 43 | C.freeNotification(n.cRef) 44 | if n.node != nil { 45 | n.node.free() 46 | } 47 | if n.value != nil { 48 | n.value.free() 49 | } 50 | } 51 | 52 | func (n *notification) GetValue() Value { 53 | return n.value 54 | } 55 | 56 | func (n *notification) GetNode() Node { 57 | return n.node 58 | } 59 | 60 | func (n *notification) GetNotificationType() *NT.Enum { 61 | return NT.ToEnum(int(n.cRef.notificationType)) 62 | } 63 | 64 | func newGoNotification(cRef *C.Notification) *notification { 65 | result := ¬ification{cRef, newGoNode(cRef.node), newGoValue(cRef.value)} 66 | 67 | // transfer ownership of C structure to the go object 68 | result.cRef.value = nil 69 | result.cRef.node = nil 70 | return result 71 | } 72 | 73 | // 74 | // Swap the cRef of the receiver's node with cRef of the specified node. 75 | // 76 | // The intent is to swap the *C.Node reachable from 'existing' with the *C.Node 77 | // reachable from the receiver so that existing gets the fresh object. 78 | // 79 | // If there is no existing object then we steal the whole go object from the 80 | // receiver. 81 | // 82 | func (n *notification) swapNodeImpl(existing *node) *node { 83 | if existing != nil { 84 | // then swap the cRef pointers 85 | swap := n.node.cRef 86 | n.node.cRef = existing.cRef 87 | existing.cRef = swap 88 | } else { 89 | existing = n.node 90 | n.node = nil 91 | } 92 | return existing 93 | } 94 | 95 | // 96 | // Swap the cRef of the receiver's node with cRef of the specified node. 97 | // 98 | // The intent is to update an existing go representation of a node with 99 | // the latest *C.Value from the notification and then recycle 100 | // the old *C.Value by attaching it to the notification where it will then 101 | // be freed. 102 | // 103 | func (n *notification) swapValueImpl(existing *value) *value { 104 | if existing != nil { 105 | // then swap the cRef pointers 106 | swap := n.value.cRef 107 | n.value.cRef = existing.cRef 108 | existing.cRef = swap 109 | } else { 110 | existing = n.value 111 | n.value = nil 112 | } 113 | return existing 114 | } 115 | 116 | // 117 | // called for unexpected notifications. 118 | // 119 | func unexpected(api API, notification Notification) { 120 | api.Logger().Warningf("unexpected notification received %v]\n", notification) 121 | } 122 | 123 | // 124 | // called for expected notifications that are not handled 125 | // 126 | func unhandled(api API, notification Notification) { 127 | // api.Logger().Debugf("unhandled notification received %v]\n", notification) 128 | } 129 | -------------------------------------------------------------------------------- /options.cpp: -------------------------------------------------------------------------------- 1 | #include "api.h" 2 | 3 | void startOptions(char * config, char * userPath, char * overrides) 4 | { 5 | OpenZWave::Options::Create(config, userPath, overrides); 6 | } 7 | 8 | void addIntOption(char * option, int value) 9 | { 10 | OpenZWave::Options::Get()->AddOptionInt(option, value); 11 | } 12 | 13 | void addBoolOption(char * option, bool flag) 14 | { 15 | OpenZWave::Options::Get()->AddOptionBool(option, flag); 16 | } 17 | 18 | void addStringOption(char * option, char * value, bool append) 19 | { 20 | OpenZWave::Options::Get()->AddOptionString(option, value, append); 21 | } 22 | 23 | void endOptions() 24 | { 25 | OpenZWave::Options::Get()->Lock(); 26 | } 27 | -------------------------------------------------------------------------------- /overview.go: -------------------------------------------------------------------------------- 1 | // 2 | // openzwave provides a thin Go wrapper around the openzwave library. 3 | // 4 | // The following shows a simple use of the API which will log every notification received. 5 | // 6 | // var loop = func(api openzwave.API) { 7 | // fmt.Printf("event loop starts\n") 8 | // for { 9 | // select { 10 | // case quitNow := <-api.QuitSignal(): 11 | // _ = quitNow 12 | // fmt.Printf("event loop ends\n") 13 | // return 14 | // } 15 | // } 16 | // } 17 | // 18 | // os.Exit(openzwave. 19 | // BuildAPI("../go-openzwave/openzwave/config", "", ""). 20 | // AddIntOption("SaveLogLevel", LOG_LEVEL.NONE). 21 | // AddIntOption("QueueLogLevel", LOG_LEVEL.NONE). 22 | // AddIntOption("DumpTrigger", LOG_LEVEL.NONE). 23 | // AddIntOption("PollInterval", 500). 24 | // AddBoolOption("IntervalBetweenPolls", true). 25 | // AddBoolOption("ValidateValueChanges", true). 26 | // Run(loop)) 27 | package openzwave 28 | -------------------------------------------------------------------------------- /ozwcp/darwin/README: -------------------------------------------------------------------------------- 1 | OpenZWave Control Panel v0.2a 8/8/2011 2 | 3 | Welcome to a very alpha release of the OpenZWave Control Panel. 4 | 5 | OVERVIEW 6 | 7 | This README for the OpenZWave Control Panel will attempt to provide the 8 | necessary information to compile, use and develop. 9 | 10 | The OpenZWave Control Panel (ozwcp for short) is an application built on 11 | the OpenZWave library http://code.google.com/p/open-zwave/ that permits 12 | users to query, manage and monitor Z-Wave nodes and networks. It provides a 13 | web based user interface using AJAX principles. 14 | 15 | The code is very new, as is the library, so bugs will be present. This tool 16 | will allow the basic use of Z-Wave devices as well as help push forward the 17 | development of the OpenZWave library. 18 | 19 | INSTALLATION 20 | 21 | To install ozwcp, visit http://code.google.com/p/openzwave-control-panel/ 22 | and click on the "source" tab. You will need an svn client to check out a 23 | copy of the sources. 24 | 25 | You will need a copy of the latest version of the OpenZWave library at 26 | http://code.google.com/p/open-zwave/. Use the "source" tab on that project 27 | to get a copy. 28 | 29 | ozwcp uses GNU's libmicrohttpd library available at 30 | http://www.gnu.org/software/libmicrohttpd/. I have set up this library 31 | using the --enable-messages configure option for debugging but this is 32 | optional. 33 | 34 | All three of these installations should share live in the same directory 35 | (share a common parent). The ozwcp Makefile assumes this. 36 | 37 | See Makefile for comments about Mac OS X support. 38 | 39 | Currently Windows is not supported. It should be possible to port this 40 | to the Window's cygwin environment if anyone is interested in pursing that 41 | option. 42 | 43 | OPERATION 44 | 45 | ozwcp currently runs from the command line and takes two flags: 46 | 47 | -d for debugging 48 | -p port number the web server will listen on 49 | 50 | Once started, connect to the hostname:postnum that ozwcp is running on 51 | using a web broswer and you will get to the user interface. 52 | 53 | Firefox has been extensively tested. Safari works. Intnernet Explorer 54 | doesn't work yet. This is also on the to do list. 55 | 56 | ozwcp currently must be run from within its distribution directory. It 57 | serves files that must be present for it to work properly. You may need to 58 | run it as root depending on the port number you use. 59 | 60 | CAVEATS 61 | 62 | This is an alpha release at best. It has only ever worked in a single 63 | envionment. Please report bugs to the OpenZWave google groups mailing list: 64 | http://groups.google.com/group/openzwave. 65 | 66 | See the file TODO for a list of things on the to do list. 67 | 68 | NOTE 69 | 70 | The html/javascript tooltip support came from: 71 | http://sixrevisions.com/tutorials/javascript_tutorial/create_lightweight_javascript_tooltip/ 72 | -------------------------------------------------------------------------------- /ozwcp/darwin/README.ninja.md: -------------------------------------------------------------------------------- 1 | NAME 2 | ==== 3 | owzcp 4 | 5 | DESCRIPTION 6 | =========== 7 | A copy of the ozwcp control panel binaries from [OpenZWave Control Panel](https://code.google.com/p/openzwave-control-panel/). 8 | 9 | USAGE 10 | ===== 11 | To start the control panel, run: 12 | 13 | make control-panel 14 | 15 | from the go-openzwave directory, then follow the instructions printed therein. 16 | 17 | -------------------------------------------------------------------------------- /ozwcp/darwin/config: -------------------------------------------------------------------------------- 1 | ../../openzwave/config/ -------------------------------------------------------------------------------- /ozwcp/darwin/cp.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | OpenZWave Control Panel 9 | 30 | 31 | 32 | 34 | 35 | 36 |
37 | 38 | OpenZWave Control Panel 39 | 40 |
41 |
42 |
43 |
44 |
45 |
46 | Controller 47 |
48 | Interface 49 |
50 |
51 |
52 | 53 |
54 | 55 | 56 |
57 |
58 | 59 | 60 |
61 |
62 |
63 | 64 |
65 |
66 | 67 |
68 |
69 | 70 |
71 |
72 | 73 |
74 |
75 |
76 |
77 |
78 |
79 |
80 |
Controller Status 81 |
82 |
83 |
84 | 85 |
86 |
87 |
88 |
89 | 90 |
91 |
92 |
93 |
94 | 95 |
96 |
97 |
98 |
99 | 100 |
101 |
102 |
103 |
104 | 105 |
106 |
107 |
108 |
109 | 110 |
111 |
112 |
113 |
114 | 115 |
116 |
117 |
118 |
119 | 120 |
121 |
122 |
123 |
124 |
125 |
126 |
127 |
128 |
Backup Controller 129 |
130 | 131 |
132 | 133 |
134 |
135 | 136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
Network 144 |
145 | 146 |
147 | 154 |
155 |
156 | 157 |
158 | 242 | 247 | 267 | 272 | 300 |
301 | 337 | 360 |
361 | 377 | 379 |
380 |
381 |
382 |
383 |
Controller 384 |
385 | 386 |
387 | 406 |
407 | 408 | 410 | 412 |
413 | 414 |
415 |
416 |
417 |
418 |
419 |
Functions 420 |
421 | 422 |
423 | 430 |
431 | 432 |
433 | 434 |
435 |
436 |
437 |
438 |

439 |
440 |
Devices 441 |
442 | 443 | 444 | 445 | 446 | 447 | 448 | 449 | 450 | 451 | 452 | 453 | 454 | 455 | 456 | 457 | 458 | 459 | 460 | 461 | 462 | 463 | 464 | 465 | 466 | 467 | 468 | 469 | 470 | 471 | 472 | 473 | 474 | 475 | 476 | 477 | 478 | 479 | 480 | 481 | 482 | 483 | 484 | 485 | 486 | 487 | 488 | 489 | 490 | 491 | 492 | 493 | 494 | 495 | 496 | 497 | 498 | 499 | 500 |
Node IdBasic TypeGeneric TypeProductNameLocationValueLast HeardStatus




































501 |
502 |
503 |
504 |
505 |
506 | Current Values 507 | Configuration 508 | Information 509 |
510 |
511 |
512 |
513 |
514 |
515 |
516 |
517 |
518 |
  519 |
520 |
521 |
522 |
523 |
524 |
Log output 525 |
526 |

527 |
528 |
529 |
530 |
531 | 532 | 533 | -------------------------------------------------------------------------------- /ozwcp/darwin/ozwcp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/ozwcp/darwin/ozwcp -------------------------------------------------------------------------------- /run.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // #include "api.h" 6 | import "C" 7 | 8 | import ( 9 | "os" 10 | "os/signal" 11 | "reflect" 12 | "time" 13 | "unsafe" 14 | ) 15 | 16 | const ( 17 | EXIT_QUIT_FAILED = 127 // the event loop did not exit 18 | EXIT_INTERRUPTED = 126 // something interrupted the current process 19 | EXIT_INTERRUPTED_AGAIN = 125 // something interrupted the current process (twice) 20 | EXIT_INTERRUPT_FAILED = 124 // something interrupted the current process, but something took too long to clean up 21 | EXIT_NODE_REMOVED = 123 22 | ) 23 | 24 | var defaultEventLoop = func(api API) int { 25 | for { 26 | select { 27 | case quitNow := <-api.QuitSignal(): 28 | api.Logger().Debugf("terminating event loop in response to quit.\n") 29 | return quitNow 30 | } 31 | } 32 | } 33 | 34 | var defaultEventCallback = func(api API, event Event) { 35 | api.Logger().Debugf("received event %v - %v\n", reflect.TypeOf(event), event) 36 | } 37 | 38 | // 39 | // Run the supplied event loop 40 | // 41 | // The intent of the complexity is to gracefully handle device insertion and removal events and to 42 | // deal with unexpected (but observed) lockups during the driver removal processing. 43 | // 44 | // The function will only return if a signal is received or if there was an unexpected 45 | // lockup during driver removal processing. The exit code identifies which path 46 | // caused the exit to occur. 47 | // 48 | func (a *api) Run() int { 49 | 50 | // lock the options object, now we are done configuring it 51 | 52 | C.endOptions() 53 | 54 | // allocate various channels we need 55 | 56 | signals := make(chan os.Signal, 1) // used to receive OS signals 57 | exit := make(chan int, 1) // used to indicate we are ready to exit 58 | 59 | // indicate that we want to wait for these signals 60 | 61 | signal.Notify(signals, os.Interrupt, os.Kill) 62 | go func() { 63 | // Block until a signal is received. 64 | 65 | signal := <-signals 66 | // once we receive a signal, exit of the process is inevitable 67 | a.logger.Infof("received %v signal - commencing shutdown\n", signal) 68 | 69 | // try a graceful shutdown of the event loop 70 | a.shutdownDriver <- EXIT_INTERRUPTED 71 | // and the device monitor loop 72 | a.quitDeviceMonitor <- EXIT_INTERRUPTED 73 | 74 | // but, just in case this doesn't happen, set up an abort timer. 75 | time.AfterFunc(time.Second*5, func() { 76 | a.logger.Errorf("timed out while waiting for event loop to quit - aborting now\n") 77 | exit <- EXIT_INTERRUPT_FAILED 78 | }) 79 | 80 | // the user is impatient - just die now 81 | signal = <-signals 82 | a.logger.Errorf("received 2nd %v signal - aborting now\n", signal) 83 | exit <- EXIT_INTERRUPTED_AGAIN 84 | }() 85 | 86 | // 87 | // This goroutine does the following 88 | // starts the manager 89 | // starts a device monitoroing loop which 90 | // waits for the device to be available 91 | // starts a device removal goroutine which raises a shutdownDriver signal when removal of the device is detected 92 | // starts the driver 93 | // starts a go routine that that waits until a shutdownDriver is signaled, then initiates the removal of the driver and quit of the event loop 94 | // runs the event loop 95 | // 96 | // It does not exit until either an OS Interrupt or Kill signal is received or driver removal or event loop blocks for some reason. 97 | // 98 | // If the device is removed, the monitoring go routine will send a signal via the shutdownDriver channel. The intent is to allow the 99 | // event loop to exit and have the driver removed. 100 | // 101 | // The driver removal goroutine waits for the shutdownDriver signal, then attempts to remove the driver. If this completes successfully 102 | // it propagates a quit signal to the event loop. It also sets up an abort timer which will exit the process if either 103 | // the driver removal or quit signal propagation blocks for some reason. 104 | // 105 | // If an OS signal is received, the main go routine will send signals to the shutdownDriver and to the quitDeviceMonitor channels. 106 | // It then waits for another signal, for the outer loop to exit or for a 5 second timeout. When one of these occurs, the 107 | // process will exit. 108 | // 109 | 110 | go func() { 111 | cSelf := a.C() 112 | 113 | C.startManager(cSelf) // start the manager 114 | defer C.stopManager(cSelf) 115 | 116 | cDevice := C.CString(a.device) // allocate a C string for device 117 | defer C.free(unsafe.Pointer(cDevice)) 118 | 119 | // a function which returns true if the device exists 120 | deviceExists := func() bool { 121 | if _, err := os.Stat(a.device); err == nil { 122 | return true 123 | } else { 124 | if os.IsNotExist(err) { 125 | return false 126 | } else { 127 | return true 128 | } 129 | } 130 | } 131 | 132 | // waits until the state matches the desired state. 133 | pollUntilDeviceExistsStateEquals := func(comparand bool) { 134 | for deviceExists() != comparand { 135 | time.Sleep(time.Second) 136 | } 137 | } 138 | 139 | // there is one iteration of this loop for each device insertion/removal cycle 140 | done := false 141 | doneExit := 0 142 | for !done { 143 | select { 144 | case doneExit = <-a.quitDeviceMonitor: // we received a signal, allow us to quit 145 | done = true 146 | default: 147 | // one iteration of a device insert/removal cycle 148 | 149 | // wait until device present 150 | a.logger.Infof("waiting until %s is available\n", a.device) 151 | pollUntilDeviceExistsStateEquals(true) 152 | a.logger.Infof("device %s is available\n", a.device) 153 | 154 | go func() { 155 | 156 | // wait until device absent 157 | pollUntilDeviceExistsStateEquals(false) 158 | a.logger.Infof("device %s has been removed.\n", a.device) 159 | 160 | // start the removal of the driver 161 | a.shutdownDriver <- 0 162 | }() 163 | 164 | C.addDriver(cDevice) 165 | 166 | go func() { 167 | // wait until something (OS signal handler or device existence monitor) decides we need to terminate 168 | rc := <-a.shutdownDriver 169 | 170 | // we start an abort timer, because if the driver blocks, we need to restart the driver process 171 | // to guarantee successful operation. 172 | abortTimer := time.AfterFunc(5*time.Second, func() { 173 | a.logger.Errorf("failed to remove driver - exiting driver process\n") 174 | exit <- EXIT_QUIT_FAILED 175 | }) 176 | 177 | // try to remove the driver 178 | if C.removeDriver(cDevice) { 179 | a.quitEventLoop <- rc 180 | abortTimer.Stop() // if we get to here in a timely fashion we can stop the abort timer 181 | } else { 182 | // this is unexpected, if we get to here, let the abort timer do its thing 183 | a.logger.Errorf("removeDriver call failed - waiting for abort\n") 184 | } 185 | }() 186 | 187 | rc := a.loop(a) // run the event loop 188 | 189 | if rc != 0 { 190 | done = true 191 | exit <- rc 192 | return 193 | } 194 | } 195 | } 196 | 197 | exit <- doneExit 198 | }() 199 | 200 | return <-exit 201 | } 202 | 203 | func (a *api) Shutdown(exit int) { 204 | 205 | select { 206 | case a.quitDeviceMonitor <- exit: 207 | break 208 | default: 209 | } 210 | 211 | select { 212 | case a.shutdownDriver <- exit: 213 | break 214 | default: 215 | } 216 | 217 | a.shareable.destroy() 218 | 219 | } 220 | 221 | //export onNotificationWrapper 222 | func onNotificationWrapper(cNotification *C.Notification, context unsafe.Pointer) { 223 | // marshal from C to Go 224 | a := unmarshal(context).Go().(*api) 225 | goNotification := newGoNotification(cNotification) 226 | if a.callback != nil { 227 | a.callback(a, goNotification) 228 | } 229 | 230 | // forward the notification to the network 231 | a.getNetwork(goNotification.GetNode().GetHomeId()).notify(a, goNotification) 232 | 233 | // release the notification 234 | goNotification.free() 235 | } 236 | -------------------------------------------------------------------------------- /scripts/GenerateCC.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PREFIX=CC 4 | 5 | enumerate() 6 | { 7 | grep [iI]mplements openzwave/cpp/src/command_classes/*.h | tr -d '()' | sed "s|.*/command_classes/||;s|:.*COMMAND_CLASS_| |;s|,.*||;s|.*\\.h ||;s/ x/ 0x/" 8 | } 9 | 10 | symbol() 11 | { 12 | local t=$1 13 | echo $(echo $t | sed "s/\(.\)\([A-Z]\)/\1_\2/g" | tr [a-z] [A-Z]) 14 | } 15 | 16 | mkdir -p $PREFIX && cat > $PREFIX/$PREFIX.go < $PREFIX/$PREFIX.go <= UNKNOWN { 47 | x = UNKNOWN 48 | } else { 49 | x = code 50 | } 51 | return &enums[x] 52 | } 53 | 54 | func (val Enum) IsValid() bool { 55 | return val.Code >= 0 && val.Code < UNKNOWN; 56 | } 57 | 58 | func (val Enum) String() string { 59 | if val.IsValid() { 60 | return val.Name 61 | } else { 62 | return fmt.Sprintf("%s[%d]", enums[UNKNOWN].Name, val.Code); 63 | } 64 | } 65 | 66 | EOF 67 | gofmt -s -w $PREFIX/$PREFIX.go && cd $PREFIX && go install 68 | -------------------------------------------------------------------------------- /scripts/GenerateLOG_LEVEL.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PREFIX=LOG_LEVEL 4 | 5 | enumerate() 6 | { 7 | x=0; cat openzwave/cpp/src/platform/Log.h | tr \\011 ' ' | sed -n "s/^ *LogLevel_//p" | sed "s/[^A-Za-z].*//" | while read n; do echo $x $n; let x=x+1; done 8 | } 9 | 10 | symbol() 11 | { 12 | local t=$1 13 | echo $(echo $t | sed "s/\(.\)\([A-Z]\)/\1_\2/g" | tr [a-z] [A-Z]) 14 | } 15 | 16 | mkdir -p $PREFIX && cat > $PREFIX/$PREFIX.go <= UNKNOWN { 47 | x = UNKNOWN 48 | } else { 49 | x = code 50 | } 51 | return &enums[x] 52 | } 53 | 54 | func (val Enum) IsValid() bool { 55 | return val.Code >= 0 && val.Code < UNKNOWN; 56 | } 57 | 58 | func (val Enum) String() string { 59 | if val.IsValid() { 60 | return val.Name 61 | } else { 62 | return fmt.Sprintf("%s[%d]", enums[UNKNOWN].Name, val.Code); 63 | } 64 | } 65 | 66 | EOF 67 | gofmt -s -w $PREFIX/$PREFIX.go && cd $PREFIX && go install 68 | -------------------------------------------------------------------------------- /scripts/GenerateMF.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PREFIX=MF 4 | 5 | enumerate() 6 | { 7 | cat < $PREFIX/$PREFIX.go < NT/NT.go <= UNKNOWN { 43 | x = UNKNOWN-1 44 | } else { 45 | x = code 46 | } 47 | return &Enum{code,names[x]} 48 | } 49 | 50 | func (val Enum) IsValid() bool { 51 | return val.Code >= 0 && val.Code < UNKNOWN; 52 | } 53 | 54 | func (val Enum) String() string { 55 | if val.IsValid() { 56 | return val.Name 57 | } else { 58 | return fmt.Sprintf("%s[%d]", names[UNKNOWN-1], val.Code); 59 | } 60 | } 61 | 62 | EOF 63 | gofmt -s -w NT/NT.go && cd NT && go install 64 | -------------------------------------------------------------------------------- /scripts/GenerateVT.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | PREFIX=VT 4 | 5 | enumerate() 6 | { 7 | cat openzwave/cpp/src/value_classes/ValueID.h | grep ValueType_ | grep -v _Max | sed "s/.*_//" | sed "s/^\([A-Za-z]*\).*/\1/" | number 8 | } 9 | 10 | number() 11 | { 12 | local x 13 | x=0; while read n; do echo $x $n; let x=x+1; done 14 | } 15 | 16 | symbol() 17 | { 18 | local t=$1 19 | echo $(echo $t | sed "s/\(.\)\([A-Z]\)/\1_\2/g" | tr [a-z] [A-Z]) 20 | } 21 | 22 | mkdir -p $PREFIX && cat > $PREFIX/$PREFIX.go <= UNKNOWN { 53 | x = UNKNOWN 54 | } else { 55 | x = code 56 | } 57 | return &enums[x] 58 | } 59 | 60 | func (val Enum) IsValid() bool { 61 | return val.Code >= 0 && val.Code < UNKNOWN; 62 | } 63 | 64 | func (val Enum) String() string { 65 | if val.IsValid() { 66 | return val.Name 67 | } else { 68 | return fmt.Sprintf("%s[%d]", enums[UNKNOWN].Name, val.Code); 69 | } 70 | } 71 | 72 | EOF 73 | gofmt -s -w $PREFIX/$PREFIX.go && cd $PREFIX && go install 74 | -------------------------------------------------------------------------------- /scripts/makeCrossLink.sh: -------------------------------------------------------------------------------- 1 | type=$1 2 | test -n "$type" || exit 1 3 | cat <sharedIndex = i; 6 | return r; 7 | } 8 | -------------------------------------------------------------------------------- /shareable.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // #include "api.h" 6 | import "C" 7 | 8 | import ( 9 | "fmt" 10 | "sync" 11 | "unsafe" 12 | ) 13 | 14 | // This module fixes an issue revealed when Go 1.6 tightened up the rules 15 | // about sharing of Go pointers with C code. https://github.com/golang/go/issues/12416 16 | // 17 | // Now we register a reference with a map and get a pointer to a structure in the C heap on return. 18 | // We use the integer recorded in this structure to map back into the Go world. 19 | // 20 | // That way there are O(1) marshaling operations, and Go pointer is never shared with or 21 | // dereferenced by the C world 22 | // 23 | var shared = map[int]Shareable{} 24 | var sharedCount = 0 25 | var mu sync.RWMutex 26 | 27 | type Shareable interface { 28 | C() unsafe.Pointer 29 | Go() interface{} 30 | } 31 | 32 | type shareable struct { 33 | cref *C.shareable 34 | goObject interface{} 35 | } 36 | 37 | func (s *shareable) init(goObject interface{}) { 38 | mu.Lock() 39 | defer mu.Unlock() 40 | 41 | sharedCount++ 42 | s.cref = C.newShareable(C.int(sharedCount)) 43 | shared[int(s.cref.sharedIndex)] = s 44 | s.goObject = goObject 45 | } 46 | 47 | func (s *shareable) destroy() { 48 | if s.cref != nil { 49 | mu.Lock() 50 | defer mu.Unlock() 51 | delete(shared, int(s.cref.sharedIndex)) 52 | C.free(s.C()) 53 | s.cref = nil 54 | } 55 | } 56 | 57 | func (s *shareable) C() unsafe.Pointer { 58 | return unsafe.Pointer(s.cref) 59 | } 60 | 61 | func (s *shareable) Go() interface{} { 62 | if s == nil { 63 | return nil 64 | } else { 65 | return s.goObject 66 | } 67 | } 68 | 69 | func unmarshal(c unsafe.Pointer) Shareable { 70 | mu.RLock() 71 | defer mu.RUnlock() 72 | 73 | if c == nil { 74 | return nil 75 | } 76 | 77 | i := (*C.shareable)(c).sharedIndex 78 | if s, ok := shared[int(i)]; !ok { 79 | panic(fmt.Errorf("failure to unmarshal index %d", int(i))) 80 | } else { 81 | return s 82 | } 83 | } 84 | -------------------------------------------------------------------------------- /value.cpp: -------------------------------------------------------------------------------- 1 | #include "api.h" 2 | 3 | static Value * newValue(uint32 homeId, OpenZWave::ValueID const &valueId) 4 | { 5 | Value * tmp = (Value *)malloc(sizeof(Value)); 6 | *tmp = (struct Value){0}; 7 | tmp->homeId = homeId; 8 | 9 | tmp->valueId.id = valueId.GetId(); 10 | tmp->valueId.valueType = valueId.GetType(); 11 | tmp->valueId.commandClassId = valueId.GetCommandClassId(); 12 | tmp->valueId.instance = valueId.GetInstance(); 13 | tmp->valueId.index = valueId.GetIndex(); 14 | 15 | return tmp; 16 | } 17 | 18 | void freeValue(Value * valueObj) 19 | { 20 | 21 | if (valueObj->value) { 22 | free(valueObj->value); 23 | } 24 | if (valueObj->label) { 25 | free(valueObj->label); 26 | } 27 | if (valueObj->units) { 28 | free(valueObj->units); 29 | } 30 | if (valueObj->help) { 31 | free(valueObj->help); 32 | } 33 | free(valueObj); 34 | } 35 | 36 | Value * exportValue(API * api, uint32 homeId, OpenZWave::ValueID const &valueId) 37 | { 38 | Value * const tmp = newValue(homeId, valueId); 39 | 40 | std::string value; 41 | 42 | OpenZWave::Manager * const zwManager = OpenZWave::Manager::Get(); 43 | 44 | if (zwManager->GetValueAsString(valueId, &value)) { 45 | tmp->value = strdup(value.c_str()); 46 | } else { 47 | tmp->value = strdup(""); 48 | } 49 | 50 | tmp->label = strdup(zwManager->GetValueLabel(valueId).c_str()); 51 | tmp->help = strdup(zwManager->GetValueHelp(valueId).c_str()); 52 | tmp->units = strdup(zwManager->GetValueUnits(valueId).c_str()); 53 | tmp->min = zwManager->GetValueMin(valueId); 54 | tmp->max = zwManager->GetValueMax(valueId); 55 | tmp->isSet = zwManager->IsValueSet(valueId); 56 | 57 | return tmp; 58 | } 59 | 60 | bool setUint8Value(uint32 homeId, uint64 id, uint8 value) 61 | { 62 | OpenZWave::ValueID valueId = OpenZWave::ValueID(homeId, id); 63 | OpenZWave::Manager::Get()->SetChangeVerified(valueId, true); 64 | return OpenZWave::Manager::Get()->SetValue(valueId, value); 65 | } 66 | 67 | bool getUint8Value(uint32 homeId, uint64 id, uint8 *value) 68 | { 69 | return OpenZWave::Manager::Get()->GetValueAsByte(OpenZWave::ValueID(homeId, id), value); 70 | } 71 | 72 | bool setBoolValue(uint32 homeId, uint64 id, bool value) 73 | { 74 | return OpenZWave::Manager::Get()->SetValue(OpenZWave::ValueID(homeId, id), value); 75 | } 76 | 77 | bool getBoolValue(uint32 homeId, uint64 id, bool *value) 78 | { 79 | return OpenZWave::Manager::Get()->GetValueAsBool(OpenZWave::ValueID(homeId, id), value); 80 | } 81 | 82 | bool setFloatValue(uint32 homeId, uint64 id, float value) 83 | { 84 | return OpenZWave::Manager::Get()->SetValue(OpenZWave::ValueID(homeId, id), value); 85 | } 86 | 87 | bool getFloatValue(uint32 homeId, uint64 id, float *value) 88 | { 89 | return OpenZWave::Manager::Get()->GetValueAsFloat(OpenZWave::ValueID(homeId, id), value); 90 | } 91 | 92 | bool setIntValue(uint32 homeId, uint64 id, int value) 93 | { 94 | return OpenZWave::Manager::Get()->SetValue(OpenZWave::ValueID(homeId, id), value); 95 | } 96 | 97 | bool getIntValue(uint32 homeId, uint64 id, int *value) 98 | { 99 | return OpenZWave::Manager::Get()->GetValueAsInt(OpenZWave::ValueID(homeId, id), value); 100 | } 101 | 102 | bool setStringValue(uint32 homeId, uint64 id, char * value) 103 | { 104 | bool result = OpenZWave::Manager::Get()->SetValue(OpenZWave::ValueID(homeId, id), std::string(value)); 105 | free(value); 106 | return result; 107 | } 108 | 109 | bool getStringValue(uint32 homeId, uint64 id, char ** value) 110 | { 111 | std::string tmp; 112 | if (OpenZWave::Manager::Get()->GetValueAsString(OpenZWave::ValueID(homeId, id), &tmp)) { 113 | *value = strdup(tmp.c_str()); 114 | return true; 115 | } else { 116 | *value = NULL; 117 | return false; 118 | } 119 | } 120 | 121 | 122 | bool refreshValue(uint32 homeId, uint64 id) 123 | { 124 | return OpenZWave::Manager::Get()->RefreshValue(OpenZWave::ValueID(homeId, id)); 125 | } 126 | 127 | bool setPollingState(uint32 homeId, uint64 id, bool state) 128 | { 129 | if (state) { 130 | return OpenZWave::Manager::Get()->EnablePoll(OpenZWave::ValueID(homeId, id)); 131 | } else { 132 | return OpenZWave::Manager::Get()->DisablePoll(OpenZWave::ValueID(homeId, id)); 133 | } 134 | } 135 | -------------------------------------------------------------------------------- /value.go: -------------------------------------------------------------------------------- 1 | package openzwave 2 | 3 | // #cgo LDFLAGS: -lopenzwave -Lgo/src/github.com/ninjasphere/go-openzwave/openzwave 4 | // #cgo CPPFLAGS: -Iopenzwave/cpp/src/platform -Iopenzwave/cpp/src -Iopenzwave/cpp/src/value_classes 5 | // 6 | // #include "api.h" 7 | import "C" 8 | 9 | import ( 10 | "fmt" 11 | "unsafe" 12 | 13 | "github.com/ninjasphere/go-openzwave/CC" 14 | "github.com/ninjasphere/go-openzwave/VT" 15 | ) 16 | 17 | type ValueID struct { 18 | CommandClassId uint8 19 | Instance uint8 20 | Index uint8 21 | } 22 | 23 | type Value interface { 24 | Id() ValueID 25 | SetUint8(value uint8) bool 26 | GetUint8() (uint8, bool) 27 | SetBool(value bool) bool 28 | GetBool() (bool, bool) 29 | SetInt(value int) bool 30 | GetInt() (int, bool) 31 | SetFloat(value float64) bool 32 | GetFloat() (float64, bool) 33 | SetString(value string) bool 34 | GetString() (string, bool) 35 | Refresh() bool 36 | SetPollingState(bool) bool 37 | } 38 | 39 | type value struct { 40 | cRef *C.Value 41 | } 42 | 43 | type missingValue struct { 44 | } 45 | 46 | func (v value) String() string { 47 | return fmt.Sprintf( 48 | "Value["+ 49 | "type=%v, "+ 50 | "commandClassId=%v, "+ 51 | "instance=%d, "+ 52 | "index=%d, "+ 53 | "value='%s', "+ 54 | "label='%s', "+ 55 | "units='%s', "+ 56 | "help='%s', "+ 57 | "min=%d, "+ 58 | "max=%d, "+ 59 | "isSet=%v]", 60 | VT.ToEnum(int(v.cRef.valueId.valueType)), 61 | CC.ToEnum(int(v.cRef.valueId.commandClassId)), 62 | uint(v.cRef.valueId.instance), 63 | uint(v.cRef.valueId.index), 64 | C.GoString(v.cRef.value), 65 | C.GoString(v.cRef.label), 66 | C.GoString(v.cRef.units), 67 | C.GoString(v.cRef.help), 68 | (int32)(v.cRef.min), 69 | (int32)(v.cRef.max), 70 | (bool)(v.cRef.isSet)) 71 | } 72 | 73 | func newGoValue(cRef *C.Value) *value { 74 | if cRef != nil { 75 | return &value{cRef} 76 | } 77 | return nil 78 | } 79 | 80 | func (v *value) notify(api *api, nt *notification) { 81 | // TODO 82 | } 83 | 84 | func (v *value) Id() ValueID { 85 | return ValueID{ 86 | CommandClassId: uint8(v.cRef.valueId.commandClassId), 87 | Instance: uint8(v.cRef.valueId.instance), 88 | Index: uint8(v.cRef.valueId.index), 89 | } 90 | } 91 | 92 | func (v *value) SetUint8(value uint8) bool { 93 | return (bool)(C.setUint8Value(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), C.uint8(value))) 94 | } 95 | 96 | func (v *value) GetUint8() (uint8, bool) { 97 | var value C.uint8 98 | ok := (bool)(C.getUint8Value(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), (*C.uint8)(&value))) 99 | return (uint8)(value), ok 100 | } 101 | 102 | func (v *value) SetBool(value bool) bool { 103 | return (bool)(C.setBoolValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), C._Bool(value))) 104 | } 105 | 106 | func (v *value) GetBool() (bool, bool) { 107 | var value C._Bool 108 | ok := (bool)(C.getBoolValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), (*C._Bool)(&value))) 109 | return (bool)(value), ok 110 | } 111 | 112 | func (v *value) SetInt(value int) bool { 113 | return (bool)(C.setIntValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), C.int(value))) 114 | } 115 | 116 | func (v *value) GetInt() (int, bool) { 117 | var value C.int 118 | ok := (bool)(C.getIntValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), (*C.int)(&value))) 119 | return (int)(value), ok 120 | } 121 | 122 | func (v *value) SetFloat(value float64) bool { 123 | return (bool)(C.setFloatValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), C.float(value))) 124 | } 125 | 126 | func (v *value) GetFloat() (float64, bool) { 127 | var value C.float 128 | ok := (bool)(C.getFloatValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), (*C.float)(&value))) 129 | return (float64)(value), ok 130 | } 131 | 132 | // for a missing value, the get operation always fails 133 | func (v *value) GetString() (string, bool) { 134 | var value *C.char 135 | ok := (bool)(C.getStringValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), (**C.char)(&value))) 136 | if ok && value != nil { 137 | result := C.GoString(value) 138 | C.free(unsafe.Pointer(value)) 139 | return result, true 140 | } else { 141 | return "", false 142 | } 143 | } 144 | 145 | // for a missing value, the set operation always fails 146 | func (v *value) SetString(value string) bool { 147 | tmp := C.CString(value) 148 | return (bool)(C.setStringValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), tmp)) 149 | } 150 | 151 | func (v *value) Refresh() bool { 152 | return (bool)(C.refreshValue(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id))) 153 | } 154 | 155 | func (v *value) free() { 156 | C.freeValue(v.cRef) 157 | } 158 | 159 | func (v *value) SetPollingState(state bool) bool { 160 | return (bool)(C.setPollingState(C.uint32(v.cRef.homeId), C.uint64(v.cRef.valueId.id), C._Bool(state))) 161 | } 162 | 163 | // for a missing value, the set operation always fails 164 | func (v *missingValue) SetUint8(value uint8) bool { 165 | return false 166 | } 167 | 168 | // for a missing value, the get operation always fails 169 | func (v *missingValue) GetUint8() (uint8, bool) { 170 | return 0, false 171 | } 172 | 173 | // for a missing value, the set operation always fails 174 | func (v *missingValue) SetBool(value bool) bool { 175 | return false 176 | } 177 | 178 | // for a missing value, the get operation always fails 179 | func (v *missingValue) GetBool() (bool, bool) { 180 | return false, false 181 | } 182 | 183 | // for a missing value, the get operation always fails 184 | func (v *missingValue) GetInt() (int, bool) { 185 | return 0, false 186 | } 187 | 188 | // for a missing value, the set operation always fails 189 | func (v *missingValue) SetInt(value int) bool { 190 | return false 191 | } 192 | 193 | // for a missing value, the get operation always fails 194 | func (v *missingValue) GetFloat() (float64, bool) { 195 | return 0.0, false 196 | } 197 | 198 | // for a missing value, the set operation always fails 199 | func (v *missingValue) SetFloat(value float64) bool { 200 | return false 201 | } 202 | 203 | // for a missing value, the get operation always fails 204 | func (v *missingValue) GetString() (string, bool) { 205 | return "", false 206 | } 207 | 208 | // for a missing value, the set operation always fails 209 | func (v *missingValue) SetString(value string) bool { 210 | return false 211 | } 212 | 213 | // for a missing value, the get operation always fails 214 | func (v *missingValue) Refresh() bool { 215 | return false 216 | } 217 | 218 | func (v *missingValue) SetPollingState(state bool) bool { 219 | return false 220 | } 221 | 222 | func (v *missingValue) Id() ValueID { 223 | return ValueID{0, 0, 0} 224 | } 225 | -------------------------------------------------------------------------------- /zwave_types.h: -------------------------------------------------------------------------------- 1 | #ifndef ZWAVE_TYPES_H 2 | #define ZWAVE_TYPES_H 3 | 4 | #ifdef __cplusplus 5 | extern "C" { 6 | #endif 7 | // Basic types 8 | typedef signed char int8; 9 | typedef unsigned char uint8; 10 | 11 | typedef signed short int16; 12 | typedef unsigned short uint16; 13 | 14 | typedef signed int int32; 15 | typedef unsigned int uint32; 16 | 17 | #ifdef _MSC_VER 18 | typedef signed __int64 int64; 19 | typedef unsigned __int64 uint64; 20 | #endif 21 | 22 | #ifdef __GNUC__ 23 | typedef signed long long int64; 24 | typedef unsigned long long uint64; 25 | #endif 26 | #ifdef __cplusplus 27 | } 28 | #endif 29 | #endif 30 | -------------------------------------------------------------------------------- /zwcli/.gitignore: -------------------------------------------------------------------------------- 1 | .gopath/ 2 | bin/* -------------------------------------------------------------------------------- /zwcli/Makefile: -------------------------------------------------------------------------------- 1 | GO_OPENZWAVE=github.com/ninjasphere/go-openzwave 2 | 3 | all: build 4 | 5 | # a rule that does the build in place here with whatever happens to be adjacent 6 | here: deps fmt 7 | go install 8 | 9 | clean: clean-src 10 | go clean -i 11 | rm -rf bin/* || true 12 | rm -rf .gopath || true 13 | 14 | clean-src: 15 | find . -name '*~' -exec rm {} \; 16 | 17 | fmt: 18 | gofmt -s -w *.go 19 | 20 | # does a clean build of all dependencies from git hub 21 | build: 22 | scripts/build.sh 23 | 24 | # 25 | # A raw go build will not build the required dependency, so 26 | # we use make to achieve this. 27 | # 28 | deps: 29 | ( go get -d $(GO_OPENZWAVE) ) || true 30 | cd $(GOPATH)/src/$(GO_OPENZWAVE) && make deps 31 | 32 | test: install 33 | go test -v ./... 34 | 35 | vet: install 36 | go vet ./... 37 | 38 | run: here 39 | ./go/bin/zwcli -monitor 40 | 41 | .PHONY: all dist clean test 42 | -------------------------------------------------------------------------------- /zwcli/README.md: -------------------------------------------------------------------------------- 1 | NAME 2 | ==== 3 | zwcli - a command line API for the Go API defined in go-openzwave 4 | 5 | DESCRIPTION 6 | =========== 7 | The purpose of this Go program is to provide a tool to aid the development and testing of go-openzwave by providing a way of exercising 8 | the API independently of the Ninja driver (driver-go-zwave). The tool might be useful in its own right for interrogating the zwave network. 9 | 10 | BUILDING 11 | ======== 12 | Run `make` from the command line at least once. Once built, further builds can be created with `go install`. 13 | 14 | Note that due to cross-compilation issues with cgo, it is necessary to build the linux/arm target on a native linux/arm host. 15 | 16 | -------------------------------------------------------------------------------- /zwcli/go: -------------------------------------------------------------------------------- 1 | ../../../../.. -------------------------------------------------------------------------------- /zwcli/scenarios/configured.multisensor.added.to.network.next.insertion/output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/zwcli/scenarios/configured.multisensor.added.to.network.next.insertion/output -------------------------------------------------------------------------------- /zwcli/scenarios/configured.multisensor.added.to.network/output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/zwcli/scenarios/configured.multisensor.added.to.network/output -------------------------------------------------------------------------------- /zwcli/scenarios/configured.multisensor.battery.off/output: -------------------------------------------------------------------------------- 1 | 2014/09/23 15:13:14 waiting until /dev/cu.SLAB_USBtoUART is available 2 | event loop starts 3 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x00000000, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 4 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 5 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 6 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 7 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 8 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 9 | 2014/09/23 15:13:17 Notification[notificationType=NT.DRIVER_READY/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 10 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 11 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 12 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 13 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 14 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 15 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 16 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 17 | 2014/09/23 15:13:17 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='0', label='Basic', units='', help='', min=0 max=255 isSet=false]] 18 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 19 | 2014/09/23 15:13:17 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 20 | 2014/09/23 15:13:17 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.SENSOR_BINARY, instance=1, index=0, value='False', label='Sensor', units='', help='', min=0 max=0 isSet=false]] 21 | 2014/09/23 15:13:17 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 22 | 2014/09/23 15:13:17 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.INT, commandClassId=CC.WAKE_UP, instance=1, index=0, value='3600', label='Wake-up Interval', units='Seconds', help='', min=-2147483648 max=2147483647 isSet=false]] 23 | 2014/09/23 15:13:17 Notification[notificationType=NT.VALUE_REMOVED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 24 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 25 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.NO_OPERATION, node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 26 | 2014/09/23 15:13:17 Notification[notificationType=NT.NOTIFICATION/CODE.SLEEP, node=Node[homeId=0x0161d366, nodeId=002, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 27 | 2014/09/23 15:13:18 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 28 | 2014/09/23 15:13:18 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 29 | 2014/09/23 15:13:18 Notification[notificationType=NT.ESSENTIAL_NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 30 | 2014/09/23 15:13:18 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 31 | 2014/09/23 15:13:18 Notification[notificationType=NT.NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 32 | 2014/09/23 15:13:18 Notification[notificationType=NT.AWAKE_NODES_QUERIED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 33 | -------------------------------------------------------------------------------- /zwcli/scenarios/multisensor.added.back.to.network/output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/zwcli/scenarios/multisensor.added.back.to.network/output -------------------------------------------------------------------------------- /zwcli/scenarios/multisensor.removed.from.network/log: -------------------------------------------------------------------------------- 1 | 2014-09-23 15:17:45.041 mgr, Added driver for controller /dev/cu.SLAB_USBtoUART 2 | 2014-09-23 15:17:45.042 Opening controller /dev/cu.SLAB_USBtoUART 3 | 2014-09-23 15:17:45.043 Trying to open serial port /dev/cu.SLAB_USBtoUART (attempt 1) 4 | 2014-09-23 15:17:45.048 Serial port /dev/cu.SLAB_USBtoUART opened (attempt 1) 5 | 2014-09-23 15:17:45.048 contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 6 | 2014-09-23 15:17:45.049 contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 7 | 2014-09-23 15:17:45.049 contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 8 | 2014-09-23 15:17:45.049 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 9 | 2014-09-23 15:17:45.049 contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 10 | 2014-09-23 15:17:45.049 Specified option [RetryTimeout] was not found. 11 | 2014-09-23 15:17:45.049 12 | 2014-09-23 15:17:45.049 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 13 | 2014-09-23 15:17:45.052 contrlr, Received: 0x01, 0x10, 0x01, 0x15, 0x5a, 0x2d, 0x57, 0x61, 0x76, 0x65, 0x20, 0x32, 0x2e, 0x37, 0x38, 0x00, 0x01, 0x9b 14 | 2014-09-23 15:17:45.052 15 | 2014-09-23 15:17:45.052 contrlr, Received reply to FUNC_ID_ZW_GET_VERSION: 16 | 2014-09-23 15:17:45.052 contrlr, Static Controller library, version Z-Wave 2.78 17 | 2014-09-23 15:17:45.052 contrlr, Expected reply was received 18 | 2014-09-23 15:17:45.052 contrlr, Message transaction complete 19 | 2014-09-23 15:17:45.053 20 | 2014-09-23 15:17:45.053 contrlr, Removing current message 21 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 22 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 23 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 24 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 25 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 26 | 2014-09-23 15:17:45.053 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 27 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 28 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 29 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 30 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 31 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 32 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 33 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 34 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 35 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 36 | 2014-09-23 15:17:45.054 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 37 | 2014-09-23 15:17:45.055 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 38 | 2014-09-23 15:17:45.055 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 39 | 2014-09-23 15:17:45.055 40 | 2014-09-23 15:17:45.055 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 41 | 2014-09-23 15:17:45.057 contrlr, Received: 0x01, 0x08, 0x01, 0x20, 0x01, 0x61, 0xd3, 0x66, 0x01, 0x02 42 | 2014-09-23 15:17:45.057 43 | 2014-09-23 15:17:45.057 contrlr, Received reply to FUNC_ID_ZW_MEMORY_GET_ID. Home ID = 0x0161d366. Our node ID = 1 44 | 2014-09-23 15:17:45.057 contrlr, Expected reply was received 45 | 2014-09-23 15:17:45.057 contrlr, Message transaction complete 46 | 2014-09-23 15:17:45.058 47 | 2014-09-23 15:17:45.058 contrlr, Removing current message 48 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 49 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 50 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 51 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 52 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 53 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 54 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 55 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 56 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 57 | 2014-09-23 15:17:45.058 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 58 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 59 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 60 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 61 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 62 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 63 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 64 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 65 | 2014-09-23 15:17:45.059 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 66 | 2014-09-23 15:17:45.059 67 | 2014-09-23 15:17:45.059 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 68 | 2014-09-23 15:17:45.061 contrlr, Received: 0x01, 0x04, 0x01, 0x05, 0x1c, 0xe3 69 | 2014-09-23 15:17:45.061 70 | 2014-09-23 15:17:45.061 contrlr, Received reply to FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 71 | 2014-09-23 15:17:45.061 contrlr, There is a SUC ID Server (SIS) in this network. 72 | 2014-09-23 15:17:45.061 contrlr, The PC controller is an inclusion static update controller (SUC) and was the original primary before the SIS was added. 73 | 2014-09-23 15:17:45.061 contrlr, Expected reply was received 74 | 2014-09-23 15:17:45.061 contrlr, Message transaction complete 75 | 2014-09-23 15:17:45.061 76 | 2014-09-23 15:17:45.061 contrlr, Removing current message 77 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 78 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 79 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 80 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 81 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 82 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 83 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 84 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 85 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 86 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 87 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 88 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 89 | 2014-09-23 15:17:45.062 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 90 | 2014-09-23 15:17:45.063 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 91 | 2014-09-23 15:17:45.063 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 92 | 2014-09-23 15:17:45.063 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 93 | 2014-09-23 15:17:45.063 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 94 | 2014-09-23 15:17:45.063 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 95 | 2014-09-23 15:17:45.063 96 | 2014-09-23 15:17:45.063 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 97 | 2014-09-23 15:17:45.068 contrlr, Received: 0x01, 0x2b, 0x01, 0x07, 0x03, 0x07, 0x00, 0x86, 0x00, 0x02, 0x00, 0x01, 0xfe, 0x80, 0xfe, 0x88, 0x0f, 0x00, 0x00, 0x00, 0xfb, 0x97, 0x7f, 0x82, 0x07, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2 98 | 2014-09-23 15:17:45.068 99 | 2014-09-23 15:17:45.069 contrlr, Received reply to FUNC_ID_SERIAL_API_GET_CAPABILITIES 100 | 2014-09-23 15:17:45.069 contrlr, Serial API Version: 3.7 101 | 2014-09-23 15:17:45.069 contrlr, Manufacturer ID: 0x0086 102 | 2014-09-23 15:17:45.069 contrlr, Product Type: 0x0002 103 | 2014-09-23 15:17:45.069 contrlr, Product ID: 0x0001 104 | 2014-09-23 15:17:45.069 contrlr, Queuing (Command) FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 105 | 2014-09-23 15:17:45.069 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 106 | 2014-09-23 15:17:45.069 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 107 | 2014-09-23 15:17:45.070 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 108 | 2014-09-23 15:17:45.070 contrlr, Expected reply was received 109 | 2014-09-23 15:17:45.070 contrlr, Message transaction complete 110 | 2014-09-23 15:17:45.070 111 | 2014-09-23 15:17:45.070 contrlr, Removing current message 112 | 2014-09-23 15:17:45.070 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 113 | 2014-09-23 15:17:45.070 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 114 | 2014-09-23 15:17:45.070 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 115 | 2014-09-23 15:17:45.070 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 116 | 2014-09-23 15:17:45.070 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 117 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 118 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 119 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 120 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 121 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 122 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 123 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 124 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 125 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 126 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 127 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 128 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 129 | 2014-09-23 15:17:45.071 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 130 | 2014-09-23 15:17:45.072 131 | 2014-09-23 15:17:45.072 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 132 | 2014-09-23 15:17:45.073 contrlr, Received: 0x01, 0x04, 0x01, 0x56, 0x01, 0xad 133 | 2014-09-23 15:17:45.073 134 | 2014-09-23 15:17:45.074 contrlr, Received reply to GET_SUC_NODE_ID. Node ID = 1 135 | 2014-09-23 15:17:45.074 contrlr, Expected reply was received 136 | 2014-09-23 15:17:45.074 contrlr, Message transaction complete 137 | 2014-09-23 15:17:45.074 138 | 2014-09-23 15:17:45.074 contrlr, Removing current message 139 | 2014-09-23 15:17:45.074 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 140 | 2014-09-23 15:17:45.074 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 141 | 2014-09-23 15:17:45.074 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 142 | 2014-09-23 15:17:45.074 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 143 | 2014-09-23 15:17:45.074 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 144 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 145 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 146 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 147 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 148 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 149 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 150 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 151 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 152 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 153 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 154 | 2014-09-23 15:17:45.075 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 155 | 2014-09-23 15:17:45.076 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 156 | 2014-09-23 15:17:45.076 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 157 | 2014-09-23 15:17:45.076 158 | 2014-09-23 15:17:45.076 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x1c) - FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 159 | 2014-09-23 15:17:45.129 contrlr, Received: 0x01, 0x25, 0x01, 0x1c, 0x01, 0x20, 0x88, 0xb7, 0x6e, 0x03, 0x0b, 0xf7, 0x06, 0x0d, 0x0b, 0xf4, 0xa2, 0xb7, 0x50, 0xfa, 0xa3, 0xc5, 0x15, 0x29, 0x33, 0x2e, 0xc9, 0xa9, 0xcf, 0x72, 0x3c, 0xa6, 0xec, 0xfe, 0x3d, 0x20, 0xbb, 0x70, 0xc7 160 | 2014-09-23 15:17:45.129 161 | 2014-09-23 15:17:45.129 contrlr, Received reply to FUNC_ID_ZW_GET_RANDOM: true 162 | 2014-09-23 15:17:45.129 contrlr, Expected reply was received 163 | 2014-09-23 15:17:45.130 contrlr, Message transaction complete 164 | 2014-09-23 15:17:45.130 165 | 2014-09-23 15:17:45.130 contrlr, Removing current message 166 | 2014-09-23 15:17:45.130 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 167 | 2014-09-23 15:17:45.130 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 168 | 2014-09-23 15:17:45.130 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 169 | 2014-09-23 15:17:45.130 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 170 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 171 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 172 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 173 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 174 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 175 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 176 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 177 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 178 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 179 | 2014-09-23 15:17:45.131 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 180 | 2014-09-23 15:17:45.132 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 181 | 2014-09-23 15:17:45.132 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 182 | 2014-09-23 15:17:45.132 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 183 | 2014-09-23 15:17:45.132 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 184 | 2014-09-23 15:17:45.132 185 | 2014-09-23 15:17:45.132 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x02) - FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 186 | 2014-09-23 15:17:45.181 contrlr, Received: 0x01, 0x25, 0x01, 0x02, 0x05, 0x08, 0x1d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0xca 187 | 2014-09-23 15:17:45.181 188 | 2014-09-23 15:17:45.181 mgr, Driver with Home ID of 0x0161d366 is now ready. 189 | 2014-09-23 15:17:45.181 190 | 2014-09-23 15:17:45.181 contrlr, Received reply to FUNC_ID_SERIAL_API_GET_INIT_DATA: 191 | 2014-09-23 15:17:45.181 contrlr, Node 001 - New 192 | 2014-09-23 15:17:45.181 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=ProtocolInfo live=1 193 | 2014-09-23 15:17:45.181 Node001, QueryStage_ProtocolInfo 194 | 2014-09-23 15:17:45.182 Node001, Queuing (Query) Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 195 | 2014-09-23 15:17:45.182 Node001, Queuing (Query) Query Stage Complete (ProtocolInfo) 196 | 2014-09-23 15:17:45.182 contrlr, Expected reply was received 197 | 2014-09-23 15:17:45.182 contrlr, Message transaction complete 198 | 2014-09-23 15:17:45.182 199 | 2014-09-23 15:17:45.182 contrlr, Removing current message 200 | 2014-09-23 15:17:45.183 201 | 2014-09-23 15:17:45.183 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x06) - FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 202 | 2014-09-23 15:17:45.185 contrlr, Received: 0x01, 0x05, 0x01, 0x06, 0x96, 0x0f, 0x64 203 | 2014-09-23 15:17:45.185 204 | 2014-09-23 15:17:45.185 contrlr, Received reply to FUNC_ID_SERIAL_API_SET_TIMEOUTS 205 | 2014-09-23 15:17:45.185 contrlr, Expected reply was received 206 | 2014-09-23 15:17:45.186 contrlr, Message transaction complete 207 | 2014-09-23 15:17:45.186 208 | 2014-09-23 15:17:45.186 contrlr, Removing current message 209 | 2014-09-23 15:17:45.186 210 | 2014-09-23 15:17:45.186 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x00) - FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 211 | 2014-09-23 15:17:45.187 contrlr, Removing current message 212 | 2014-09-23 15:17:45.188 213 | 2014-09-23 15:17:45.188 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 214 | 2014-09-23 15:17:45.190 Node001, Received: 0x01, 0x09, 0x01, 0x41, 0x92, 0x16, 0x00, 0x02, 0x02, 0x00, 0x32 215 | 2014-09-23 15:17:45.190 216 | 2014-09-23 15:17:45.191 Node001, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO 217 | 2014-09-23 15:17:45.191 Node001, Protocol Info for Node 1: 218 | 2014-09-23 15:17:45.191 Node001, Listening = true 219 | 2014-09-23 15:17:45.191 Node001, Beaming = true 220 | 2014-09-23 15:17:45.191 Node001, Routing = false 221 | 2014-09-23 15:17:45.191 Node001, Max Baud Rate = 40000 222 | 2014-09-23 15:17:45.191 Node001, Version = 3 223 | 2014-09-23 15:17:45.191 Node001, Security = false 224 | 2014-09-23 15:17:45.192 Node001, Basic device class (0x02) - Static Controller 225 | 2014-09-23 15:17:45.192 Node001, Generic device Class (0x02) - Static Controller 226 | 2014-09-23 15:17:45.192 Node001, No specific device class defined 227 | 2014-09-23 15:17:45.192 Node001, COMMAND_CLASS_BASIC is not mapped 228 | 2014-09-23 15:17:45.193 Node001, Mandatory Command Classes for Node 1: 229 | 2014-09-23 15:17:45.193 Node001, None 230 | 2014-09-23 15:17:45.193 Node001, Mandatory Command Classes controlled by Node 1: 231 | 2014-09-23 15:17:45.193 Node001, COMMAND_CLASS_BASIC 232 | 2014-09-23 15:17:45.193 Driver::ReadButtons - zwbutton.xml file not found. 233 | 2014-09-23 15:17:45.193 Node001, Expected reply was received 234 | 2014-09-23 15:17:45.193 Node001, Message transaction complete 235 | 2014-09-23 15:17:45.193 236 | 2014-09-23 15:17:45.193 Node001, Removing current message 237 | 2014-09-23 15:17:45.194 Node001, Query Stage Complete (ProtocolInfo) 238 | 2014-09-23 15:17:45.194 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1 239 | 2014-09-23 15:17:45.194 Node001, QueryStage_Probe 240 | 2014-09-23 15:17:45.194 Node001, QueryStage_WakeUp 241 | 2014-09-23 15:17:45.194 Node001, QueryStage_ManufacturerSpecific1 242 | 2014-09-23 15:17:45.196 Node001, QueryStage_NodeInfo 243 | 2014-09-23 15:17:45.196 Node001, Queuing (Query) Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 244 | 2014-09-23 15:17:45.196 Node001, Queuing (Query) Query Stage Complete (NodeInfo) 245 | 2014-09-23 15:17:45.197 246 | 2014-09-23 15:17:45.197 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x49) - Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 247 | 2014-09-23 15:17:45.201 Node001, Received: 0x01, 0x04, 0x01, 0x60, 0x01, 0x9b 248 | 2014-09-23 15:17:45.201 249 | 2014-09-23 15:17:45.201 Node001, FUNC_ID_ZW_REQUEST_NODE_INFO Request successful. 250 | 2014-09-23 15:17:45.500 Node001, Received: 0x01, 0x06, 0x00, 0x49, 0x81, 0x00, 0x00, 0x31 251 | 2014-09-23 15:17:45.500 252 | 2014-09-23 15:17:45.501 WARNING: FUNC_ID_ZW_APPLICATION_UPDATE: UPDATE_STATE_NODE_INFO_REQ_FAILED received 253 | 2014-09-23 15:17:45.501 Node001, QueryStageRetry stage NodeInfo requested stage NodeInfo max 2 retries 0 pending 1 254 | 2014-09-23 15:17:45.501 Node001, Expected reply was received 255 | 2014-09-23 15:17:45.501 Node001, Message transaction complete 256 | 2014-09-23 15:17:45.502 257 | 2014-09-23 15:17:45.502 Node001, Removing current message 258 | 2014-09-23 15:17:45.502 Node001, Query Stage Complete (NodeInfo) 259 | 2014-09-23 15:17:45.502 Node001, AdvanceQueries queryPending=0 queryRetries=1 queryStage=NodeInfo live=1 260 | 2014-09-23 15:17:45.502 Node001, QueryStage_NodeInfo 261 | 2014-09-23 15:17:45.502 Node001, Queuing (Query) Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 262 | 2014-09-23 15:17:45.502 Node001, Queuing (Query) Query Stage Complete (NodeInfo) 263 | 2014-09-23 15:17:45.502 264 | 2014-09-23 15:17:45.502 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x49) - Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 265 | 2014-09-23 15:17:45.507 Node001, Received: 0x01, 0x04, 0x01, 0x60, 0x01, 0x9b 266 | 2014-09-23 15:17:45.507 267 | 2014-09-23 15:17:45.507 Node001, FUNC_ID_ZW_REQUEST_NODE_INFO Request successful. 268 | 2014-09-23 15:17:45.926 Node001, Received: 0x01, 0x06, 0x00, 0x49, 0x81, 0x00, 0x00, 0x31 269 | 2014-09-23 15:17:45.926 270 | 2014-09-23 15:17:45.927 WARNING: FUNC_ID_ZW_APPLICATION_UPDATE: UPDATE_STATE_NODE_INFO_REQ_FAILED received 271 | 2014-09-23 15:17:45.927 Node001, QueryStageRetry stage NodeInfo requested stage NodeInfo max 2 retries 1 pending 1 272 | 2014-09-23 15:17:45.928 Node001, Expected reply was received 273 | 2014-09-23 15:17:45.928 Node001, Message transaction complete 274 | 2014-09-23 15:17:45.928 275 | 2014-09-23 15:17:45.928 Node001, Removing current message 276 | 2014-09-23 15:17:45.928 Node001, Query Stage Complete (NodeInfo) 277 | 2014-09-23 15:17:45.928 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=ManufacturerSpecific2 live=1 278 | 2014-09-23 15:17:45.928 Node001, QueryStage_ManufacturerSpecific2 279 | 2014-09-23 15:17:45.928 Node001, QueryStage_Versions 280 | 2014-09-23 15:17:45.929 Node001, QueryStage_Instances 281 | 2014-09-23 15:17:45.929 Node001, Essential node queries are complete 282 | 2014-09-23 15:17:45.929 Node001, QueryStage_Static 283 | 2014-09-23 15:17:45.929 Node001, QueryStage_Associations 284 | 2014-09-23 15:17:45.929 Node001, QueryStage_Neighbors 285 | 2014-09-23 15:17:45.929 Requesting routing info (neighbor list) for Node 1 286 | 2014-09-23 15:17:45.929 Node001, Queuing (Command) Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 287 | 2014-09-23 15:17:45.929 Node001, Queuing (Query) Query Stage Complete (Neighbors) 288 | 2014-09-23 15:17:45.930 289 | 2014-09-23 15:17:45.930 Node001, Sending (Command) message (Callback ID=0x00, Expected Reply=0x80) - Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 290 | 2014-09-23 15:17:45.935 Node001, Received: 0x01, 0x20, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e 291 | 2014-09-23 15:17:45.935 292 | 2014-09-23 15:17:45.935 Node001, Received reply to FUNC_ID_ZW_GET_ROUTING_INFO 293 | 2014-09-23 15:17:45.935 Node001, Neighbors of this node are: 294 | 2014-09-23 15:17:45.936 Node001, (none reported) 295 | 2014-09-23 15:17:45.936 Node001, Expected reply was received 296 | 2014-09-23 15:17:45.936 Node001, Message transaction complete 297 | 2014-09-23 15:17:45.936 298 | 2014-09-23 15:17:45.936 Node001, Removing current message 299 | 2014-09-23 15:17:45.936 Node001, Query Stage Complete (Neighbors) 300 | 2014-09-23 15:17:45.936 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Session live=1 301 | 2014-09-23 15:17:45.936 Node001, QueryStage_Session 302 | 2014-09-23 15:17:45.936 Node001, QueryStage_Dynamic 303 | 2014-09-23 15:17:45.936 Node001, QueryStage_Configuration 304 | 2014-09-23 15:17:45.937 Node001, QueryStage_Complete 305 | 2014-09-23 15:17:45.937 CheckCompletedNodeQueries m_allNodesQueried=0 m_awakeNodesQueried=0 306 | 2014-09-23 15:17:45.937 CheckCompletedNodeQueries all=1, deadFound=0 sleepingOnly=1 307 | 2014-09-23 15:17:45.937 Node query processing complete. 308 | 2014-09-23 15:17:53.464 *************************************************************************** 309 | 2014-09-23 15:17:53.464 ********************* Cumulative Network Statistics ********************* 310 | 2014-09-23 15:17:53.465 *** General 311 | 2014-09-23 15:17:53.465 Driver run time: . . . 0 days, 0 hours, 0 minutes 312 | 2014-09-23 15:17:53.465 Frames processed: . . . . . . . . . . . . . . . . . . . . 14 313 | 2014-09-23 15:17:53.465 Total messages successfully received: . . . . . . . . . . 14 314 | 2014-09-23 15:17:53.465 Total Messages successfully sent: . . . . . . . . . . . . 13 315 | 2014-09-23 15:17:53.465 ACKs received from controller: . . . . . . . . . . . . . 13 316 | 2014-09-23 15:17:53.465 *** Errors 317 | 2014-09-23 15:17:53.465 Unsolicited messages received while waiting for ACK: . . 0 318 | 2014-09-23 15:17:53.466 Reads aborted due to timeouts: . . . . . . . . . . . . . 0 319 | 2014-09-23 15:17:53.466 Bad checksum errors: . . . . . . . . . . . . . . . . . . 0 320 | 2014-09-23 15:17:53.466 CANs received from controller: . . . . . . . . . . . . . 0 321 | 2014-09-23 15:17:53.466 NAKs received from controller: . . . . . . . . . . . . . 0 322 | 2014-09-23 15:17:53.466 Out of frame data flow errors: . . . . . . . . . . . . . 0 323 | 2014-09-23 15:17:53.466 Messages retransmitted: . . . . . . . . . . . . . . . . . 0 324 | 2014-09-23 15:17:53.466 Messages dropped and not delivered: . . . . . . . . . . . 0 325 | 2014-09-23 15:17:53.466 *************************************************************************** 326 | 2014-09-23 15:17:55.481 mgr, Driver for controller /dev/cu.SLAB_USBtoUART removed 327 | -------------------------------------------------------------------------------- /zwcli/scenarios/multisensor.removed.from.network/output: -------------------------------------------------------------------------------- 1 | 2014/09/23 15:17:41 waiting until /dev/cu.SLAB_USBtoUART is available 2 | event loop starts 3 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x00000000, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 4 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 5 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 6 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 7 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 8 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 9 | 2014/09/23 15:17:45 Notification[notificationType=NT.DRIVER_READY/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 10 | 2014/09/23 15:17:45 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 11 | 2014/09/23 15:17:45 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 12 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 13 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 14 | 2014/09/23 15:17:45 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 15 | 2014/09/23 15:17:45 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='0', label='Basic', units='', help='', min=0 max=255 isSet=false]] 16 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 17 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 18 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 19 | 2014/09/23 15:17:45 Notification[notificationType=NT.ESSENTIAL_NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 20 | 2014/09/23 15:17:45 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 21 | 2014/09/23 15:17:45 Notification[notificationType=NT.NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 22 | 2014/09/23 15:17:45 Notification[notificationType=NT.ALL_NODES_QUERIED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 23 | -------------------------------------------------------------------------------- /zwcli/scenarios/multisensor.removed.with.remove.device.then.added.back/output: -------------------------------------------------------------------------------- 1 | 2014/09/23 15:26:23 waiting until /dev/cu.SLAB_USBtoUART is available 2 | event loop starts 3 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x00000000, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 4 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 5 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 6 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 7 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 8 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 9 | 2014/09/23 15:26:27 Notification[notificationType=NT.DRIVER_READY/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 10 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 11 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 12 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 13 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 14 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 15 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 16 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 17 | 2014/09/23 15:26:27 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='0', label='Basic', units='', help='', min=0 max=255 isSet=false]] 18 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 19 | 2014/09/23 15:26:27 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 20 | 2014/09/23 15:26:27 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.SENSOR_BINARY, instance=1, index=0, value='False', label='Sensor', units='', help='', min=0 max=0 isSet=false]] 21 | 2014/09/23 15:26:27 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 22 | 2014/09/23 15:26:27 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.INT, commandClassId=CC.WAKE_UP, instance=1, index=0, value='3600', label='Wake-up Interval', units='Seconds', help='', min=-2147483648 max=2147483647 isSet=false]] 23 | 2014/09/23 15:26:27 Notification[notificationType=NT.VALUE_REMOVED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 24 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 25 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.NO_OPERATION, node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 26 | 2014/09/23 15:26:27 Notification[notificationType=NT.NOTIFICATION/CODE.SLEEP, node=Node[homeId=0x0161d366, nodeId=003, basicType=04, genericType=20, specificType=01, nodeType='Routing Binary Sensor', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 27 | 2014/09/23 15:26:28 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 28 | 2014/09/23 15:26:28 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 29 | 2014/09/23 15:26:28 Notification[notificationType=NT.ESSENTIAL_NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 30 | 2014/09/23 15:26:28 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 31 | 2014/09/23 15:26:28 Notification[notificationType=NT.NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 32 | 2014/09/23 15:26:28 Notification[notificationType=NT.AWAKE_NODES_QUERIED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 33 | -------------------------------------------------------------------------------- /zwcli/scenarios/reset.controller.empty.network/log: -------------------------------------------------------------------------------- 1 | 2014-09-23 15:09:58.712 mgr, Added driver for controller /dev/cu.SLAB_USBtoUART 2 | 2014-09-23 15:09:58.713 Opening controller /dev/cu.SLAB_USBtoUART 3 | 2014-09-23 15:09:58.713 Trying to open serial port /dev/cu.SLAB_USBtoUART (attempt 1) 4 | 2014-09-23 15:09:58.718 Serial port /dev/cu.SLAB_USBtoUART opened (attempt 1) 5 | 2014-09-23 15:09:58.719 contrlr, Queuing (Command) FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 6 | 2014-09-23 15:09:58.719 contrlr, Queuing (Command) FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 7 | 2014-09-23 15:09:58.719 contrlr, Queuing (Command) FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 8 | 2014-09-23 15:09:58.719 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 9 | 2014-09-23 15:09:58.719 contrlr, Queuing (Command) FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 10 | 2014-09-23 15:09:58.719 Specified option [RetryTimeout] was not found. 11 | 2014-09-23 15:09:58.719 12 | 2014-09-23 15:09:58.719 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x15) - FUNC_ID_ZW_GET_VERSION: 0x01, 0x03, 0x00, 0x15, 0xe9 13 | 2014-09-23 15:09:58.722 contrlr, Received: 0x01, 0x10, 0x01, 0x15, 0x5a, 0x2d, 0x57, 0x61, 0x76, 0x65, 0x20, 0x32, 0x2e, 0x37, 0x38, 0x00, 0x01, 0x9b 14 | 2014-09-23 15:09:58.722 15 | 2014-09-23 15:09:58.722 contrlr, Received reply to FUNC_ID_ZW_GET_VERSION: 16 | 2014-09-23 15:09:58.723 contrlr, Static Controller library, version Z-Wave 2.78 17 | 2014-09-23 15:09:58.723 contrlr, Expected reply was received 18 | 2014-09-23 15:09:58.723 contrlr, Message transaction complete 19 | 2014-09-23 15:09:58.723 20 | 2014-09-23 15:09:58.723 contrlr, Removing current message 21 | 2014-09-23 15:09:58.723 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 22 | 2014-09-23 15:09:58.723 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 23 | 2014-09-23 15:09:58.723 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 24 | 2014-09-23 15:09:58.723 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 25 | 2014-09-23 15:09:58.723 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 26 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 27 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 28 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 29 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 30 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 31 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 32 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 33 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 34 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 35 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 36 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 37 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 38 | 2014-09-23 15:09:58.724 mgr, Manager::GetDriver failed - Home ID 0x00000000 is unknown 39 | 2014-09-23 15:09:58.725 40 | 2014-09-23 15:09:58.725 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x20) - FUNC_ID_ZW_MEMORY_GET_ID: 0x01, 0x03, 0x00, 0x20, 0xdc 41 | 2014-09-23 15:09:58.727 contrlr, Received: 0x01, 0x08, 0x01, 0x20, 0x01, 0x61, 0xd3, 0x66, 0x01, 0x02 42 | 2014-09-23 15:09:58.727 43 | 2014-09-23 15:09:58.727 contrlr, Received reply to FUNC_ID_ZW_MEMORY_GET_ID. Home ID = 0x0161d366. Our node ID = 1 44 | 2014-09-23 15:09:58.727 contrlr, Expected reply was received 45 | 2014-09-23 15:09:58.727 contrlr, Message transaction complete 46 | 2014-09-23 15:09:58.727 47 | 2014-09-23 15:09:58.727 contrlr, Removing current message 48 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 49 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 50 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 51 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 52 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 53 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 54 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 55 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 56 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 57 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 58 | 2014-09-23 15:09:58.728 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 59 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 60 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 61 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 62 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 63 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 64 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 65 | 2014-09-23 15:09:58.729 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 66 | 2014-09-23 15:09:58.729 67 | 2014-09-23 15:09:58.729 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x05) - FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 0x01, 0x03, 0x00, 0x05, 0xf9 68 | 2014-09-23 15:09:58.731 contrlr, Received: 0x01, 0x04, 0x01, 0x05, 0x1c, 0xe3 69 | 2014-09-23 15:09:58.731 70 | 2014-09-23 15:09:58.731 contrlr, Received reply to FUNC_ID_ZW_GET_CONTROLLER_CAPABILITIES: 71 | 2014-09-23 15:09:58.731 contrlr, There is a SUC ID Server (SIS) in this network. 72 | 2014-09-23 15:09:58.731 contrlr, The PC controller is an inclusion static update controller (SUC) and was the original primary before the SIS was added. 73 | 2014-09-23 15:09:58.731 contrlr, Expected reply was received 74 | 2014-09-23 15:09:58.731 contrlr, Message transaction complete 75 | 2014-09-23 15:09:58.731 76 | 2014-09-23 15:09:58.732 contrlr, Removing current message 77 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 78 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 79 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 80 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 81 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 82 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 83 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 84 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 85 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 86 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 87 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 88 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 89 | 2014-09-23 15:09:58.732 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 90 | 2014-09-23 15:09:58.733 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 91 | 2014-09-23 15:09:58.733 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 92 | 2014-09-23 15:09:58.733 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 93 | 2014-09-23 15:09:58.733 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 94 | 2014-09-23 15:09:58.733 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 95 | 2014-09-23 15:09:58.733 96 | 2014-09-23 15:09:58.733 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x07) - FUNC_ID_SERIAL_API_GET_CAPABILITIES: 0x01, 0x03, 0x00, 0x07, 0xfb 97 | 2014-09-23 15:09:58.738 contrlr, Received: 0x01, 0x2b, 0x01, 0x07, 0x03, 0x07, 0x00, 0x86, 0x00, 0x02, 0x00, 0x01, 0xfe, 0x80, 0xfe, 0x88, 0x0f, 0x00, 0x00, 0x00, 0xfb, 0x97, 0x7f, 0x82, 0x07, 0x00, 0x00, 0x80, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2 98 | 2014-09-23 15:09:58.739 99 | 2014-09-23 15:09:58.739 contrlr, Received reply to FUNC_ID_SERIAL_API_GET_CAPABILITIES 100 | 2014-09-23 15:09:58.739 contrlr, Serial API Version: 3.7 101 | 2014-09-23 15:09:58.739 contrlr, Manufacturer ID: 0x0086 102 | 2014-09-23 15:09:58.739 contrlr, Product Type: 0x0002 103 | 2014-09-23 15:09:58.739 contrlr, Product ID: 0x0001 104 | 2014-09-23 15:09:58.739 contrlr, Queuing (Command) FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 105 | 2014-09-23 15:09:58.740 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 106 | 2014-09-23 15:09:58.740 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 107 | 2014-09-23 15:09:58.740 contrlr, Queuing (Command) FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 108 | 2014-09-23 15:09:58.740 contrlr, Expected reply was received 109 | 2014-09-23 15:09:58.740 contrlr, Message transaction complete 110 | 2014-09-23 15:09:58.740 111 | 2014-09-23 15:09:58.740 contrlr, Removing current message 112 | 2014-09-23 15:09:58.740 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 113 | 2014-09-23 15:09:58.740 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 114 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 115 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 116 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 117 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 118 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 119 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 120 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 121 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 122 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 123 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 124 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 125 | 2014-09-23 15:09:58.741 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 126 | 2014-09-23 15:09:58.742 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 127 | 2014-09-23 15:09:58.742 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 128 | 2014-09-23 15:09:58.742 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 129 | 2014-09-23 15:09:58.742 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 130 | 2014-09-23 15:09:58.742 131 | 2014-09-23 15:09:58.742 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x56) - FUNC_ID_ZW_GET_SUC_NODE_ID: 0x01, 0x03, 0x00, 0x56, 0xaa 132 | 2014-09-23 15:09:58.744 contrlr, Received: 0x01, 0x04, 0x01, 0x56, 0x01, 0xad 133 | 2014-09-23 15:09:58.744 134 | 2014-09-23 15:09:58.744 contrlr, Received reply to GET_SUC_NODE_ID. Node ID = 1 135 | 2014-09-23 15:09:58.744 contrlr, Expected reply was received 136 | 2014-09-23 15:09:58.744 contrlr, Message transaction complete 137 | 2014-09-23 15:09:58.744 138 | 2014-09-23 15:09:58.744 contrlr, Removing current message 139 | 2014-09-23 15:09:58.744 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 140 | 2014-09-23 15:09:58.744 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 141 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 142 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 143 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 144 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 145 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 146 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 147 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 148 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 149 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 150 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 151 | 2014-09-23 15:09:58.745 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 152 | 2014-09-23 15:09:58.746 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 153 | 2014-09-23 15:09:58.746 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 154 | 2014-09-23 15:09:58.746 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 155 | 2014-09-23 15:09:58.746 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 156 | 2014-09-23 15:09:58.746 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 157 | 2014-09-23 15:09:58.746 158 | 2014-09-23 15:09:58.746 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x1c) - FUNC_ID_ZW_GET_RANDOM: 0x01, 0x04, 0x00, 0x1c, 0x20, 0xc7 159 | 2014-09-23 15:09:58.799 contrlr, Received: 0x01, 0x25, 0x01, 0x1c, 0x01, 0x20, 0xda, 0x05, 0xa1, 0xb0, 0x08, 0x76, 0x22, 0x69, 0xd1, 0x92, 0x5f, 0x4c, 0x76, 0xec, 0x9d, 0x51, 0x5f, 0x89, 0x0f, 0x78, 0xd3, 0x3c, 0x72, 0x45, 0x58, 0x80, 0xa7, 0xb6, 0x22, 0x93, 0xb8, 0x58, 0xfa 160 | 2014-09-23 15:09:58.799 161 | 2014-09-23 15:09:58.800 contrlr, Received reply to FUNC_ID_ZW_GET_RANDOM: true 162 | 2014-09-23 15:09:58.800 contrlr, Expected reply was received 163 | 2014-09-23 15:09:58.800 contrlr, Message transaction complete 164 | 2014-09-23 15:09:58.800 165 | 2014-09-23 15:09:58.800 contrlr, Removing current message 166 | 2014-09-23 15:09:58.800 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 167 | 2014-09-23 15:09:58.800 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 168 | 2014-09-23 15:09:58.800 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 169 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 170 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 171 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 172 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 173 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 174 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 175 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 176 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 177 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 178 | 2014-09-23 15:09:58.801 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 179 | 2014-09-23 15:09:58.802 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 180 | 2014-09-23 15:09:58.802 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 181 | 2014-09-23 15:09:58.802 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 182 | 2014-09-23 15:09:58.802 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 183 | 2014-09-23 15:09:58.802 mgr, Manager::GetDriver failed - Home ID 0x0161d366 is unknown 184 | 2014-09-23 15:09:58.802 185 | 2014-09-23 15:09:58.802 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x02) - FUNC_ID_SERIAL_API_GET_INIT_DATA: 0x01, 0x03, 0x00, 0x02, 0xfe 186 | 2014-09-23 15:09:58.851 contrlr, Received: 0x01, 0x25, 0x01, 0x02, 0x05, 0x08, 0x1d, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x01, 0xca 187 | 2014-09-23 15:09:58.851 188 | 2014-09-23 15:09:58.851 mgr, Driver with Home ID of 0x0161d366 is now ready. 189 | 2014-09-23 15:09:58.851 190 | 2014-09-23 15:09:58.851 contrlr, Received reply to FUNC_ID_SERIAL_API_GET_INIT_DATA: 191 | 2014-09-23 15:09:58.852 contrlr, Node 001 - New 192 | 2014-09-23 15:09:58.852 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=ProtocolInfo live=1 193 | 2014-09-23 15:09:58.852 Node001, QueryStage_ProtocolInfo 194 | 2014-09-23 15:09:58.852 Node001, Queuing (Query) Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 195 | 2014-09-23 15:09:58.852 Node001, Queuing (Query) Query Stage Complete (ProtocolInfo) 196 | 2014-09-23 15:09:58.852 contrlr, Expected reply was received 197 | 2014-09-23 15:09:58.852 contrlr, Message transaction complete 198 | 2014-09-23 15:09:58.852 199 | 2014-09-23 15:09:58.852 contrlr, Removing current message 200 | 2014-09-23 15:09:58.853 201 | 2014-09-23 15:09:58.853 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x06) - FUNC_ID_SERIAL_API_SET_TIMEOUTS: 0x01, 0x05, 0x00, 0x06, 0x64, 0x0f, 0x97 202 | 2014-09-23 15:09:58.855 contrlr, Received: 0x01, 0x05, 0x01, 0x06, 0x96, 0x0f, 0x64 203 | 2014-09-23 15:09:58.855 204 | 2014-09-23 15:09:58.855 contrlr, Received reply to FUNC_ID_SERIAL_API_SET_TIMEOUTS 205 | 2014-09-23 15:09:58.856 contrlr, Expected reply was received 206 | 2014-09-23 15:09:58.856 contrlr, Message transaction complete 207 | 2014-09-23 15:09:58.856 208 | 2014-09-23 15:09:58.856 contrlr, Removing current message 209 | 2014-09-23 15:09:58.856 210 | 2014-09-23 15:09:58.856 contrlr, Sending (Command) message (Callback ID=0x00, Expected Reply=0x00) - FUNC_ID_SERIAL_API_APPL_NODE_INFORMATION: 0x01, 0x07, 0x00, 0x03, 0x01, 0x02, 0x01, 0x00, 0xf9 211 | 2014-09-23 15:09:58.858 contrlr, Removing current message 212 | 2014-09-23 15:09:58.858 213 | 2014-09-23 15:09:58.858 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x41) - Get Node Protocol Info (Node=1): 0x01, 0x04, 0x00, 0x41, 0x01, 0xbb 214 | 2014-09-23 15:09:58.860 Node001, Received: 0x01, 0x09, 0x01, 0x41, 0x92, 0x16, 0x00, 0x02, 0x02, 0x00, 0x32 215 | 2014-09-23 15:09:58.860 216 | 2014-09-23 15:09:58.860 Node001, Received reply to FUNC_ID_ZW_GET_NODE_PROTOCOL_INFO 217 | 2014-09-23 15:09:58.861 Node001, Protocol Info for Node 1: 218 | 2014-09-23 15:09:58.861 Node001, Listening = true 219 | 2014-09-23 15:09:58.861 Node001, Beaming = true 220 | 2014-09-23 15:09:58.861 Node001, Routing = false 221 | 2014-09-23 15:09:58.861 Node001, Max Baud Rate = 40000 222 | 2014-09-23 15:09:58.861 Node001, Version = 3 223 | 2014-09-23 15:09:58.861 Node001, Security = false 224 | 2014-09-23 15:09:58.862 Node001, Basic device class (0x02) - Static Controller 225 | 2014-09-23 15:09:58.862 Node001, Generic device Class (0x02) - Static Controller 226 | 2014-09-23 15:09:58.862 Node001, No specific device class defined 227 | 2014-09-23 15:09:58.863 Node001, COMMAND_CLASS_BASIC is not mapped 228 | 2014-09-23 15:09:58.863 Node001, Mandatory Command Classes for Node 1: 229 | 2014-09-23 15:09:58.863 Node001, None 230 | 2014-09-23 15:09:58.863 Node001, Mandatory Command Classes controlled by Node 1: 231 | 2014-09-23 15:09:58.863 Node001, COMMAND_CLASS_BASIC 232 | 2014-09-23 15:09:58.863 Driver::ReadButtons - zwbutton.xml file not found. 233 | 2014-09-23 15:09:58.863 Node001, Expected reply was received 234 | 2014-09-23 15:09:58.863 Node001, Message transaction complete 235 | 2014-09-23 15:09:58.863 236 | 2014-09-23 15:09:58.863 Node001, Removing current message 237 | 2014-09-23 15:09:58.864 Node001, Query Stage Complete (ProtocolInfo) 238 | 2014-09-23 15:09:58.864 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Probe live=1 239 | 2014-09-23 15:09:58.864 Node001, QueryStage_Probe 240 | 2014-09-23 15:09:58.864 Node001, QueryStage_WakeUp 241 | 2014-09-23 15:09:58.864 Node001, QueryStage_ManufacturerSpecific1 242 | 2014-09-23 15:09:58.866 Node001, QueryStage_NodeInfo 243 | 2014-09-23 15:09:58.866 Node001, Queuing (Query) Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 244 | 2014-09-23 15:09:58.867 Node001, Queuing (Query) Query Stage Complete (NodeInfo) 245 | 2014-09-23 15:09:58.867 246 | 2014-09-23 15:09:58.867 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x49) - Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 247 | 2014-09-23 15:09:58.871 Node001, Received: 0x01, 0x04, 0x01, 0x60, 0x01, 0x9b 248 | 2014-09-23 15:09:58.871 249 | 2014-09-23 15:09:58.871 Node001, FUNC_ID_ZW_REQUEST_NODE_INFO Request successful. 250 | 2014-09-23 15:09:59.172 Node001, Received: 0x01, 0x06, 0x00, 0x49, 0x81, 0x00, 0x00, 0x31 251 | 2014-09-23 15:09:59.172 252 | 2014-09-23 15:09:59.173 WARNING: FUNC_ID_ZW_APPLICATION_UPDATE: UPDATE_STATE_NODE_INFO_REQ_FAILED received 253 | 2014-09-23 15:09:59.173 Node001, QueryStageRetry stage NodeInfo requested stage NodeInfo max 2 retries 0 pending 1 254 | 2014-09-23 15:09:59.173 Node001, Expected reply was received 255 | 2014-09-23 15:09:59.173 Node001, Message transaction complete 256 | 2014-09-23 15:09:59.173 257 | 2014-09-23 15:09:59.173 Node001, Removing current message 258 | 2014-09-23 15:09:59.174 Node001, Query Stage Complete (NodeInfo) 259 | 2014-09-23 15:09:59.174 Node001, AdvanceQueries queryPending=0 queryRetries=1 queryStage=NodeInfo live=1 260 | 2014-09-23 15:09:59.174 Node001, QueryStage_NodeInfo 261 | 2014-09-23 15:09:59.174 Node001, Queuing (Query) Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 262 | 2014-09-23 15:09:59.174 Node001, Queuing (Query) Query Stage Complete (NodeInfo) 263 | 2014-09-23 15:09:59.174 264 | 2014-09-23 15:09:59.174 Node001, Sending (Query) message (Callback ID=0x00, Expected Reply=0x49) - Request Node Info (Node=1): 0x01, 0x04, 0x00, 0x60, 0x01, 0x9a 265 | 2014-09-23 15:09:59.178 Node001, Received: 0x01, 0x04, 0x01, 0x60, 0x01, 0x9b 266 | 2014-09-23 15:09:59.179 267 | 2014-09-23 15:09:59.179 Node001, FUNC_ID_ZW_REQUEST_NODE_INFO Request successful. 268 | 2014-09-23 15:09:59.597 Node001, Received: 0x01, 0x06, 0x00, 0x49, 0x81, 0x00, 0x00, 0x31 269 | 2014-09-23 15:09:59.598 270 | 2014-09-23 15:09:59.598 WARNING: FUNC_ID_ZW_APPLICATION_UPDATE: UPDATE_STATE_NODE_INFO_REQ_FAILED received 271 | 2014-09-23 15:09:59.598 Node001, QueryStageRetry stage NodeInfo requested stage NodeInfo max 2 retries 1 pending 1 272 | 2014-09-23 15:09:59.599 Node001, Expected reply was received 273 | 2014-09-23 15:09:59.599 Node001, Message transaction complete 274 | 2014-09-23 15:09:59.599 275 | 2014-09-23 15:09:59.599 Node001, Removing current message 276 | 2014-09-23 15:09:59.599 Node001, Query Stage Complete (NodeInfo) 277 | 2014-09-23 15:09:59.599 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=ManufacturerSpecific2 live=1 278 | 2014-09-23 15:09:59.599 Node001, QueryStage_ManufacturerSpecific2 279 | 2014-09-23 15:09:59.599 Node001, QueryStage_Versions 280 | 2014-09-23 15:09:59.600 Node001, QueryStage_Instances 281 | 2014-09-23 15:09:59.600 Node001, Essential node queries are complete 282 | 2014-09-23 15:09:59.600 Node001, QueryStage_Static 283 | 2014-09-23 15:09:59.600 Node001, QueryStage_Associations 284 | 2014-09-23 15:09:59.600 Node001, QueryStage_Neighbors 285 | 2014-09-23 15:09:59.600 Requesting routing info (neighbor list) for Node 1 286 | 2014-09-23 15:09:59.600 Node001, Queuing (Command) Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 287 | 2014-09-23 15:09:59.600 Node001, Queuing (Query) Query Stage Complete (Neighbors) 288 | 2014-09-23 15:09:59.601 289 | 2014-09-23 15:09:59.601 Node001, Sending (Command) message (Callback ID=0x00, Expected Reply=0x80) - Get Routing Info (Node=1): 0x01, 0x07, 0x00, 0x80, 0x01, 0x00, 0x00, 0x03, 0x7a 290 | 2014-09-23 15:09:59.606 Node001, Received: 0x01, 0x20, 0x01, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e 291 | 2014-09-23 15:09:59.606 292 | 2014-09-23 15:09:59.606 Node001, Received reply to FUNC_ID_ZW_GET_ROUTING_INFO 293 | 2014-09-23 15:09:59.606 Node001, Neighbors of this node are: 294 | 2014-09-23 15:09:59.606 Node001, (none reported) 295 | 2014-09-23 15:09:59.607 Node001, Expected reply was received 296 | 2014-09-23 15:09:59.607 Node001, Message transaction complete 297 | 2014-09-23 15:09:59.607 298 | 2014-09-23 15:09:59.607 Node001, Removing current message 299 | 2014-09-23 15:09:59.607 Node001, Query Stage Complete (Neighbors) 300 | 2014-09-23 15:09:59.607 Node001, AdvanceQueries queryPending=0 queryRetries=0 queryStage=Session live=1 301 | 2014-09-23 15:09:59.607 Node001, QueryStage_Session 302 | 2014-09-23 15:09:59.607 Node001, QueryStage_Dynamic 303 | 2014-09-23 15:09:59.607 Node001, QueryStage_Configuration 304 | 2014-09-23 15:09:59.607 Node001, QueryStage_Complete 305 | 2014-09-23 15:09:59.608 CheckCompletedNodeQueries m_allNodesQueried=0 m_awakeNodesQueried=0 306 | 2014-09-23 15:09:59.608 CheckCompletedNodeQueries all=1, deadFound=0 sleepingOnly=1 307 | 2014-09-23 15:09:59.608 Node query processing complete. 308 | 2014-09-23 15:10:07.725 *************************************************************************** 309 | 2014-09-23 15:10:07.726 ********************* Cumulative Network Statistics ********************* 310 | 2014-09-23 15:10:07.726 *** General 311 | 2014-09-23 15:10:07.726 Driver run time: . . . 0 days, 0 hours, 0 minutes 312 | 2014-09-23 15:10:07.726 Frames processed: . . . . . . . . . . . . . . . . . . . . 14 313 | 2014-09-23 15:10:07.726 Total messages successfully received: . . . . . . . . . . 14 314 | 2014-09-23 15:10:07.726 Total Messages successfully sent: . . . . . . . . . . . . 13 315 | 2014-09-23 15:10:07.727 ACKs received from controller: . . . . . . . . . . . . . 13 316 | 2014-09-23 15:10:07.727 *** Errors 317 | 2014-09-23 15:10:07.727 Unsolicited messages received while waiting for ACK: . . 0 318 | 2014-09-23 15:10:07.727 Reads aborted due to timeouts: . . . . . . . . . . . . . 0 319 | 2014-09-23 15:10:07.727 Bad checksum errors: . . . . . . . . . . . . . . . . . . 0 320 | 2014-09-23 15:10:07.727 CANs received from controller: . . . . . . . . . . . . . 0 321 | 2014-09-23 15:10:07.727 NAKs received from controller: . . . . . . . . . . . . . 0 322 | 2014-09-23 15:10:07.727 Out of frame data flow errors: . . . . . . . . . . . . . 0 323 | 2014-09-23 15:10:07.727 Messages retransmitted: . . . . . . . . . . . . . . . . . 0 324 | 2014-09-23 15:10:07.727 Messages dropped and not delivered: . . . . . . . . . . . 0 325 | 2014-09-23 15:10:07.727 *************************************************************************** 326 | 2014-09-23 15:10:09.730 mgr, Driver for controller /dev/cu.SLAB_USBtoUART removed 327 | -------------------------------------------------------------------------------- /zwcli/scenarios/reset.controller.empty.network/output: -------------------------------------------------------------------------------- 1 | 2014/09/23 15:09:55 waiting until /dev/cu.SLAB_USBtoUART is available 2 | event loop starts 3 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x00000000, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 4 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 5 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 6 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 7 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 8 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='Unknown', productName='Unknown', location='Unknown', manufacturerId=Unknown, productType=Unknown, productId=Unknown], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 9 | 2014/09/23 15:09:58 Notification[notificationType=NT.DRIVER_READY/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 10 | 2014/09/23 15:09:58 Notification[notificationType=NT.NODE_NEW/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 11 | 2014/09/23 15:09:58 Notification[notificationType=NT.NODE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 12 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 13 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 14 | 2014/09/23 15:09:58 Notification[notificationType=NT.NODE_PROTOCOL_INFO/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 15 | 2014/09/23 15:09:58 Notification[notificationType=NT.VALUE_ADDED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='0', label='Basic', units='', help='', min=0 max=255 isSet=false]] 16 | 2014/09/23 15:09:58 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 17 | 2014/09/23 15:09:59 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 18 | 2014/09/23 15:09:59 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 19 | 2014/09/23 15:09:59 Notification[notificationType=NT.ESSENTIAL_NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 20 | 2014/09/23 15:09:59 Notification[notificationType=NT.NOTIFICATION/CODE.MSG_COMPLETE, node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 21 | 2014/09/23 15:09:59 Notification[notificationType=NT.NODE_QUERIES_COMPLETE/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=02, genericType=02, specificType=00, nodeType='Static Controller', manufacturerName='Aeon Labs', productName='Z-Stick S2', location='', manufacturerId=0086, productType=0002, productId=0001], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 22 | 2014/09/23 15:09:59 Notification[notificationType=NT.ALL_NODES_QUERIED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=255, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 23 | 2014/09/23 15:10:07 device /dev/cu.SLAB_USBtoUART removed 24 | 2014/09/23 15:10:09 Notification[notificationType=NT.VALUE_REMOVED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BYTE, commandClassId=CC.BASIC, instance=1, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 25 | 2014/09/23 15:10:09 Notification[notificationType=NT.NODE_REMOVED/UNKNOWN[-1], node=Node[homeId=0x0161d366, nodeId=001, basicType=00, genericType=00, specificType=00, nodeType='Unknown', manufacturerName='', productName='', location='', manufacturerId=, productType=, productId=], value=Value[type=VT.BOOL, commandClassId=CC.NO_OPERATION, instance=0, index=0, value='', label='', units='', help='', min=0 max=0 isSet=false]] 26 | 2014/09/23 15:10:09 event loop ends as the result of a quit signal 27 | 2014/09/23 15:10:09 waiting until /dev/cu.SLAB_USBtoUART is available 28 | -------------------------------------------------------------------------------- /zwcli/scenarios/wakeup.button.pressed.on.new.multisensor/output: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ninjasphere/go-openzwave/d72298eb5dd6283370ab8c288547049619c77b79/zwcli/scenarios/wakeup.button.pressed.on.new.multisensor/output -------------------------------------------------------------------------------- /zwcli/scripts/build.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -ex 3 | 4 | OWNER=ninjasphere 5 | BIN_NAME=zwcli 6 | PROJECT_NAME=zwcli 7 | 8 | 9 | # Get the parent directory of where this script is. 10 | SOURCE="${BASH_SOURCE[0]}" 11 | while [ -h "$SOURCE" ] ; do SOURCE="$(readlink "$SOURCE")"; done 12 | DIR="$( cd -P "$( dirname "$SOURCE" )/.." && pwd )" 13 | 14 | GIT_COMMIT="$(git rev-parse HEAD)" 15 | GIT_DIRTY="$(test -n "`git status --porcelain`" && echo "+CHANGES" || true)" 16 | VERSION="$(grep "const Version " version.go | sed -E 's/.*"(.+)"$/\1/' )" 17 | 18 | # remove working build 19 | # rm -rf .gopath 20 | if [ ! -d ".gopath" ]; then 21 | mkdir -p .gopath/src/github.com/${OWNER} 22 | ln -sf ../../../.. .gopath/src/github.com/${OWNER}/${PROJECT_NAME} 23 | fi 24 | 25 | export GOPATH="$(pwd)/.gopath" 26 | 27 | if [ ! -d $GOPATH/src/github.com/ninjasphere/go-ninja ]; then 28 | # Clone our internal commons package 29 | git clone git@github.com:ninjasphere/go-ninja.git $GOPATH/src/github.com/ninjasphere/go-ninja 30 | fi 31 | 32 | if [ ! -d $GOPATH/src/github.com/ninjasphere/go-openzwave ]; then 33 | git clone git@github.com:ninjasphere/go-openzwave.git $GOPATH/src/github.com/ninjasphere/go-openzwave 34 | fi 35 | 36 | # move the working path and build 37 | cd .gopath/src/github.com/${OWNER}/${PROJECT_NAME} && 38 | make deps && 39 | go get -d -v ./... && 40 | go build -ldflags "-X main.GitCommit ${GIT_COMMIT}${GIT_DIRTY} -extldflags -L${GOPATH}/src/github.com/${OWNER}/go-openzwave/openzwave" -o ${BIN_NAME} && 41 | mv ${BIN_NAME} ./bin 42 | -------------------------------------------------------------------------------- /zwcli/scripts/scenario.sh: -------------------------------------------------------------------------------- 1 | die() 2 | { 3 | echo "$*" 1>&2 4 | exit 1 5 | } 6 | 7 | scenario() 8 | { 9 | record() 10 | { 11 | local name="$1" 12 | local dir="scenarios/$name" 13 | test -d "$dir" || mkdir -p "$dir" 14 | 15 | ( 16 | cd $dir && 17 | ../../go/bin/zwcli -configDir ../../../go-openzwave/openzwave/config -save -monitor -debug -logFileName=log 2>&1 | tee output 18 | ) || exit $? 19 | } 20 | 21 | "$@" 22 | } 23 | 24 | scenario "$@" -------------------------------------------------------------------------------- /zwcli/version.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | const Version = "0.1.0" 4 | -------------------------------------------------------------------------------- /zwcli/zwcli.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import ( 4 | "flag" 5 | "os" 6 | 7 | openzwave "github.com/ninjasphere/go-openzwave" 8 | "github.com/ninjasphere/go-openzwave/LOG_LEVEL" 9 | ) 10 | 11 | func main() { 12 | var ( 13 | configDir string 14 | logFileName string 15 | save bool 16 | debug bool 17 | console bool 18 | help bool 19 | monitor bool 20 | logLevel int 21 | pollInterval int 22 | device string 23 | logging bool = false 24 | ) 25 | 26 | flag.BoolVar(&monitor, "monitor", false, "Run the monitor") 27 | flag.StringVar(&configDir, "configDir", "../go-openzwave/openzwave/config", "Location of openzwave configuration directory") 28 | flag.BoolVar(&save, "save", false, "Save the configuration") 29 | flag.BoolVar(&debug, "debug", false, "Enable debugging") 30 | flag.BoolVar(&console, "console", false, "Enable console output") 31 | flag.IntVar(&pollInterval, "pollInterval", 10, "The polling interval") 32 | flag.StringVar(&logFileName, "logFileName", "zwcli.log", "Log file name") 33 | flag.BoolVar(&help, "help", false, "Print this help") 34 | flag.StringVar(&device, "device", "", "Device name /dev/ttyUSB0 on Linux, /dev/cu.SLAB_USBtoUART on OSX") 35 | flag.Parse() 36 | 37 | if help || !monitor { 38 | flag.PrintDefaults() 39 | os.Exit(1) 40 | } 41 | 42 | if debug { 43 | logLevel = LOG_LEVEL.DEBUG 44 | logging = true 45 | } else { 46 | logLevel = LOG_LEVEL.NONE 47 | logFileName = "/dev/null" 48 | } 49 | 50 | callback := func(api openzwave.API, notification openzwave.Notification) { 51 | api.Logger().Infof("%v\n", notification) 52 | } 53 | 54 | os.Exit(openzwave. 55 | BuildAPI(configDir, "", ""). 56 | AddBoolOption("SaveConfiguration", save). 57 | AddBoolOption("logging", logging). 58 | AddStringOption("LogFileName", logFileName, false). 59 | AddBoolOption("ConsoleOutput", console). 60 | AddBoolOption("NotifyTransactions", true). 61 | AddIntOption("SaveLogLevel", logLevel). 62 | AddIntOption("QueueLogLevel", logLevel). 63 | AddIntOption("DumpTrigger", logLevel). 64 | AddIntOption("PollInterval", pollInterval). 65 | AddBoolOption("IntervalBetweenPolls", true). 66 | AddBoolOption("ValidateValueChanges", true). 67 | SetDeviceName(device). 68 | SetNotificationCallback(callback). 69 | Run()) 70 | } 71 | --------------------------------------------------------------------------------