Supergiovane / node-red-contrib-hikvision-ultimate

A native set of node for Hikvision Cameras, Doorbells, Alarms, Radars etc.
https://www.facebook.com/supergiovaneDev
MIT License
51 stars 11 forks source link

help with MQTT-IN and sending commands to AXPRO #51

Closed JacekKac closed 1 year ago

JacekKac commented 1 year ago

I am able to receive and send data from AXP PRO to mqtt, now i am trying to add to my flow the possibility to operate ax pro by publishing commands via mqtt. mqtt-in up and running, tested with "Debug" but i don't know how to handle received message and execute one of the inject's messages to arm/disarm etc.

Supergiovane commented 1 year ago

Hi Have you seen the Readme? Here you should find the solution. If you, instead, need assistance on javascript or node-red, you should go to the node-red forum and ask there.

<!DOCTYPE html>

Flow Messages

You can control your AX Pro alarm panel by passing messages to the node.

Input

Property Parameter
msg.armAwayArea Area number (for example 1)
msg.armStayArea Area number (for example 1)
msg.disarmArea Area number (for example 1)

Examples:

// To Arm Away Area 1
msg.armAwayArea = 1
return msg;
// To Arm Stay Area 1
msg.armStayArea = 1
return msg;
// To Disarm Area 1
msg.disarmArea = 1
return msg;
// To clear alarm on Area 1
msg.clearAlarmArea = 1
return msg;

JacekKac commented 1 year ago

This is for me clear, but don't know how forward the message from mqtt-in base on topic to AXPRO node adding the msg.disarmArea =1, ok i will look on node-red manuals