Hi again
I am looking at this page: Centralite 3400-D control via MQTT | Zigbee2MQTT
It uses an example of receiving a published MQTT message in this format:
{
"action": "arm_all_zones", // This is the example
"action_code": "123", // The code being entered
"action_zone": 0, // The zone being armed (always 0)
"action_transaction": 99 // The transaction number
}
Then publishing a MQTT message in as a payload in this format:
{
"arm_mode": {
"transaction": 99, // Transaction number (this must be the same as the keypad request `action_transaction`)
"mode": "arm_all_zones" // Mode (this must be the same as the keypad request `action`)
}
}
So, I need to extract the “transaction” and the “mode” from the array and send it back in the requested format. I have been trying for hours, but I assume smarter people than me will have an elegant and simple solution.
Looking forward to any suggestions/solutions
Thanks
Hans