diff --git a/watering.py b/watering.py new file mode 100755 index 0000000..3b7fbb2 --- /dev/null +++ b/watering.py @@ -0,0 +1,67 @@ +#!/bin/env python3 + +from pyLoraRFM9x import LoRa, ModemConfig +import time +from collections import namedtuple +from struct import * +import pykka +import paho.mqtt.client as paho +from paho import mqtt +import json + +client = paho.Client(paho.CallbackAPIVersion.VERSION2) +client.connect("stanley") + +Watering = namedtuple('Watering', 'voltage moisture intervals dry wet state delay_hours max_time_mins pump_speed pump_running errors') +WateringStruct = '