HowTo

How do I set up the DscServer?

  1. Pick an android device to be your DscServer. Assign this android device a fixed IP address on your router. Remember this device must remain powered on and connected to your network and envisalink card. If you run the server on a non-android system (like a PC, MAC, RaspberryPi, etc) setup instructions are here: DscServer (Java). Return and continue with the client setup (the final step) when complete.

  2. To run the DscServer on an android system add the a DscServer widget to your home screen. For most android versions long press on your home screen and select "widgets", scroll to find the DscServer app widget list, then select the DscServer widget from the list.

    1. Select the DscServer widget and drag/drop it to your home screen.

    2. Touch the DscServer widget to open the "Clients" page. Select menu>settings.

    3. Set the IP of your envisalink card (no http://) as the address (such as 192.168.0.100, where the 0.100 part differs).

    4. The password that you use on the card's web page (default is “user” unless you’ve changed it at that same web page above, and the TPI only supports 6 characters for the password).

    5. Verify you can see your Envisalink's web page.

    6. Verify your envisalink connection with menu>Envisalink>DscTest

    7. When you exit from the settings page, you should see the DscServer widget LED turn green after a minute or so. If not, touch the widget to check the error message. Your home screen should look something like this: DscServer Widgets.

  3. For android the android device must be configured to remain active.

    1. Activate "always on while charging" in android settings "Developer Options".

    2. If "Developer Options" is not available, go to "settings>About>Software Information>Build Number" (sometimes it's under "more"). Tap "Build Number" seven times to enable it.

    3. Check your advanced wifi settings to confirm wifi will not be turned off to save power.

    4. If you have a task killer on your device add the DscServer to the list of exceptions. Check settings / device maintenance / battery manager, settings / app manager ./ special access / Optimize battery use. Confirm the app is set to unmonitored for battery savings.

  4. For the android DscServer, touch the DscServer widget to open the Clients page, then menu>settings>Server Settings:

    1. "Unsecured (Port 4025)" should be checked (don't forward this port through your firewall!)

    2. Go your home page with the "back" button, and verify the DscServer LED shows green for the connection.

  5. Google Drive logging is only supported on Android.

    1. Touch the DscServer widget to open the client manager

    2. Touch "Preferences"

    3. Touch "Google Drive Logging"

    4. Enable drive logging (box should be checked)

    5. Enter any name for your DSC panel location

    6. Touch "Connect To Drive"

    7. Select a google account and accept any necessary permissions

  6. Setting up the client (for either the DscServer for java or DscServer on android): Open the DscKeypad app (note, use the DscKeypad that comes with the DscServer, not the free standalone version) and under menu>Envisalink (the settings icon in the menu, long press on it to see the name) change the DscServer Address to point the the phone/tablet used in step 3 (you can find the tablet’s IP address in its wireless settings). Use the same username and password as for the envisalink card. The Secured DscServer should be UNCHECKED. Touch "back", and the DscKeypad should now connect to the DscServer as if it were an envisalink card.

  7. Note that this connection is to the UNSECURED port of the DscServer - only use this port inside your firewall/network. See the FAQ below for connecting securely using encryption.

What's the easiest way to get remote access?

Google Drive connections are the easiest to configure.

    1. Enable Google Drive Logging in the step above.

    2. Open the DscClient app

    3. Choose "Add Drive Server" from the menu to add a connection

    4. Select any server name and client name.

    5. Enter the same Location Name you used to configure the DscServer Drive logging

    6. Select "register" and pick either the same Google account you used with the DscServer, or a google account with which you've shared the Drive Location Name (file). Note sharing is preferred, this allows you to remove access later if you lose your phone.

    7. Accept any requested permissions.

    8. See also: Web (Google Drive) Access

How do I see my DscServer log using a web browser?

See: Web (Google Drive) Access

How do I see and control my DSC system status using a web browser?

See: Web (Google Drive) Access

How do I check the envisalink's network settings?

    1. Using a web browser, connect to the envisalink's web page. You'll find it by setting the URL for the browser to http://envisalink, or http://192.168.xxx.yyy, where xxx.yyy you determined from the steps below.

    2. Log in using the envisalink's TPI user and password (the default is user/user).

    3. Click on the "network" link at the top right.

    4. Under network parameters, verify the IP address is set as expected, including the "static" settings. It should of course already be bound or you would not be able to connect.

    5. Under "Envisalink TPI Status" you can see whether the device is already connected to a client, if so, the address of that client. If the address is not what you expect, you stop the other device and reboot the envisalink (click on that link below the TPI section).

    6. If the device shows "OFFLINE" and you still cannot connect, reboot the Envisalink using the link below the TPI section.

    7. If you still cannot connect to the device, check your network. A firewall or other application may be blocking port 4025 that is needed to reach the TPI.

How do I verify I have the correct address for my Envisalink card? How do I change that address? How do I change the default password?

    1. Use a web browser to open http://192.168.0.100 (substituting the IP address you determined above). If you get no response, try to the original address the card used, or recycle power on the card.

    2. Go to the "network" page. Assign an static IP (here or in your router/switch), and a new user password. Use the reboot button on that page if you've change the card IP address, or if it shows that the TPI status shows it's online.

    3. Your card should now be accessible from the DscKeypad at that same IP address.

How do I connect a DscKeypad to the DscServer with encryption so that I can connect securely?

    1. If you're using the DscServer for java, skip this step.

      • To run the DscServer on an android system open the DscServer configuration by touching the DscServer widget. Use menu>Settings to get to the DscServer configuration page.

        • "Secure Service Port" - pick a free port, the default 4026 is a good choice. Do not use 4025.

        • "Client Registration" should be checked to allow registration, you can lock this back down later if you wish.

    2. Open the DscKeypad app on the android tablet/phone from which you wish to connect securely to the DscServer. If you haven't already, follow step 4 above to configure the DscKeypad to this DscServer.

    3. In the DscKeypad app, open menu>Envisalink>DscServer Setup

      • select "Secured DscServer" so the box is checked

      • set the "DscServer Port" to the same port you used above (default is 4026)

      • Change the "Client Id" to something you can remember (optional)

      • Touch the "Client" option to register this client with the DscServer.

    4. A window should open on the DscServer allowing you to accept (or reject) this new DscKeypad client. The DscServer and DscKeypad will synchronize encryption keys using the ClientId from the DscKeypad above (you can change the ClientId by re-registering).

    5. Close the DscServer window and return to the DscKeypad app. When you exit the menus it should connect to the DscServer immediately

    6. Unsurprisingly, menu>Envisalink>DscServer Setup "Verify Registration" will test that the client has been properly registered.

    7. Optionally, use the DscServer configuration to close the unsecured port and/or limit further registration attempts by other clients.

    8. Touch the DscServer widget to view the client in the DscServer's client list. If you lose your client phone you can remove access in the DscServer clients menu.

How do I setup the DscServer, DscKeypad, and my router for remote access?

    1. Setup the client and server with encryption by following the above instructions. Verify everything is working as expected within your network.

    2. Port Forward the DscServer's IP and secured port (4026) to the internet using your router's configuration pages.

    3. Find your router's external IP address from it's status page.

    4. In the DscKeypad under menu>Envisalink>Device Address, change from the DscServer's internal address to your external IP address. If it works it should also work outside of your network, though you can test it through the phone's data connection by disabling the phone's wifi.

    5. Return to the DscKeypad main screen, it should connect successfully.

    6. Unless your ISP has committed that your external IP address will never change you will need a DDNS service. Find one you trust (some routers are sold with a free DDNS service) and configure your router to use it.

    7. Configure the DscKeypad as above using your router's DDNS name.

What ports does the DscServer use?

    • Port 4025 is the unsecured port for accepting incoming connections. This is the same port as is used by the Envisalink card, and cannot be changed. The DscServer can accept any number of connections on this port (unlike the Envisalink card, which can only accept one).

    • Port 4026 is the secure port (this is configurable in the DscServer settings, and you must change each DscKeypad that connects securely to match). This is the port that you would forward through your router to the Android device running the server. DscKeypad clients need to be configured to use the correctly forwarded port (esp if you change the external port in your router settings).

    • Note that if you use the DscServer you don't need to fuss with SSH bridging at all.

How do I customize my zone and partition names?

What do I do if I have more than 8 zones or more than one partition?

    • Set the zone and partition names in the DscServer. They will be used by default in each of your DscKeypad clients that connect. To set zones, touch the DscServer widget. Then menu>Settings>System Settings, and "Zone Names". Zones are comma separated, where blank means use the default name.

    • Open the DscKeypad app, use menu>System, touch "Zone Names". Set the number of zones you wish to display by entering commas - use one less comma than you have zones. E.g. for 8 zones, enter ",,,,,,," (without the quotes). The zone names will come from the server. If you enter “,,,*,” the keypad will show zones 1,2,3, skip zone 4 and show zone 5.

    • The partition names work the same way as the zone names.

What events does the DscServer detect and allow actions?

    • all Events from the Envisalink

      • all alarms and trouble events

      • alarm system state changes

      • arm/disarm and key opening

      • individual zone open/restore

    • invalid message or error messages from Envisalink

    • configurable zone open/restore events

    • Envisalink connect or disconnect events

    • Midnight status check-in

    • Phone/tablet power loss or power reconnected

    • Wifi connection lost or established

What actions can the DscServer take when an event occurs?

use "&zone;" and "&partition;" substitutions to customize the action when needed (and appropriate for the event)

    • Send an email reporting the event

    • Send an SMS reporting the event (activated phones only). Use MppSMSer to allow the DscServer to send SMS messages.

    • Log event to logcat

    • Send an android BroadcastIntent to other android apps (any string content), e.g. automation apps like Automagic or Tasker, or other android services.

      • New for 2.1.4: BroadcastIntent will have extras when applicable:

      • String "EVENT", the DSC event name (e.g. ZoneOpen, ZoneClosed, PartitionArmed)

      • int "PARTITION", the DSC partition of the event

      • int "ZONE", the DSC zone of the event

    • GET/PUT/POST to any url (w/ url parameters & basic authentication)

      • to web cameras, wifi devices like thermostats, light switches

      • Change CT-30 thermostat (must be using my CT-30 server app)

    • Turn a Belkin Wemo switch on or off

    • send event detected over UDP

    • send event detected over SMS

    • send event detected over email

    • turn a device on WemoServer off or on

    • trigger an "OnEvent" rule on the WemoServer

How do I setup the server to send me emails when something happens?

For an email account gmail is the easiest. Contact your provider for your SMTP settings for other email system types.

For Gmail:

Source Account eMail: yourId@gmail.com

Email Server Name: smtp.gmail.com

Email Authentication: required (checked)

Email User: yourId@gmail.com

Email Password: your email password

Email Server Port: 25

Email Server SocketFactor port: 465

You will need to enable gmail to allow less secure apps. A better choice for automation is to use AutomationManager (see below).

How do I configure my router to use the DscServer for remote access?

    • The router must be configured to port-forward the DscServer secure port to the tablet/phone running the DscServer.

    • Port forwarding usually requires that you assign the DscServer device a static IP address

    • You need to know your router's external IP address from the internet.

    • Often your external IP is statically assigned by your service provider and never changes.

    • If not, you need to use a Dynamic Domain Name Server (Dynamic DNS or DDNS). Often your router manufacturer will provide this service for free with your router, check the advanced settings.

How do I integrate the DscKeypad or DscServer with Tasker or Automagic? Does this work remotely?

For a direct command on the DscServer system make sure the DscServer widget is on the device and the server is running. Then you can send an intent with the action:

mpp.android.server.DscService.SendCommand

and the string extra:

command={your DSC command string, no checksum}

e.g.: command="0301"

For Tasker use

command:(String)0301

For Automagic in EXTRAS use

putString("command","0301");

This would away arm partition 1 (see the envisalink TPI manual)

Automation integration is also provided through DscCommand. When using the DscCommand app make a note of the DscCommand ID that you wish to automate. You must place the widget for the DscCommand you're using on the server or a client home screen (depending on where you're using it). Triggering commands remotely will not always work if the connection to the envisalink or between the client and server is interrupted.

From the client system send the intent:

mpp.dsc.DscCommand.Trigger

with the int extra:

command_id={the DscCommand Id you noted earlier}

For tasker use

command_id:4

(or whatever command id is assigned)

For Automagic

putInt("command_id",4);

What options do I have for sending alerts to my phone?

How do I send alerts to my phone?

Email (see above, data connection required)

IFTTT - use the "Maker" channel, send an HTTP post to IFTTT. Your phone can be configured to show the alert or it can be handled by Automagic, Tasker, etc. Data connection required.

SMS (if the DscServer is running on an activated phone)

I want to use NFC!

    1. Create a DscCommand with the command you want to execute against the DscClient you want to use.

    2. Get the NFC ReTag app from google play. Follow the instructions to capture your tag ID.

    3. Use the "ReTag Broadcast" action and set the "Your variable" to the command id of the command (see "Integration with Automagic or Tasker" on this page). Leave the default intent action name as is.

    4. Set the action to "mpp.dsc.DscCommand.Trigger".

    5. Close the app, and touch your phone to your NFC tag. Enjoy!

How do I use the WeMo On/Off Actions to control my WeMo switches?

    1. You need my AutomationManager (from Google Play) installed on the same device as the DscServer, and the WeMoManager widget added to your home page.

    2. Touch the AutomationManager widget. If your device is not shown, use Find or Refresh to find your device.

    3. Touch "Intents" on the switch you wish to turn off or on.

    4. Touch the button under "UDN" to copy your switch's identifier to the clipboard.

    5. Close the AutomationManager.

    6. Touch the DscServer widget to open it, and "Edit" to edit the preferences.

    7. Touch "Actions".

    8. Touch "New".

    9. Under "Do", select "WemoSwitchOn" or "WemoSwitchOff".

    10. Pick an appropriate event under "When" (e.g. ZoneClosed)

    11. Touch the UDN field, and paste the WemoSwitch UDN into that field.

    12. Use "Test" to verify you can control the switch.

    13. Touch "Save".

    14. Back out to the home screen. The DscServer event will now control the WeMo switch.

How do I use the DscServer with AutomationManager for IoT?

When you start the DscServer and AM Server on the same android device, DSC status will be shown as sensor devices in AM Server/ AM Manager and can be used in the rules engine.

Use the event action "WemoEvent" to send local events to the WemoServer event triggers. For example, AlarmEvent can send dscAlarm, AlarmRestoreEvent can send dscRestore to triggers (dscAlarm, dscRestore) on the WemoServer to (for example) flash the outside lights. ArmStay and ArmAway events can take the appropriate action for lighting or thermostat control, etc.

To send commands from AutomationManager to the DSC server send use the "DscCommand" action. The command format can be found at Commands, or copy the command string from a DscCommand definition.

DSC Sensors will have the prefix dsc_ (placing them at the end of your device list) and can be renamed.

LED Status (DSC state / AutomationManager state):

LEDs: Ready, Trouble, AC, Arm, Bypass, Chime, Fire, Memory, Program

Partition Status (DSC state / AutomationManager state):

Zone Status (DSC state / AutomationManager state):

For example, Zone sensors (on/off) can be used as motion sensors to trigger lighting.