Raspberry PI Z-Wave board Python Interface Provides a quick and easy interface into the ZWAY Automation API
This was orignally written for Python 2.7
But there now is a Python 3 version.
Due to the way Python 2 and Python 3 work, there are 2 different libraries, but the calls and functionally remains the same.
from zWaveApi3 import *
oZWave = zWaveApi3('username', 'password', 'zwaveurl')
oZDevices = oZWave.getDevices()
from zWaveApi import *
oZWave = zWaveApi('username', 'password', 'zwaveurl')
oZDevices = oZWave.getDevices()
-
json
-
Python 3
- http.client
- urllib.parse
-
Python 2:
- urllib2
- urllib
- httplib
Returns a list of zWave Devices as a JSON array
Sends a Command to a zWave Device
deviceid - The unique zWave device ID
newcommand - The Require command for the device This depends on the device type, see below
- switchMultilevel : on / off / min / max / exact?level=40 / increase / decrease / update
- switchBinary : on / off / update
- toggleButton : on
Returns either 1 or 0 dependant on command being accepted