Home AMX User Forum AMX General Discussion

Zwave integration

Is Zwave and amx can be integrated .. Is there a module or sample strings of command available.. If that is possible would anyone want to share .. Thanks

Comments

  • ericmedleyericmedley Posts: 4,177
    I believe the ZWave system utilizes a cloud based control method in which the devices connect to the servers at ZWave and are then matched with the client UI on their phones/tablets/computers/etc... There is no 'published' way to speak to the controlling devices directly. Also, there is no published method of mimicing the app since it requires a secure connection.

    This is one of those things I've longed for for quite a long time. there are very few wireless lighting control systems that dont' want you to use their control base (cloud or in-home controller) I wish someone would create a simple stand-alone device with an API. I've ran into a few one-off type things but nothing from any of the major manufacturers.
  • CedricCedric Posts: 32
    Hi,

    I made some research for AMX + Zwave, was going to use :
    http://getvera.com/controllers/veralite/

    And then you need to use http command or you can use :
    http://dmlogic.com/blog/developing-z-wave-plugins-for-vera-with-lua-and-luup

    I just stoped at this part

    If you start testing it, just let us know.
    Thanks
  • DHawthorneDHawthorne Posts: 4,584
    I just did one with another controller system <cough>, and I wish I never got involved. It's kludgy, slow, and not completely reliable ... and that was on the Vera Z-Wave end, not the controller itself. They use a cloud-based account system, but that only connects you to the controler via the cloud, if you do it locally, it redirects you to the local IP. At that point you can connect directly to its local IP. But I have to say, it's one of the most miserable devices I have ever had to deal with. I'm doing door locks, and it's been hell pairing them to the Z-Wave bridge, and I have had to throw in three additional dimmer modules just to act as repeaters. You click a device to turn it on or off, or to lock and unlock, and maybe 5-10 seconds later, something *might* happen. Meanwhile, it may or may not show an updated status. This is with a browser directly connected to the bridge. Via the controller, of course you see all the same delays. But to me the worst thing is the spotty and unreliable feedback. The door locks I'm using only have a toggle command, so if you don't see it go to "locked," you may want to hit it again ... at which point you are unlocking it, not locking it. I warned my client, and at least one of the doors I set it to auto-lock so we know at least that one will lock by itself. The other just can't be relied on completely, and I am not at all comfortable with the situation. At least they are well in the habit of manually checking when they go out the door, and are in a low-crime area. I would recommend that if you have *any* other choice, go with that instead of these things. Maybe other manufacturers than Vera are better, that I couldn't say.
  • truetrue Posts: 307
    DHawthorne, Z-Wave is finicky. Your issues don't seem to be Vera-related. I've had similar issues with Z-Wave. Tough to work around sometimes.

    I used the VeraEdge yesterday to control a lock, replacing a Leviton VRC0Pv3 (a serial controlled Z-Wave interface) that stopped working with this lock and that I could not get support for.

    We had an issue setting up the account as we did not receive any emails. We also used the "password forgotten" mechanism since we weren't sure what password we typed minutes prior :) and works similar to other Chinese services: rather than sending a link, they reset the passowrd and send a new password. This effectively is a lock-out of the account until the email is received. sbcglobal.net is blocking vera or vera is blocking sbcglobal.net and we never received emails. Had to call support to get this rectified.

    I do not know if the unit will work without an account. We didn't try, as the customer was intending on using the free Vera app anyway on more devices like his phone where he doesn't have TPC. For customers without privacy concerns or with little care this may work OK but I will investigate later on what it may take to neuter this device and decouple it from online services. Everything worked without an internet connection so I do not believe it requires one for normal functionality.

    If you know the local IP you do not need to use any online service to connect to the device.

    There is no local protection for the device. Anyone on the network can mess around with it. If security is a concern, place it on a different network (VLAN and route to it for example).

    You can set a static IP on the VeraEdge only if using the LAN port. If using WiFi, it must be DHCP. It doesn't seem to support DHCP Option 12 so one must set a static DHCP reservation on a router if using WiFi connectivity. In our case we did just this as the Z-Wave connection would not work from the wired equipment location but we have great WiFi distribution throughout the house.

    One-way control is effortless. There are two documents you will need, the requests and the UPnP variable list.

    http://wiki.micasaverde.com/index.php/Luup_Requests#actions
    http://wiki.micasaverde.com/index.php/Luup_UPnP_Variables_and_Actions

    Here's some quick hacky code to operate a door lock.
    /* constants */
    define_constant
    VERA_IP         = '192.168.1.101'     // in my case this is DHCP reservation with WiFi VeraEdge
    VERA_PORT       = 3480
    
    VERA_LOCK_ID    = 3             // showed ID2 on the VeraEdge? but 3 is the one that works?
    
    VERA_LOCK_S1    = 'GET /data_request?id=action&output_format=json&DeviceNum='
    VERA_LOCK_S2    = '&serviceId=urn:micasaverde-com:serviceId:DoorLock1&action=SetTarget&newTargetValue='
    
    
    /* devices */
    define_device
    vera_ipdev  = 0:5:0
    vera_tp01   = 10001:1:0
    
    
    /* variables */
    define_variable
    volatile integer vera_arg[2]
    
    
    /* events */
    define_event
    button_event[vera_tp01, 0] {
        push: {
            switch (button.input.channel) {
                case 1: vera_lock_door(LIT_VERA_LOCK_ID, 1)     // lock
                case 2: vera_lock_door(LIT_VERA_LOCK_ID, 0)     // unlock
            }
        }
    }
    
    data_event[vera_ipdev] {
        online: {
            send_string data.device, VERA_LOCK_S1
            send_string data.device, itoa(vera_arg[1])
            send_string data.device, VERA_LOCK_S2
            send_string data.device, itoa(vera_arg[2])
            send_string data.device, "' HTTP/1.1', $0d, $0a,
                'Host: ', VERA_IP, ':', itoa(VERA_PORT), $0d, $0a, $0d, $0a, $0d, $0a"
    
            ip_client_close(data.device.port)
        }
    
        offline: {}
        onerror: {}
    }
    
    
    /* functions */
    define_function vera_lock_door(integer door, integer state)
    {
        vera_arg[1] = door
        vera_arg[2] = state
        ip_client_open(vera_ipdev.port, VERA_IP, VERA_PORT, IP_TCP)
    }
    

    I might finally get to writing a very basic JSON element parser and writing a module for this with feedback for AMX and Cres since we're seeing (and sometimes using) more and more Z-Wave connected devices.
Sign In or Register to comment.