Giter Site home page Giter Site logo

Comments (1)

massimaro avatar massimaro commented on June 12, 2024

Hi! Better late than never! I came across this issue. I kinda patched it by using "Special arming" since it only happens with armed_away. I added event 30 and subevent 3 in updateArmStatus and added event 30 as conditional to send the message in processMessage. I would be down to do a pull request for this if needed. Hope it helps some late adopters :)

void updateArmStatus(byte event, byte sub_event){
  bool datachanged = false;
  if (event == 2)
  {
    switch (sub_event)
    {
      case 4:
        hassioStatus.stringArmStatus = "triggered";
        homekitStatus.stringArmStatus = "ALARM_TRIGGERED";
        homekitStatus.intArmStatus=4;
        datachanged=true;
        
      break;

      case 11:
        hassioStatus.stringArmStatus = "disarmed";
        homekitStatus.stringArmStatus = "DISARMED";
        homekitStatus.intArmStatus = 3;
        datachanged=true;
        
        break;

      case 12:
         hassioStatus.stringArmStatus = "armed_away";
         homekitStatus.stringArmStatus = "AWAY_ARM";
         homekitStatus.intArmStatus = 1;
         
         datachanged=true;
        break;
            
       case 14:
         hassioStatus.stringArmStatus = "pending";
         //homekitStatus.stringArmStatus = "PENDING";
         homekitStatus.intArmStatus = 1;
         
         datachanged=true;
        break;
      default : break;
    }
  }
  else if (event == 6)
  {
    if (sub_event == 3)
    {
      datachanged=true;
      hassioStatus.stringArmStatus = "armed_home";
      homekitStatus.stringArmStatus = "STAY_ARM";
      homekitStatus.intArmStatus = 0;
      
    }
    else if ( sub_event == 4)
    {
      datachanged=true;
      hassioStatus.stringArmStatus = "armed_home";
      homekitStatus.stringArmStatus = "NIGHT_ARM";
      homekitStatus.intArmStatus = 2; 
    }
  }
  else if (event == 30)
  {
    if(sub_event == 3)
    {
        datachanged=true;
        hassioStatus.stringArmStatus = "armed_away";
        homekitStatus.stringArmStatus = "AWAY_ARM";
        homekitStatus.intArmStatus = 1;        
    }
  }        
}
if ((Hassio || HomeKit) && (event == 29 || event == 30))
  {
      sendArmStatus();
      homekitStatus.sent = homekitStatus.intArmStatus;
  }

from paradoxrs232tomqtt.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.