homebridge-s7

0.0.7 • Public • Published

homebridge-S7

Use a Siemens S7 PLC for switch on whatever you want.

Installation

(Requires node >=6.0.0)

  1. Install homebridge using: npm install -g homebridge
  2. Install homebridge-s7 using: npm install -g homebridge-s7
  3. Install snap7 with this guide: http://simplyautomationized.blogspot.de/2014/12/raspberry-pi-getting-data-from-s7-1200.html
  4. Update your configuration file with code like the sample below

Homebridge-S7 configuration parameters

Name Value Required Notes
accessory "S7" yes Must be set to "S7" and is required
name (custom) yes Name of accessory that will appear in homekit app and is required
on_value (custom) no (see note) Used for checking the state of the operator.
ip "192.168.178.2" yes Must be set to the IP of your S71200 PLC and is required
operator "MX0.0/QX0.0" yes Must be set to the operator you want to control. You can directly control an Output of the PLC if the Output isn't used in your PLC program. Or you can control a memory bit and use it as a virtual input to create your own logic code in the PLC.

Configuration

"accessories": [
	{
              "accessory": "S7",
              "name": "Living room light",
              "on_value" : "True",
              "ip" : "192.168.178.2",
              "operator" : "MX100.0"
	}
]

Notes

Using the above configuration as an example:
  • The on_value is used to match against the state script output. If the value matches the output of the state script the accessory is determined to be on.
  • The ip has to be set to the IP of your PLC
  • The operator can be set to any QX Output of your PLC or to every MX Memory bit.

Readme

Keywords

Package Sidebar

Install

npm i homebridge-s7

Weekly Downloads

3

Version

0.0.7

License

MIT

Last publish

Collaborators

  • fade2metal