Integrating devices via API

Hi there,

Me = Newbie. I have been in IT for 20 years, largely as a network/security and Infrastructure engineer. I am in no way a coder. Knowing my limitations, and wanting to use/learn i added a VAM to my Vista 20p security panel to leverage the API for automation. below is the API, but I don't know how to use it in Hubitat. I tried making a rule to get the alarm status - it works fine, but what to do with it? I would like to start simple by just displaying alarm status, then maybe some rules to turn all the house lights in if there is an alarm. All help appreciated, but examples would be great!!

/ system_http_api / API_REV01
Contents:

Registration
-- Register/Unregister your system and applications with Tuxedo. Setup options for Associate/disassociate your system, add/remove your device MACID to tuxedo, view the enrolled device MACID, login setup, authentication setup, association setup, network setup and filter setup.
AdvancedSecurity
-- Security Related Commands.
AdvancedAutomation
-- Automation Related Commands.
AdvancedMultimedia
-- Multimedia Related Commands.
System
-- System Related Commands.
GetDeviceList
-- Get the latest device list with all or some of devices enrolled to Tuxedo. Default gets all the devices in all categories, or pass a category parameter to get only a specific category of device list.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetDeviceList?category=[category:optional]&operation=set
Catergories
All(default)
AllZwaveDevices
Cameras
Lights
Thermostats
Locks
Shades
OneTouchScene/AllScenes
Sensors (future)
Appliances (future)
EMON Electric meter (future).
GetSecurityStatus
-- Get the default home partition status, Partition ID is optional.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetSecurityStatus?partition=part_ID[part_ID:optional]
SetSecurityArm
-- Use this service to change the partition status.Default is AWAY and partition 1.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetSecurityArm?arming=[arming=AWAY,STAY,NIGHT]&pID=[part_ID:optional]&operation=set
GetOccupancyMode
-- Get the occupancy status from automation mode.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetOccupancyMode
SetOccupancyMode
-- This Service is used to set the occupancy status for automation mode
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetOccupancyMode?omode=[occupancy=AWAY/CLOSE,NIGHT]&operation=set
GetLightStatus
-- This Service will get the status off a particular binary light (Nodeid,Device Name,Device Type and Status [Binary Switch 0-OFF,255-ON][Multilevel Switch 0-OFF, 1 to 99-ON)
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetLightStatus?nodeID=[node_ID=dev_id]&operation=set
SetLight
-- This Service will set the status off a particular binary or dimmer light
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetLight?nodeID=[node_ID=dev_id]&percent=[percent=ON, OFF, DIM1,…DIM10]&operation=set
Where DIM1-DIM10 equal to 10 to 99.
GetThermostatMode
-- This service will return the mode of particular thermostat(Nodeid,Device Name,Device Type and Mode [OFF,HEAT,COOL,AUTO,SAVECOOL,SAVEHEAT])
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetThermostatMode?nodeID=[node_ID=dev_id]&operation=set
GetThermostatSetPoint
-- This service will give Heat and Cool Setpoint of particular thermostat(Nodeid,Device Name,Device Type,Heat Setpoint,Cool Setpoint,Save Heat,Save Cool)
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetThermostatSetPoint?nodeID=[node_ID=dev_id]&operation=set
GetThermostatEnergyMode
-- This service will give the thermostat mode,Energy Save or Normal
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetThermostatEnergyMode?nodeID=[node_ID=dev_id]&operation=set
GetThermostatSchedule
-- This service will give the thermostat Schedule details
GetThermostatClock
-- This service will give the thermostat time details
SetThermostatMode
-- Use this service to change the thermostat mode [mode=OFF,HEAT,COOL,AUTO].Modes 0-OFF,1-HEAT,2-COOL,3-AUTO,11-SAVEHEAT,12-SAVECOOL.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetThermostatMode?nodeID=[node_ID=dev_id]&mode=[mode=OFF,HEAT,COOL,AUTO]&operation=set.
SetThermostatSetPoint
-- Use this service to change the Heat and Cool Setpoint of particular thermostat [mode=HEAT,COOL,SAVEHEAT,SAVECOOL].Modes 1-HEAT,2-COOL,11-SAVEHEAT,12-SAVECOOL.
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetThermostatSetPoint?nodeID=[node_ID=dev_id]&mode=[mode=HEAT,COOL,SAVEHEAT,SAVECOOL]&setPoint=[setpoint=temp_value]&operation=set.
SetThermostatEnergyMode
-- Use this service to change the thermostat mode to Energy Save or Normal[dev_id=node_ID], [energy_mode=NORMAL,ECO].
SetThermostatSchedule
-- Use this service to set the thermostat Schedule details. [dev_id=node_ID], [day_slot=MON_S1], [time=hhmm, cooltemp=cooltemp_val, heattemp=heattemp_value].
SetThermostatSetClock
-- Use this service to set the thermostat time details
GetDoorLockStatus
-- Use this service to get the status of a particular doorlock
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetDoorLockStatus?nodeID=[node_ID=dev_id]&operation=set
SetDoorLock
-- Use this service to set the status of a particular doorlock[LOCK or 1]
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/SetDoorLock?nodeID=[node_ID=dev_id]&cntrl=[cotnrol=LOCK or 1]&operation=set
GetShadeStatus
-- Use this Service to get the status of a particular Shade[dev_id=node_ID].
SetShade
-- Use this service to set the status of a particular Shade[dev_id=node_ID], [control=OPEN, CLOSE, LEV1,…LEV10]. Default is first shade on the list and OPEN.
OneTouchSceneRun
-- Use this service to execute specific purpose scenes. [onetouch_scene = onetouch_ID].
SetGarrage
-- Use this command to set the garrage door status [garrage_door_id=(0,1,2)].[Mode OPEN=1, CLOSE=0]
GetSceneList
-- Use this command to retrieve all the Scenes
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/GetSceneList
ExecuteScene
-- Use this command to execute the scene
Example : http://<Tuxedo IP>:<port>/system_http_api/API_REV01/ExecuteScene?sceneID=[SceneID=1]&operation=set

I don’t believe there’s a HE driver out there for VAM and developing a driver yourself may be a painful path. Sorry to say you should have probably done some research. The go-to automation solutions for Vista 20p are the Envisalink, and AlarmDecoder, both of which have fully developed drivers for ST and Hubitat. I myself use the AD2PI module (because it’s 100% local) and it works flawlessly. I can control all aspects of the Vista 20p, get notifications for all my wired sensors, can create automations based on various events, etc. If I was was in this situation, I would just switch to AD or EVL instead of writing a new driver for VAM (and I am developer by trade).

P.S. Setting up AD2PI and all of the integrations was pretty simple - mostly it involves installing the service on the Raspberry pi, then configuring it via a web UI, and then installing the HE driver. I don’t remember writing any code. So this process should also be much more in line with your skill set.

My biggest disappointments with my Konnected Interface and my Vista panel is that I lose Zone 1 and that, in order to be able to arm/disarm with HE, I would have to buy an additional board PLUS a more advanced Honeywell Control Panel because the simplistic ones that I have are dangerous to start programming if you are a novice.

Is this all I the hardware I would have to buy to use the Alarm Decoder Option? AD2USB, The AlarmDecoder Store

From what I can tell, I should have just started with the Alarm Decoder.

I think the usb might work too, but I would get the AD2pHAT module instead just to be safe. I believe they discontinued the original AD2PI standalone modules (I have the old version) and replaced it with AD2pHAT. And of course, you’ll need the RPi itself. The hardest part for me was actually figuring out how to get power to the RPi. I ended up tapping into the battery contacts and running them through a step-down converter to convert 12v->5v DC.

Awesome, thank you. Could a Pi Zero handle this? Fortunately, for me, my alarm panel is mere feet from my router.

According to their own documentation, it will work with Pi Zero (and actually specifically designed for it). :slight_smile:

Shame on me for not reading on their website and being lazy! I apologize :frowning_face:

I just got another Zero today for a 2nd pi hole DNS server so I bet it could do double duty. Make sure you get a commission from them on my purchase.

1 Like

I appreciate your input, but I am really interested in knowing if others have integrated devices via API and how they did it.

my apologies for sending your thread off track.

Thanks Stephen, but no apology needed. If it helped you out, then great.

The answer here may be Alarm Decoder, but I have some other devices with open APIs as well. I was hoping to find some examples and learn my way to bending them to meet my needs.

I know this is an old thread but I'm interested in the API for the VAM.
Do you have a copy of it?
Thanks.
Glenn...

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.

Download the Hubitat app