Paid request - intergration with Elk M1 security panel

Thanks, if you look in the SmartThings app so you see the alarm status changing now?

It still needs a couple of tweaks but it does seem like it is doing all the basics now…

You can now go to live logging on ST IDE/webpage and you should see some interesting messages there for status.

Hello, The SmartThings app does not reflect an alarm status change. The app does allow me to change the alarm (arm/disarm). The app always displays “disarmed”.

Below is a cut of the live log.

3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: debug [zone_name:zone014, zone_id:20, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: debug [zone_name:zone013, zone_id:19, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: debug [zone_name:zone012, zone_id:18, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: debug [zone_name:zone011, zone_id:17, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: debug [zone_name:zone010, zone_id:16, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:32 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone009, zone_id:9, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone005, zone_id:5, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone008, zone_id:8, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone007, zone_id:7, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone006, zone_id:6, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone004, zone_id:4, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone003, zone_id:3, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone002, zone_id:2, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:31 AM: debug [zone_name:zone001, zone_id:1, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:30 AM: debug Disarmed Status found
3f66640e-40c9-4385-86fd-50734651fab3 7:07:30 AM: debug [stat_str:Disarmed, stat_update_from:Elk]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:28 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:28 AM: debug [zone_name:zone014, zone_id:20, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:27 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:27 AM: debug [zone_name:zone013, zone_id:19, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:27 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:27 AM: debug [zone_name:zone012, zone_id:18, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:27 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone011, zone_id:17, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone010, zone_id:16, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone009, zone_id:9, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone008, zone_id:8, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone007, zone_id:7, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone006, zone_id:6, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone005, zone_id:5, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone004, zone_id:4, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: debug [zone_name:zone003, zone_id:3, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:25 AM: debug [zone_name:zone001, zone_id:1, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:26 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:25 AM: debug [zone_name:zone002, zone_id:2, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:20 AM: debug Disarmed Status found
3f66640e-40c9-4385-86fd-50734651fab3 7:07:20 AM: debug [stat_str:Disarmed, stat_update_from:Elk]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:20 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:20 AM: debug [zone_name:zone005, zone_id:5, zone_status:No Motion]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:20 AM: debug Disarmed Status found
3f66640e-40c9-4385-86fd-50734651fab3 7:07:19 AM: debug [stat_str:Disarmed, stat_update_from:Elk]
3f66640e-40c9-4385-86fd-50734651fab3 7:07:18 AM: error java.lang.NullPointerException: Cannot get property ‘dateCreated’ on null object @line 450 (parse)
3f66640e-40c9-4385-86fd-50734651fab3 7:07:18 AM: debug [zone_name:zone005, zone_id:5, zone_status:Violated (Motion)]

I seemed to have “broken” the functionality from the app. I can change the alarm status from the webpage but I cannot do anything from the app. The logs in ST show where commands are pushing through but I get nothing from the alarm. I was , at first, able to change status from the app.

Here is a short copy of the ST log…

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:03:24 AM: debug uri /config?ip_for_st=192.168.86.250&port_for_st=39500

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:03:24 AM: debug uri /status

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:03:24 AM: debug Configuring Alarm (getting zones+types, configuring IP/port/timeout)

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:03:19 AM: debug uri /refresh

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:03:19 AM: debug refresh()

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:02:14 AM: debug uri /refresh

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:02:14 AM: debug refresh()

@Brent_Crotts - It sounds like an IP address has changed in your router. Possibly the NodeMCU and possibly ST, you need both of them (and the alarm itself) to have fixed IP addresses otherwise when they get a new DHCP address then things might break. If you need to reconfigure the device then just use the web address that you used at the start - this one
http://192.168.1.50/config?ip_for_st=192.168.1.100&port_for_st=39500&ip_for_alarm=192.168.1.200&port_for_alarm=2101&alarm_password=003456

As for others, I have just updated the firmware again which should fix a few zone issues and I think everything should now be working. Next steps, once you have ST configured and it is correctly disarming/arming the alarm (you should also see the alarm status correctly reflected in the app, plus you might see zone states change in the app too. Note that the exit timer has to finish for the status to change, otherwise the alarm doesnt complete its change of status.

  • Once you have got to this point, go into the alarm device (on your phone) and add a pre/post name - this will get appended onto zones when they are created (they should appear as separate devices in ST).
  • Now you should walk around the house and trigger every zone device, while this happens the NodeMCU will track which zone data it receives (if you miss a zone you might not get information correctly reported (though in reality you just need to find the highest zone number - whatever that is).
  • After this you can press ‘Create Zone Devices’ and you should see it create some fake zone devices in ST, which should respond as motion is detected in each zone. This might need another firmware update here as currently all zone types are treated the same (motion) but for now it will give something to test!

Note, while I was coding all of this I managed to have a computer crash so lost about 90minutes of work, Ive tried to sort everything but there might be another bug or two again.

There is one thing I am tempted to do, and that is get the actual zone names out of Elk, does everybody here name their zones in the panel?

Thanks! I’m back at being able to arm and disarm from the webpage. Now to trying to get the app to work. Thanks for all your help.

I did notice that when click on Alarm Status on the webpage I do get an error. This may be why the status is not changing in the app.

EDIT: Status page should now work, though it isnt hugely important to the process…

For the ST integration you have used the MAC address of the Node as the Device ID right?

I did use the MAC address of the ELK panel as the device ID for ST. Arming and Disarming works, its just that the app always shows “Arming Away” or “Disarming”.

I name my zones.

I used the MAC address of the NodeMCU for the device id. I thought the app talked to the NodeMCU and then the NodeMCU talks to the Elk alarm.

Yes you’re right, I misspoke, it should be the Node. So nobody has ST updating when the alarm changes status? How about seeing any of the zone panels at the bottom change to Active? One more thing you can try is changing the device ID from the Node MAC address to the Node IP address (and port) in hex. Hence 192.168.1.50 would go to C0A80132:0050 (port 80 in hex is 50, while 192 in hex is C0, 50 in hex is 32).

It surprises me that it isn’t working for anybody as your debug logs look good, hopefully the IP trick will sort things out. I’ll try and write a complete set of instructions and and put it in a single post.

Hello, Using the Hex version of the Node’s IP address seams to help. Parts of the app are updating the status and parts are not. The front page of the app “My Home” does not show status change. It still remains “disarmed”. When I go into my Alarm device page, the 3 buttons work but the main display does not change status. I again remains “disarmed” and looks to still have old status data. It looks like the app is not getting a status update.

I think you are getting confused between SmartThings SHM and the device. The alarm device is totally separate from SHM and the only way they are linked it’s if you do it manually through WebCore (ST don’t let you integrate into it easily without faff and smartapps).

Have you definitely let the alarm fully arm? Or canceling it before the exit timer completes? What does live logging show?

I’m with @Sturgeon637. My setup is working the same. If he is like me, what he is describing is on the device screen, not the Smart Home Monitor screen. I did also let the Elk fully arm and then check the device status. It still showed disarmed. I haven’t changed to Hex key though as I’ll need to research exactly how to change to that format.

@Brent_Crotts if you click on the device in live logging IDE do you see the status updates coming through from the Node?

I have not seen any status updates come through in the Live Logging.

Can you give me a paste of the logs please, when in Live Logging also try pressing the arm/disarm buttons in ST since that will also generate some logs.

[

](https://graph.api.smartthings.com/ide/logs#d2a688f0-8eea-40b8-81e9-e3323766773b)

b672f45b-ed89-436c-853e-6950f13a3c15
9:07:54 AM: info Living Room Motion alarm triggered and mode hasn’t changed.

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:07:36 AM: debug uri /disarm

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:07:36 AM: debug disarm()

19f0b7ca-7ba2-4a2b-9ed1-77fbda6f15ab 9:07:26 AM: trace physicalgraph.device.cassandra.DeviceState@6dda497b

19f0b7ca-7ba2-4a2b-9ed1-77fbda6f15ab 9:07:26 AM: debug obs --> [wind_gust_mph:2.0, precip_1hr_metric: 0, precip_today_metric:0, pressure_trend:-, forecast_url:http://www.wunderground.com/US/NC/Mocksville.html, history_url:http://www.wunderground.com/weatherstation/WXDailyHistory.asp?ID=KNCMOCKS22, estimated:[:], weather:Overcast, windchill_string:NA, station_id:KNCMOCKS22, UV:1, observation_epoch:1532955977, wind_gust_kph:3.2, precip_1hr_in:0.00, observation_time:Last Updated on July 30, 9:06 AM EDT, feelslike_string:73.2 F (22.9 C), temp_f:73.2, local_tz_long:America/New_York, relative_humidity:91%, temp_c:22.9, image:[title:Weather Underground, link:http://www.wunderground.com, url:http://icons.wxug.com/graphics/wu2/logo_130x80.png], solarradiation:–, visibility_mi:3.0, observation_location:[full:Lexington, North Carolina, elevation:745 ft, state:North Carolina, longitude:-80.57, latitude:35.90, country_iso3166:US, country:US, city:Lexington], wind_mph:2, heat_index_c:NA, precip_today_string:0.00 in (0 mm), observation_time_rfc822:Mon, 30 Jul 2018 09:06:17 -0400, feelslike_f:73.2, heat_index_f:NA, feelslike_c:22.9, heat_index_string:NA, ob_url:http://www.wunderground.com/cgi-bin/findweather/getForecast?query=35.900406,-80.571434, dewpoint_string:70 F (21 C), local_tz_offset:-0400, wind_kph:3.2, windchill_f:NA, windchill_c:NA, wind_degrees:270, pressure_in:30.07, dewpoint_c:21, pressure_mb:1018, icon:cloudy, local_time_rfc822:Mon, 30 Jul 2018 09:06:25 -0400, precip_1hr_string:0.00 in ( 0 mm), icon_url:http://icons.wxug.com/i/c/k/cloudy.gif, wind_dir:West, dewpoint_f:70, nowcast:, display_location:[zip:27028, magic:1, full:Mocksville, NC, elevation:271.0, state:NC, wmo:99999, longitude:-80.55999756, latitude:35.88999939, state_name:North Carolina, country_iso3166:US, country:US, city:Mocksville], visibility_km:4.8, temperature_string:73.2 F (22.9 C), local_tz_short:EDT, local_epoch:1532955985, wind_string:From the West at 2 MPH Gusting to 2.0 MPH, precip_today_in:0.00]

19f0b7ca-7ba2-4a2b-9ed1-77fbda6f15ab 9:07:26 AM: debug WUSTATION: Executing ‘poll’, location: Home

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:26 AM: debug sending data to AT

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:26 AM: debug A sensor event occurred: [name:percentPrecip, deviceId:19f0b7ca-7ba2-4a2b-9ed1-77fbda6f15ab, isoDate:2018-07-30T13:07:26.589Z, unit:%, value:30]

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:26 AM: debug sending data to AT

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:26 AM: debug A sensor event occurred: [name:humidity, deviceId:19f0b7ca-7ba2-4a2b-9ed1-77fbda6f15ab, isoDate:2018-07-30T13:07:26.225Z, unit:%, value:91]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:25 AM: debug WUSTATION: oldKeys = []

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:25 AM: trace physicalgraph.device.cassandra.DeviceState@29328382

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:25 AM: debug WUSTATION: newKeys = []

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:25 AM: debug WUSTATION: event: [name:forecastIcon, value:chancetstorms, displayed:false]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:localSunset, value:8:28 PM, descriptionText:Sunset today at is 8:28 PM]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:localSunrise, value:6:28 AM, descriptionText:Sunrise today is at 6:28 AM]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:weatherIcon, value:cloudy, displayed:false]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:weather, value:Overcast]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:humidity, value:92, unit:%]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:feelsLike, value:73, unit:F]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: event: [name:temperature, value:73, unit:F]

ddec3cb6-acd0-4122-ab6b-bea2ca47cb21 9:07:24 AM: debug WUSTATION: Executing ‘poll’, location: Home

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:25 AM: debug sending data to AT

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:25 AM: debug A sensor event occurred: [name:percentPrecip, deviceId:ddec3cb6-acd0-4122-ab6b-bea2ca47cb21, isoDate:2018-07-30T13:07:25.017Z, unit:%, value:30]

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:24 AM: debug sending data to AT

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:24 AM: debug A sensor event occurred: [name:wind, deviceId:ddec3cb6-acd0-4122-ab6b-bea2ca47cb21, isoDate:2018-07-30T13:07:24.587Z, unit:MPH, value:0]

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:24 AM: debug sending data to AT

d2a688f0-8eea-40b8-81e9-e3323766773b 9:07:24 AM: debug A sensor event occurred: [name:humidity, deviceId:ddec3cb6-acd0-4122-ab6b-bea2ca47cb21, isoDate:2018-07-30T13:07:24.561Z, unit:%, value:92]

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:06:49 AM: debug uri /armaway

48061f21-a323-4cde-a7e5-25b7cc2e0d6d 9:06:49 AM: debug armaway()

If you paste the logs as code then they appear much more readable, however for now you aren’t receiving any response from the NodeMCU at all which means you should try the ip:port update for the device ID first.

What is your network setup? Do you have quite a lot of kit? I’m just wondering why ST doesn’t see the responses from the NodeMCU, and normally it is because of network effects (e.g. Different subnet, ip range…)

Arm Home / Disarm
3f66640e-40c9-4385-86fd-50734651fab3 9:35:25 AM: debug [:]
3f66640e-40c9-4385-86fd-50734651fab3 9:35:25 AM: debug uri /disarm
3f66640e-40c9-4385-86fd-50734651fab3 9:35:25 AM: debug disarm()
3f66640e-40c9-4385-86fd-50734651fab3 9:33:53 AM: debug [:]
3f66640e-40c9-4385-86fd-50734651fab3 9:33:52 AM: debug uri /armhome
3f66640e-40c9-4385-86fd-50734651fab3 9:33:52 AM: debug armhome()