retiredtech wrote:Irek,
I found the RS-232 pin-out for the Powermax+ at: http://www.domoticaforum.eu/viewtopic.p ... =45#p63022.
Richard
Thanks Richard.
I will add this information to the github!
Cheers,
Irek
Moderators: Rene, Willem4ever
retiredtech wrote:Irek,
I found the RS-232 pin-out for the Powermax+ at: http://www.domoticaforum.eu/viewtopic.p ... =45#p63022.
Richard
BTW. I have been working with other user that has Powermax+ and for this panel to work you need this modification in source code (code in red needs to be added):retiredtech wrote:Irek,
I found the RS-232 pin-out for the Powermax+ at: http://www.domoticaforum.eu/viewtopic.p ... =45#p63022.
Richard
I will investigate if there is a cleaner way of doing it, and push fix to Github. In a meantime just apply the path.void PowerMaxAlarm::OnAck(const PlinkBuffer * Buff)
{
if(this->m_lastSentCommand.size == 12 &&
this->m_lastSentCommand.buffer[0] == 0xAB &&
this->m_lastSentCommand.buffer[1] == 0x0A &&
this->m_lastSentCommand.buffer[3] == 0x01)
{
//we got an ack for Pmax_INIT command, this on PowerMax+ can take some time, we need to pause execution before issuing any new commands
os_usleep(10 * 1000000); //sleep for 9 seconds
}
if(this->m_lastSentCommand.size == 1 &&
this->m_lastSentCommand.buffer[0] == 0x0F) //Pmax_DL_EXIT
{
//we got an ack for exit from dload mode:
this->m_bDownloadMode = false;
//this will be false for the first Pmax_DL_EXIT that is called from Init()
if(this->m_bEnrolCompleted)
{
#ifdef _MSC_VER
saveMapToFile("main.map", &this->m_mapMain);
saveMapToFile("ext.map", &this->m_mapExtended);
#endif
this->processSettings();
//after download is complete, we call restore - this will get other important settings, and make sure panel is happy with comms
this->sendCommand(Pmax_RESTORE);
}
//re-starting keep alive timer
this->startKeepAliveTimer();
}
}
Hi Passy.passy wrote:Hi Irek,
I followed your clear instructions for my Powermax+ and I am able to connect my WeMos D1 board via wifi. However, when I am running PowerMax.exe, I don't think the handshake with the Powermax+ happens (the last message in the log is PC [17:39:18]0x0D,0x24,0x00,0x00,0x36,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x0A [DLOAD START]). I did the Powerlink enrolment and got a beep after the instalation was complete (but I get the same beep if the board is not connected).
Do you have any troubleshooting advice for me?
Cheers,
Passy
I did a factory reset and I have not changed any of the default code.ayasystems wrote:Did you change the power max master pin?
The library has the pin if your panel has another pin it will not work
Hi. This log does not look correct - as I don't see ANY response from the board at all.passy wrote: Here is the full log:
PC [20:44:57]0x0D,0x0F,0xF0,0x0A [DLOAD EXIT]
PC [20:44:57]0x0D,0xAB,0x0A,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x43,0x06,0x0A [INIT]
PC [20:44:58]0x0D,0x24,0x00,0x00,0x36,0x22,0x00,0x00,0x00,0x00,0x00,0x00,0x83,0x0A [DLOAD START]
Passy
Hi Passy.passy wrote:Hi Irek,
You were correct it was my wiring.
Thanks a lot for your help!
Passy
Hi. If Wemos D1 is too big for you - you can also use Wemos D1 Mini.bruce_miranda wrote:I was halfway through doing this exact same project but instead using a Particle Photon. A much smaller board, which runs on 5V or 3.3V. This is a great starting position.
Pleasure!cjcharles wrote:Thank you so much @irekz , this is absolutely fantastic and an amazing achievement!
cjcharles wrote: I am currently trying to modify this library for use with Samsung SmartThings (a smart home controller) since I can then use the PIR sensors to trigger lights, whilst also reacting to alarm events. I am a newcomer to Python but have done bits of coding in my past, so Im currently trying to understand what is going on. Thankfully your comments are good, but Im wondering if you can help me understand the different between OnStatusUpdatePanel and OnStatusChange?
The Change event has sub functions which are great to integrate with since I can get an event fire when the alarm arms/disarms/...etc. However they both seem to support this functionality....
Code: Select all
//Fired when system enters armed state
//armType : 0x51 = "Arm Home", 0x53 = "Quick Arm Home", 0x52 = "Arm Away", 0x54 = "Quick Arm Away"
//armTypeStr : text representation of arming method
//whoArmed : specifies who armed system (for example a keyfob 1), values from PmaxEventSource
//whoArmedStr : text representation of who armed
virtual void OnSytemArmed(unsigned char armType, const char* armTypeStr, unsigned char whoArmed, const char* whoArmedStr){};
//Fired when system enters disarmed state
//whoDisarmed : specifies who disarmed system (for example a keyfob 1), values from PmaxEventSource
//whoDisarmedStr : text representation of who disarmed
virtual void OnSytemDisarmed(unsigned char whoDisarmed, const char* whoDisarmedStr){};
//Fired when system enters alarm state
//alarmType : type of alarm, first 9 values from PmaxLogEvents
//alarmTypeStr : text representation of alarmType
//zoneTripped : specifies zone that initiated the alarm, values from PmaxEventSource
//zoneTrippedStr : zone name
virtual void OnAlarmStarted(unsigned char alarmType, const char* alarmTypeStr, unsigned char zoneTripped, const char* zoneTrippedStr){};
//Fired when alarm is cancelled
//whoDisarmed : specifies who cancelled the alarm (for example a keyfob 1), values from PmaxEventSource
//whoDisarmedStr : text representation of who disarmed
virtual void OnAlarmCancelled(unsigned char whoDisarmed, const char* whoDisarmedStr){};
Don't modify pmax.cpp file, Instead in your own cpp file - derive a class from PowerMaxAlarm, override those and handling code (do something useful).cjcharles wrote: Also I think the OnStatusUpdatePanel is the only function which would support zone events (i.e. Zone_4 change from Open to Close), however I will need to modify the CPP file in order to do this (by adding some function calls in these case statements), I think.... Can you correct me if I am wrong?