OpenSprinkler Forums Hardware Questions OpenSprinkler Pi (OSPi) Announcement: New OSPi Network Daemon Re: Re: Announcement: New OSPi Network Daemon

#24873

snewman
Member

@aradke – you’re spot on, and that’s how it’s designed. When a station runs, a background thread starts and loops until the time is up, then it shuts itself off. There’s also a safety mechanism in place that each station operation places a file on the filesystem with an expiration time embedded. I have a utility that you can run via cron every 5 minutes to look for these expired files. If one is found, it’s a sign that something went wrong and the system issues an “all off” command. You can’t be too careful when it comes to a water bill.


@salbahra
– In this simple TCPServer setup, it’s a gaping hole and I wouldn’t feel comfortable opening it up to anything but localhost. I have more ambitious plans to create a cloud-based service that uses TLS-encrypted socket connections via ZeroMQ, and the connection must be made outbound from the Pi to the cloud – I don’t want anyone to have to poke a hole in their firewall just to get remote access.

Aradke is right that SSH would be a pretty secure way to accomplish this, but it’s not a direction I want to go. If someone wanted to go that direction, I’d suggest replacing the TCPServer I wrote with one from the Twisted.Conch project. The learning curve is pretty steep, but the project is *very* well-established.

By the way – if you are reading this and my vision isn’t in line with yours, please feel free to fork my code from Github and do anything you want with it. I’m not in this to profit, I just want to work on a cool project that I both use at my home and enjoy.