Skip to content

xyhtac/php_relay_control

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

66 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php_relay_control

Max.Fischer dev@monologic.ru

Web Interface for IO 16-channel relay board

For detailed information regarding communication protocol and board integrated logic features refer to GPIO Controller command protocol

1. Configure your peripheral credentials

Filename: config/credentials.json

{
    "ptz-cam": {
      "hostname": "__CamIP__",
      "username": "__CamUsername__",
      "password": "__CamPassword__"
    },
    "bms-controller": {
      "hostname": "__BmsControllerIP__",
      "password": "__BmsControllerPassword__"
    },
    "bms-sensor": {
      "hostname": "__SensorIP__",
      "community": "__SensorCommunity__",
      "oid": "1.3.6.1.4.1.25728.8900.1.1.2.1"
    },
    "door-controller": {
      "hostname": "__DoorControllerIP__",
      "username": "__DoorControllerUsername__",
      "password": "__DoorControllerPassword__"
    }
  }
  

2. Configure relay channels

Filename: config/channels.json

[
  {
    "id": 16,
    "description": "Recuperation pump",
    "invert": false,
    "icon": "fa-refresh"
  },
  {
    "id": 15,
    "description": "Irrigation",
    "invert": true,
    "icon": "fa-envira"
  },
  {
    "id": 14,
    "description": "Well Pump",
    "invert": false,
    "icon": "fa-tint"
  },
  {
    "id": 13,
    "description": "Drain Pump",
    "invert": false,
    "icon": "fa-bitbucket"
  }
]

3. Configure custom actions

Filename: config/actions.json

[
  {
    "description": "Main Gate",
    "icon": "fa-lock",
    "url": "door.php?door_id=6",
    "button": "activate"
  },
  {
    "description": "Garage gate",
    "icon": "fa-lock",
    "url": "door.php?door_id=4",
    "button": "activate"
  },
  {
    "description": "Facade gate",
    "icon": "fa-lock",
    "url": "door.php?door_id=2",
    "button": "unlock"
  }
]

About

Web interface for USR-IOT electric relay board

Resources

Stars

Watchers

Forks

Packages

No packages published