Giter VIP home page Giter VIP logo

opensprinkler's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

opensprinkler's Issues

Consider adding support for AllJoyn

Adding AllJoyn support out of the box for OpenSprinkler could really help integrating it with the future of Home Automation. The work required with the provided tools by the AllSeen Alliance is actually not that big.
Define all the methods, events and properties the sprinkler should expose using the XML introspection API and most of the code and interfaces are completely autogenerated for you, for a quick follow-on implementation of the interfaces.

https://allseenalliance.org/

Latest update in interval_program throws KeyError

Starting interval_program's ospi.py throws a KeyError.

Traceback (most recent call last):
File "ospi.py", line 18, in
import ospi_addon #This provides a stub for adding custom features to ospi.py.
File "/home/pi/opensprinkler/OpenSprinkler Pi/software/demos/interval_program/OSPi/ospi_addon.py", line 2, in
import ospi
File "/home/pi/opensprinkler/OpenSprinkler Pi/software/demos/interval_program/OSPi/ospi.py", line 284, in
gv.lg = gv.sd['lg'] # Controlls logging
KeyError: 'lg'

Manual start program does not respect weather scaling

Normal loop:
unsigned long water_time = (unsigned long)water_time_decode(prog.durations[sid]);
// if the program is set to use weather scaling
if (prog.use_weather)
water_time = water_time * os.options[OPTION_WATER_PERCENTAGE].value / 100;
pd.scheduled_stop_time[sid] = water_time;

Manual start:
else if(pid>0)
dur = water_time_decode(prog.durations[sid]);
if (dur>0 && !(os.stndis_bits[bid]&(1<<s))) {
pd.scheduled_stop_time[sid] = dur;

Shouldn't we be scaling the duration in a manual start by the weather setting?

unzip ospi.tar.gz

It's silly to store a tarball of code in git (makes it hard to collaborate too).

Please just store the source.

Add support for ESP01 Relay Boards

I have been able to get the OpenSprinkler firmware (with some modifications) to work on an ESP-01 controlled relay board like the ones shown at these link:
AliExpress Link
Amazon Link

The trick with these boards is that the relay is controlled by sending a 4 byte binary code on the serial line 115200/8/n/1 from the ESP module (there is another non-reprogrammable MCU on the board that listens to the serial commands and controls the relays). e.g to turn on relay 1 on you send the 4 byte hex code a0, 01, 01, a2. To turn it off you send a0, 01, 00, a1 (so it looks like the first byte a0 is a delimiter, then the second byte is the relay number, the third is on or off, and the last byte is a checksum).

I have also found that I need to add a 20msec delay between controlling different relays for them to reliably switch.

There are many other boards like this, with differing numbers of relays (I have seen single channel relays and 2 channel relay boards).

With these boards, all you likely need to add is a full bridge rectifier with a buck converter to power the board from the solenoid 24V relay line, and you have a very inexpensive headless WIFI sprinkler controller (no display or buttons, you need to rely on the phone/browser interface).

I would love it if support for this type of board could be added to OpenSprinkler. I got mine working by hacking the switching logic for the RF station type in OpenSprinkler::switch_rfstation to send the appropriate serial command. To do it properly, you would have to add a new station type (perhaps named Serial Binary, or something like that), where you specified the binary sequence to send to turn the relay on and the sequence to turn it off. That would require updates to the ui code which is out of my league (hence I only co-opted the RF station type in my copy of the code).

Is this something that you would consider adding?

PS: the forum seems to be broken, as that may have been a more appropriate place to post this, but whenever I am logged in, the forum links give me Page Not Found error, preventing me from being able to post.

License of the sample code

Hi,

I created a web interface and a server to run on Raspberry Pi to use the OpenSprinkler system. I've use the sample code from this repository to base my work on.

I'm preparing to release the application I wrote under GPLv3 and want to make sure it will not create any conflicts. Can you please tell me what license you sample codes are under?

Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.