Just noticed if check sum is 0 then the calculated checksum becomes 256: -
local calculatedChecksum = calculateChecksum (length .. msgType .. data .. misc)
--if calculatedChecksum == 256 then calculatedChecksum = 0 end
if (calculatedChecksum ~= tonumber (checksum, 16)) then
log ("(checkMessage) ERROR: The calculated checksum is incorrect.")
log ("(checkMessage) ERROR: The calculated checksum is " .. calculatedChecksum)
log ("(checkMessage) ERROR: The actual checksum is " .. checksum)
return nil
end
50 07/02/11 20:13:50.018 luup_log:215: (checkMessage) ERROR: The calculated checksum is incorrect. <0x402>
50 07/02/11 20:13:50.019 luup_log:215: (checkMessage) ERROR: The calculated checksum is 256 <0x402>
50 07/02/11 20:13:50.020 luup_log:215: (checkMessage) ERROR: The actual checksum is 00 <0x402>
Is it possible with this plugin to use the Vera2 and the lighting control interface for the ELK. Here is what would be ideal:
Ability to disable the ARM/DISARM functions from the plugin. Personally I don’t feel comfortable with ZWAVE having this ability.
Use the Vera2 as the lighting control interface for lighting rules which I setup on the M1G. Right now I am using a Leviton serial interface which isn’t that reliable. Is this possible with this plugin?
I understand your concerns, however, arming or disarming the panel requires the PIN code (the requirement is at the panel level, not at the plugin level, which means that it’s not possible to arm/disarm without the code even if the plugin is somehow hacked). If a PIN code is not entered in the PIN code box, or stored in memory, you can consider this functionality as disabled.
There are no commands for controlling lights, only for getting their status, and it’s not implemented in the plugin. Unless more people require this, I won’t implement this feature in the near future.
I have only just skimmed through the wiki at this point, but I will install the plugin tomorrow after I get some shut-eye.
Being quite familiar with the Elk M1G and a couple of other applications that can work with it, I would like to make a couple of requests right away, if I may be so bold.
The following features would be excellent additions:
A tab with the statuses of the zones (this would include the temperature probes that may be placed in the first 16(?) zone slots),
A tab with the statuses and control buttons for the outputs (relays),
A tab that lists and gives us the option to trigger tasks.
Light control would be nice, but I’m sure we can do that by other means. I guess the main purpose would be to flash the lights in the event of an alarm, or activate a certain scene when the system is disarmed. Can we use these Elk events in our programs on the Vera 2 with this plugin?
Thanks for your consideration and your great work!
@Quixote
All those features are supported in the API. I added them as feature requests and I’ll come back to them when I finish my current assignments.
@cipherwarrior
I believe it’s possible to control lights through tasks, so I’ll add a tab to display the lights’ status.
Feature
Is it possible to change the following in the startup for the ELK: -
local ipAddress, ipPort = string.match (luup.devices[lul_device].ip, "^(.*):(%d+)")
debug (string.format ("(Elk Plugin Startup) ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort)))
if (ipAddress and ipAddress ~= "") then
if (not ipPort) then
ipPort = 5000
end
with
local ipAddress, ipPort = string.match (luup.devices[lul_device].ip, "(%d+.%d+.%d+.%d+):?(%d*)")
if (ipAddress and ipAddress ~= "") then
if (ipPort==nil) or (ipPort == "") then
ipPort = 2101
end
debug (string.format ("(Elk Plugin Startup) ipAddress=%s, ipPort=%s", tostring (ipAddress), tostring (ipPort)))
If the ip address is entered without the port the first instance does not work, for me anyway.
John,
The second format isn’t correct, it needs to be of the more generic form. The one you’ve listed only works for IPv4 addresses (no IPv6) and won’t work for anything that’s resolved using DNS Names instead of raw addresses.
In it’s original form both the IP and Port are mandatory. Something akin to the following can be used to get around that:
local ipAddress, trash, ipPort = string.match(luup.devices[lul_device].ip, "^([%w%.%-]+)(:?(%d-))$")