{ "info": { "author": "Revolution Rigs", "author_email": "nathan@revolutionrigs.com", "bugtrack_url": null, "classifiers": [], "description": "# PyRevive\n## Revive Hardware Restarter API Library\nThis Python package is meant for interfacing with the Revive Hardware Restarter HTTP API. Revive is a hardware restarter and monitor for cryptocurrency mining rigs.\n\nYou can find out more and buy one [here](https://revolutionrigs.com/revive)\n\nIf you find this library helpful, donations are greatly appreciated:\n\n* Ethereum: 0x7472a4812200fc320793a946f027d559e63b164d\n* Ethereum Classic: 0x20282a304c20399b6534cef6196a99978cb89588\n* Bitcoin: 1LvnfMGfz8xTaZgi25DiRFaJoFvpAPncT5\n* Bitcoin Cash: 1Ec3CPq3WPsWT7fQaDGgTYkVPNtMZ3CVaA\n* Litecoin: LSZBbS7EsKnjXQ1FKxYuAmR5quzEazXfm1\n* Electroneum: etnk3yDpybAEBqz3nq63qmev4thRi9eFH64CVKzZc2w3A7vehpZkGvd97uSWxtmtAwjTnfKEp9Rup3md7nZyu9Q49VzZQKhxWN\n\n\n### Installing using PIP\n```\npip install pyrevive\n```\n\n### Installing from source\n```\ngit clone https://github.com/RevolutionRigs/pyrevive.git\ncd pyrevive/\npip install .\n````\n\nIf you do not want to install using pip you may install using setup.py\n```\ngit clone https://github.com/RevolutionRigs/pyrevive.git\ncd pyrevive/\npython setup.py install\n```\n\n### Importing\n```\nimport pyrevive\n```\n\n### Connecting\nThe connect() method takes two arguments: host[:port], authorizationKey\nThe authorization key can be found on the bottom of your Revive.\n\n```\nrevive = pyrevive.connect(\"192.168.1.254\", \"authorizationKey\")\n````\n\n### Version\nGet the current version of PyRevive\n\n```\nprint(revive.__version__)\n```\n\n### Power\nPerform power on, off, reset functions on a Revive port (aka rig)\n\n#### Power on rig 1\n```\nrevive.power.on(1)\n````\n\n#### Power off rig 1\n```\nrevive.power.off(1)\n````\n\n#### Power cycle rig 1\nAll cycle/reset/restart methods are aliases of one another and do the same thing\n\n```\nrevive.power.cycle(1)\nrevive.power.reset(1)\nrevive.power.restart(1)\n````\n\n#### Power on rigs 1-16\n```\nfor rig in range(1, 17):\n revive.power.on(rig)\n```\n\n### Device\nDevice specific actions and authorization\n\n#### Device Authorization check\n```\nrevive.device.auth()\n```\n\n#### Get Device ID\n```\nrevive.device.id()\n```\n \n#### Device Hello message (currently returns device ID) \n```\nrevive.device.hello()\n```\n\n### Rig\nRig specific methods: get() and update()\n\n#### Rig.Get\nThe revive.rig.get() method takes an integer (1-16) as the rig/port number or no argument to get information on all port numbers. Returns a JSON string with the values. The API is currently broken on Revive and only port 1 is returned, regardless of which port you specify.\n\n```\n# Get information about all ports/rigs\nres = revive.rig.get()\nprint(res)\n\n# Get information about port/rig 1\nres = revive.rig.get(1)\nprint(res)\n```\n\n#### Rig.Update\nUpdates the rig (aka port) with the specified information. It takes a Python dict as an argument. Possible fields are:\n\n* port (int, 1-16, required) - physical port which will be updated. We don't have rig id, instead we use this port number\n* name (char) - name of the rig\n* ip (IP address) - IP address of the rig, used when mode is set to watchdog\n* mode (char, manual|watchdog|api)\n* maintenance (boolean) - not used for now\n\n```\npayload = { \"port\": 3, \"name\": \"RRMS40U\", \"ip\": \"192.168.100.101\", \"mode\": \"manual\", \"maintenance\": False }\nres = revive.rig.update(payload)\nprint(res)\n```\n\n### Config\nRetrieves and sets network and watchdog information on the Revive.\n\n#### Config.Network\nThe revive.config.network object sets the following read-write variables:\n\n```\n* revive.config.network.mode\n* revive.config.network.ip\n* revive.config.network.netmask\n* revive.config.network.gateway\n* revive.config.network.primaryDNS\n* revive.config.network.secondaryDNS\n```\n\n##### Viewing\nYou can view the current settings in two ways. Using a helper method show():\n\n```\nrevive.config.network.show()\n```\n\nOr each individual setting:\n\n```\nprint(revive.config.network.mode)\nprint(revive.config.network.ip)\nprint(revive.config.network.netmask)\nprint(revive.config.network.gateway)\nprint(revive.config.network.primaryDNS)\nprint(revive.config.network.secondaryDNS)\n```\n\nThere is also a dictionary on the network object 'settings' that you can view the settings as well:\n```\nprint(revive.config.network.settings)\n```\n\n##### Updating\nThe individual settings are read-write and can be changed and then saved back to the Revive using the save() method:\n\n```\nrevive.config.network.show()\n\nrevive.config.network.ip = \"10.1.1.254\"\nrevive.config.network.netmask = \"255.255.255.0\"\nrevive.config.network.gateway = \"10.1.1.1\"\nrevive.config.network.primaryDNS = \"8.8.8.8\"\nrevive.config.network.secondaryDNS = \"8.8.4.4\"\n\nres = revive.config.network.save()\nprint(res)\n\nrevive.config.network.show()\n```\n\n### Config.Watchdog\nThe Revive watchdog feature has 3 settings you can modify. The revive.config.watchdog object has three read-write variables:\n\n```\n* revive.config.watchdog.settings\n* revive.config.watchdog.pingInterval\n* revive.config.watchdog.firstResetAfter\n* revive.config.watchdog.anotherResetEvery\n```\n\n##### Viewing\nYou can view the current settings in two ways. Using a helper method show():\n\n```\nrevive.config.watchdog.show()\n```\n\nOr you can view the settings individually:\n\n```\nprint(revive.config.watchdog.settings)\nprint(revive.config.watchdog.pingInterval)\nprint(revive.config.watchdog.firstResetAfter)\nprint(revive.config.watchdog.anotherResetEvery)\n```\n\nThere is also a dictionary on the watchdog object 'settings' that you can view the settings as well:\n```\nprint(revive.config.watchdog.settings)\n```\n\n##### Updating\nThe individual settings are read-write and can be changed and then saved back to the Revive using the save() method:\n\n```\nrevive.config.watchdog.show()\n\nrevive.config.watchdog.pingInterval = \"5\"\nrevive.config.watchdog.firstResetAfter = \"90\"\nrevive.config.watchdog.anotherResetEvery = \"120\"\n\nres = revive.config.watchdog.save()\nprint(res)\n\nrevive.config.watchdog.show()\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/RevolutionRigs/pyrevive", "keywords": "", "license": "GNU v3.0", "maintainer": "", "maintainer_email": "", "name": "pyrevive", "package_url": "https://pypi.org/project/pyrevive/", "platform": "", "project_url": "https://pypi.org/project/pyrevive/", "project_urls": { "Homepage": "https://github.com/RevolutionRigs/pyrevive" }, "release_url": "https://pypi.org/project/pyrevive/0.0.6/", "requires_dist": null, "requires_python": "", "summary": "Revive Hardware Restarter API Library", "version": "0.0.6" }, "last_serial": 4416230, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "16a847259491be270c053fed78e4494f", "sha256": "7a672cdbbc0b64ce4f51aa1ab4879dbafffaed74d07b6dc6e402a1ff2cead294" }, "downloads": -1, "filename": "pyrevive-0.0.1.tar.gz", "has_sig": false, "md5_digest": "16a847259491be270c053fed78e4494f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6178, "upload_time": "2018-07-25T02:15:32", "url": "https://files.pythonhosted.org/packages/d6/4c/f7babcab5f972d9862484c43554d927f8e015f68cd046dd54ace7f158b3b/pyrevive-0.0.1.tar.gz" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "249ef6d63e9cddced63ee00f9b90dbb1", "sha256": "e7f840e7717446b03a73058eb00aa73275052f4db0a8c3cb150875272df850b4" }, "downloads": -1, "filename": "pyrevive-0.0.2.tar.gz", "has_sig": false, "md5_digest": "249ef6d63e9cddced63ee00f9b90dbb1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6244, "upload_time": "2018-07-25T20:54:44", "url": "https://files.pythonhosted.org/packages/04/61/0a220b6748ac180590b29d187d52006c8c3fbd5de73eebf0273eb72770ca/pyrevive-0.0.2.tar.gz" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "9216659abb04005cab3cb15dddabfebc", "sha256": "2e170d83bd4198873738333fb2e8866c18dabd2fcfc7195f5b6df03c29fa17ed" }, "downloads": -1, "filename": "pyrevive-0.0.3.tar.gz", "has_sig": false, "md5_digest": "9216659abb04005cab3cb15dddabfebc", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6248, "upload_time": "2018-07-25T20:57:19", "url": "https://files.pythonhosted.org/packages/6a/ea/4c7d05496a1077771ed550032965824b7dff8f39ae0bcf840812a0c71d73/pyrevive-0.0.3.tar.gz" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "69565b84204ede36d58487a3367da68d", "sha256": "960c24bd2cbaf2591c01bc53cbb70b05e97ac5bce156cf5c71ae6ad1c2edd6e5" }, "downloads": -1, "filename": "pyrevive-0.0.4.tar.gz", "has_sig": false, "md5_digest": "69565b84204ede36d58487a3367da68d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6310, "upload_time": "2018-07-25T23:54:19", "url": "https://files.pythonhosted.org/packages/89/d6/7e3015e72d57ea463b7bf9b922ab6f1807e542d570bdf2ee487c6e678b99/pyrevive-0.0.4.tar.gz" } ], "0.0.5": [ { "comment_text": "", "digests": { "md5": "af3be92f0d72f0a331739e74ca9e7d74", "sha256": "8258e483433af5282afee2d16c482b3239c579d12f1c7f939e7bb989786ba369" }, "downloads": -1, "filename": "pyrevive-0.0.5.tar.gz", "has_sig": false, "md5_digest": "af3be92f0d72f0a331739e74ca9e7d74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6332, "upload_time": "2018-09-02T01:00:37", "url": "https://files.pythonhosted.org/packages/7a/a1/ba8188bafc365194ca823f48175b67e91c5d474e60183b2801ff319e38a5/pyrevive-0.0.5.tar.gz" } ], "0.0.6": [ { "comment_text": "", "digests": { "md5": "f7b55ee3f852ee12d68cf47f37bb4f14", "sha256": "990d1b708e235f766c69cd82d036daf26062bf5ae07b923ebe88965549a8bc67" }, "downloads": -1, "filename": "pyrevive-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f7b55ee3f852ee12d68cf47f37bb4f14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6405, "upload_time": "2018-10-25T18:08:27", "url": "https://files.pythonhosted.org/packages/2e/c1/90ea8f4d2e53f1f51334e9af591bc8d6febeac11a5df78df86356ac7c863/pyrevive-0.0.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "f7b55ee3f852ee12d68cf47f37bb4f14", "sha256": "990d1b708e235f766c69cd82d036daf26062bf5ae07b923ebe88965549a8bc67" }, "downloads": -1, "filename": "pyrevive-0.0.6.tar.gz", "has_sig": false, "md5_digest": "f7b55ee3f852ee12d68cf47f37bb4f14", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6405, "upload_time": "2018-10-25T18:08:27", "url": "https://files.pythonhosted.org/packages/2e/c1/90ea8f4d2e53f1f51334e9af591bc8d6febeac11a5df78df86356ac7c863/pyrevive-0.0.6.tar.gz" } ] }