0.1.3 • Published 6 years ago

node-red-contrib-townet v0.1.3

Weekly downloads
3
License
MIT
Repository
-
Last release
6 years ago

nodered's node to TW-IDU control

Installation

npm install node-red-contrib-townet

Protocol V5

syntax: COMMAND_ID(2byte) + POE_ID(3byte) + LENGHT(1byte) + DATI

Commands:

  1. Poe Status/Level 0x300 = 768
  2. Power Status/Level 0x302 = 770
  3. Battery Status/Level 0x304 = 772
  4. Protection status 0x306 = 774
  5. System Status 0x308 = 776

  6. Poe load ON/OFF 0x310 = 784
    { "type": "start", "id": "all/ID", "load": "on/off" } default id: all

  7. Device Identify 0x312 = 786
  8. Device Discovery 0x314 = 788 { "type": "DeviceDiscovery", "id": "all/ID"} default id:all
    Reply: one message as the follow for every IDU into the bus {"type":789,"id":15901,"cmd":"PoeDiscoveryVersion","version":"910548"}
  9. Status message enable/disable 0x30a = 778
    { "type": "statusBroadcast", "id": "all/ID", "rate": "off/RATE" } Message off/on RATE 0 = off >0(max 255)=message rate(LSB = 20 ms) Reply: "{"type":779,"id":ID}"
    and start periodically, example:
    {"type":779,"id":15900,"cmd":"PoeStatusMsg1","PoeVout":24.23,"PoeIout":1,"DCinVolt":24.92,"ProtectionStatus":8}
    {"type":779,"id":15900,"cmd":"PoeStatusMsg2","BatteryVolt":0.61,"BatteryCurrent":0,"ACinVolt":0.12,"PowerStatus":1}
  10. -> to remove: Get device Sw relase 0x30c
  11. Poe Out/Battery 0x316 – 790
    { "type": "poeInStatus", "id": "all" } Reply:
    {"type":791,"id":15902,"cmd":"PoeOutBattery","Vout":2415,"Vbatt":64,"Iout":2,"Ibatt":0}
  12. Poe In/Status 0x318 – 792
    { "type": "poeInStatus", "id": "all" } Reply:
    {"type":793,"id":15902,"cmd":"PoeInStatus","Vdc":2489,"Vac":7,"PowerStatus":1,"ProtectionStatus":0,"BatteryStatus":0,"Load":0}
  13. Poe Temperature 0x320 - 800
    { "type": "poeTemperature", "id": "all" }
    Reply:
    {"type":801,"id":15902,"cmd":"Temperature","Tcpu":49,"T1":64777,"T2":0,"T3":0}
  14. Poe Uptime 0x322 - 802
    { "type": "poeUptime", "id": "all" } Reply {"type":803,"id":15900,"cmd":"PoeUptime","Days":0,"Hours":1,"Minutes":7,"Seconds":43}
  15. Poe Sensor 0x324 - 804
    { "type": "poeSensor", "id": "all/ID", "sensor": NUM} where NUM=0 or 1 or ...n-1 Reply {"type":805, "type":"PoeSensor","rom":"ID ROM","temp":"19,7","id":15900}

The output from twidu node is string(use json node before function node) as the follow:

"{"type":779,"id":15901,"cmd":"PoeStatusMsg1","PoeVout":24,"PoeIout":0.14,"DCinVolt":18.51,"ProtectionStatus":0}"
"{"type":779,"id":15901,"cmd":"PoeStatusMsg2","BatteryVolt":0.42,"BatteryCurrent":0,"ACinVolt":0.05,"PowerStatus":1}"

OneWire bridge over CAN 0x500
Shell bridge over CAN 0x7fe