hkiam / HCPBridge

emulates Hoermann HAP 1 HCP (HCP2) on ESP8622, ESP32 and Arduino.
89 stars 37 forks source link

Zwischenstatus? #16

Closed hohmannc85 closed 1 year ago

hohmannc85 commented 1 year ago

Danke für das geile Projekt, ist es möglich auszulesen ob der Motor aktuell fährt?

MCLW commented 1 year ago

Hi,

ja gibt es.

//====================================================================================================================== 
 // Convert States 
 //====================================================================================================================== 
 HACover::CoverState toCoverState(const SHCIState& doorState){ 
   switch (doorState.doorState) 
   { 
   case DOOR_MOVE_OPENPOSITION: 
     return HACover::StateOpening; 
   case DOOR_MOVE_CLOSEPOSITION: 
     return HACover::StateClosing; 
   case DOOR_OPEN_POSITION: 
     return HACover::StateOpen; 
   case DOOR_CLOSE_POSITION: 
     return HACover::StateClosed; 
   case DOOR_HALF_POSITION: 
     return HACover::StateOpen; 
   default: 
     return HACover::StateStopped; 
   } 
 } 

 const char* doorStateToStr(const SHCIState& doorState){ 
   switch (doorState.doorState) 
   { 
   case DOOR_MOVE_OPENPOSITION: 
     return "opening"; 
   case DOOR_MOVE_CLOSEPOSITION: 
     return "closing"; 
   case DOOR_OPEN_POSITION: 
     return "open"; 
   case DOOR_CLOSE_POSITION: 
     return "closed"; 
   case DOOR_HALF_POSITION: 
     return "ventilation"; 
   default: 
     return "stopped"; 
   } 
 }
hohmannc85 commented 1 year ago

Top danke