Giter Site home page Giter Site logo

rk_scripts's People

Contributors

rkresha avatar

Watchers

 avatar

rk_scripts's Issues

Adjust script to make use of the wait for comm

https://github.com/oskarpearson/mmeowlink/wiki/Installing-MMeowlink#adding-a-wait-for-silence-alias-so-that-multiple-rigs-can-run-simultaneously-optional

Adding a "wait-for-silence" alias so that multiple rigs can run simultaneously (Optional)

openaps alias add wait-for-silence '! bash -c "echo -n "Listening: "; for i in seq 1 40; do echo -n .; ~/mmeowlink-source/bin/mmeowlink-any-pump-comms.py --port [INSERT PORT PATH HERE WITHOUT BRACKETS] --wait-for 20 2>/dev/null | egrep -v subg | egrep No && break; done"'. If you add this as the first command in your preflight, this will check to see if there are any other current mmeowlink communications with your pump, and step aside if there are. Users have used this to run multiple rigs simultaneously. May require adding a sleep [some number] command at the beginning of your preflight for one rig to stagger things a bit.

Reboot after 5 failed loops

Create a new file that tracks the number of consecutive failed loops. At 5, reboot, but first add a line into crontab to fire the loop again on restart. Also on restart null out the file that is tracking the failed loops. Also null out the file on successful runs of the loop

Something to consider

> Eric Jensen @elnjensen Aug 09 22:39
> In case it's useful, here's a script I wrote to have the Raspberry Pi push out its IP address once it boots, using Pushbullet - I took the example that @cjo20 gave earlier and adapted it to this purpose:
> #!/bin/bash
> 
> # Sleep a bit to make sure that we have time to get
> # an IP address before running
> sleep 30
> 
> # Set API key for Pushbullet
> export API="Your API key goes here"
> 
> # Set a variable to IP address of wireless device:
> export IP=`hostname -I`
> 
> # Push to devices:
> echo '{"type": "note", "title":"Rasp. Pi IP is' "$IP" '", "body":"' "$IP" '"}' |
>     curl -u ${API}: -X POST https://api.pushbullet.com/v2/pushes \
>      --header 'Content-Type: application/json' --data-binary @-

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.