This script allows you to read data and control state of the "Neptun ProW+" water leak detection system.
The system controls automatically and independently one or more wire or wireless sensors and closes a valve when a water leak is detected.
With this scritp/library you can:
The "neptun2mqtt.ini" file in the program folder contains all settings:
debug - debug mode (0..2)
log - log file location
server - MQTT server IP address
port - MQTT server IP port
username / password - login and password for the MQTT server
mqtt_path - a base topic for each device.
qos - default QoS for all published data
retain - default "Retain" flag for all published data
discovery - 1: enable auto-discovery of devices in your local network (if an IP address of a device is dynamic)
devices - the "devices" parameter allows you to specify one or more devices with a static IP address and its friendly name.
devices = [
{"ip": "192.168.1.92", "friendly_name": "Neptun"}
]
$ sudo su
$ pip3 freeze --local | grep -v '^\-e' | cut -d = -f 1 | xargs -n1 pip3 install -U
$ pip3 install ConfigParser paho-mqtt
$ chmod 0755 neptun2mqtt.sh
$ cp neptun2mqtt.sh /etc/init.d
$ update-rc.d neptun2mqtt.sh defaults
$ service neptun2mqtt start
$ sudo service neptun2mqtt start