coded support for X10 SH624 Security Remote

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
seansco
Posts: 19
Joined: Tuesday 01 March 2016 20:51
Target OS: Linux
Domoticz version:
Contact:

coded support for X10 SH624 Security Remote

Post by seansco »

I added support for the X10 SH624 Security Remote's "arm home" and "arm away" events via mochad.

How do I go about getting them approved and added to the Domoticz standard code?

./hardware/MochadTCP.cpp

Code: Select all

                else if (strstr((const char *)&m_mochadbuffer[j], "SH624"))
                {
                        m_mochadsec.SECURITY1.subtype = sTypeSecX10R;
                        setSecID(&m_mochadbuffer[t.start]);
                        m_mochadsec.SECURITY1.battery_level = 0x0f;

                        // parse remote conditions, e.g. "Panic_SH624" "Lights_On_SH624" "Lights_Off_SH624" "Disarm_SH624" "Arm_Home_min_SH624" "Arm_Away_max_SH624"
                        strcpy(tempRFSECbuf, (const char *)&m_mochadbuffer[t.start + t.width + 7]);
                        pchar = strtok(tempRFSECbuf, " _");
                        while (pchar != NULL)
                        {
                                if (strcmp(pchar, "Panic") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusPanic;
                                else if (strcmp(pchar, "Disarm") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusDisarm;
                                else if (strcmp(pchar, "Home") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusArmHome;
                                else if (strcmp(pchar, "Away") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusArmAway;
                                else if (strcmp(pchar, "Arm") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusArmAway;
                                else if (strcmp(pchar, "On") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusLightOn;
                                else if (strcmp(pchar, "Off") == 0)
                                        m_mochadsec.SECURITY1.status = sStatusLightOff;
                                pchar = strtok(NULL, " _");
                        }
                        m_mochadsec.SECURITY1.rssi = 12;
                }
seansco
Posts: 19
Joined: Tuesday 01 March 2016 20:51
Target OS: Linux
Domoticz version:
Contact:

Re: coded support for X10 SH624 Security Remote

Post by seansco »

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest