Giter Club home page Giter Club logo

skywire-wing-commander's People

Contributors

asgaror avatar bigookie avatar cryptovinnie avatar fossabot avatar thrilok209 avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

skywire-wing-commander's Issues

Monitor connection to Skywire Discovery Node

Is your feature request related to a problem? Please describe.
The Wing Commander Bot currently monitors the (local) Manager Node - and the Nodes that are connected to it. The status of the Nodes connectivity with the Manager is reported to the Bot via the Managers API.

There is an assumption that both the Bot and the Manager require an internet connection and without this neither will work. It also assumed that because the Node is connected to the Manager, that its also connected to the Skywire Discovery Node - which isn't always the case.

Describe the solution you'd like
It should be possible for the Bot to monitor the Skywire Discovery Node also to ensure that the local Nodes (connected to the Manager) are reporting as being connected to the Discovery Node.

When a Node is not detected as being connected to the Skywire Discovery Node the Bot should alert the owner - as this will be impacting the Nodes uptime stats.

This has recently been voted on by the community as the highest priority item.

Describe alternatives you've considered
If you want to confirm that your nodes are connected to the discovery node (there is no real reason why they shouldn't be assuming they are correctly configured) - then use the Skywire Node Checker
http://167.99.207.153:8001/

Enhance config file validation and management

Describe the bug
Currently the app is not very resilient to incorrect data within the config.toml configuration file.

To Reproduce
Steps to reproduce the behavior:

  1. Edit the .wingocmmander/config.toml file.
  2. Alter any string type parameter (i.e. apikiey, admin) to not be enclosed in " " (double quotes)
  3. Save the changes
  4. Run Wing Commander (.wcbot)
  5. The error will be reported.

Expected behavior
Fine for an error to still be reported, but preferably it will be one that allows the user to self-help. The error message should provide sufficient detail that the user knows what the problem is and has the ability to fix it without requiring assistance.

While this may not be possible in all cases - its what we should be targeting.

Screenshots
NA

Additional context
Low priority. Fix when we can

Notification monitoring for Managed nodes

Enhancement to allow monitoring of the Nodes that are connected to and managed by the Manager node.

This will allow notifications when the connection status of the managed nodes changes ie a managed node has not been seen for a configured period of time - may indicate it has died and needs restarting, etc.

Restructure code base

The code associated with the v0.0.1 (alpha) release is very crude and not well structured.

Work is needed to refactor the code (currently main.go) and seperate it out and improve its overall usability (re-usability) and structure.

Showconfig command fails

Describe the bug
The /showconfig command is not working on some systems.

To Reproduce
Steps to reproduce the behavior:

  1. Ensure the latest version of the Bot is running (v0.2.0-beta.4)
  2. In Telegram, enter the /showconfig command
  3. The Bot responds with the following message
Sorry,'/showconfig' is an unknown command.
...

Expected behavior
The Bot should reply with the current runtime configuration based on the content of the config.toml file.

Application instance control broken

Describe the bug
Application instance control was accidentally disabled in v0.2.0-beta.9. This allows multiple instances of the Bot application wcbot to run at the same time on the same machine.

To Reproduce
Steps to reproduce the behavior:

  1. Run wcbot twice.

Expected behavior
Secondary instances of wcbot will detect that there is a primary instance already running and will refuse to start.

Auto-restart script not working

Describe the bug
A number of users have reported that the auto-restart script has not been working for them.

To Reproduce
Followed the steps included in the main Readme to enable auto-restart, however after reboot of the device, the bot is not automatically started.

Expected behavior
The bot should automatically start following a reboot or restart of the device.

Allow Admin user config with or without @ symbol

The bots config file currently expects the admin user will contain a leading @ symbol and messages will be accepted or rejected by the bot based on an exact match of this config string against the telegram user sending the message.

The bot should be more accommodating and automatically add the @ if it’s not there (at runtime). Possibly warn the user by a message at start up hinting they should correct the config

Node information enquiry

Is your feature request related to a problem? Please describe.
Ability to request information about the currently connected Nodes from the bot.

Describe the solution you'd like
Would be good to have a /nodes command which would respond with a telegram custom keyboard allowing the user to select from a button, which node they want more info on. When a node is selected the NodeInfo structure could be returned, provide the following:
-Node Key
-Connection Type
-SentBytes
-RecvBytes
-LastSeen
-RunningSince

Describe alternatives you've considered
This could be achieved via text entry, but would be hard and unusable. User needs to select the node from a lot.

Additional context
Refer to here for detail on custom keyboards
https://core.telegram.org/bots/api/#replykeyboardmarkup

Support automatic updates

Is your feature request related to a problem? Please describe.
Automatic detection of new releases and ability to trigger an automatic update via Telegram.

This will help avoid the need for users to access the terminal on their nodes (ie via SSH) to perform an update. Will simplify the update process.

Describe the solution you'd like
Enhance the bot to perform periodic (configurable) update checks.
The bot should ping GitHub occasionally and see if there is a new version and report availability of a new version to its owner.
When a new version is detected the bot should accept a command that would trigger it to download the update in the background.

Application Analytics

Is your feature request related to a problem? Please describe.
Better understanding of the deployed application and features that are used and errors that occur will assist in improving the application.

Describe the solution you'd like
integrate support for app analytics pushed to Google Analytics.

Describe alternatives you've considered
Lots... None are easy or free.

Additional context
All data collected must be anonymous. I'm not interested in who the users are, but more what and how they use the app to improve it over time.

Add link button to official white

Is your feature request related to a problem? Please describe.
NA

Describe the solution you'd like
Add a new button to the Wing Commander bot to provide a simple link to the offical whitelist site:
https://whitelist.skycoin.net/

The user will be required to login to the site manually - Wing Commander WILL NO manage the users credentials for the site (for security reasons)

Describe alternatives you've considered
NA

Additional context
Feature has been requested by a number of users in the Wing Commander telegram group

Move documentation and image assets to project Wiki

Documentation and image assets are starting to bloat the code repository. These assets need to be moved out of the repo and onto the Wiki to ensure download times of the code repo (i.e. for updates, etc) is not impacted.

Typo in Heartbeat message

Describe the bug
The regular Heartbeat message has a typo, as kindly pointed out by Telegram user @A D

To Reproduce
Heatbeat is incorrectly spelt as "Heatbeat"

Startup script include Botfather API keys

Using Telegram-cli, it might be possible to initiate a conversation with the Botfather.

Create new Telegram bot
Get Telegram username
Get chat-id

Input information so all user will have to do is Enter phone number making setup even Simpiler then it already is.

Status command should indicate if monitoring has been started or not

Is your feature request related to a problem? Please describe.
Running the /status command before running the /start command will inform the user that 0 nodes are connected. This can be confusing.

Describe the solution you'd like
The /status command should report the current status of monitoring (running or not). If it is running, then it should also report the number of connected nodes.

Wing Commander Initial Install Config Builder

Is your feature request related to a problem? Please describe.
Simplify the process of setting up the Bot initially.

Describe the solution you'd like
Create a command line app that can guide the new user through the initial config setup - and create the required config.toml file as output.

Something like wc-config - which would then prompt for and do the following:

Provide your Bot API Key: <user input goes here>
Provide your Telegram User ID: <@myusername>
Attempting to retrieving ChatID. Please initiate a chat with the Bot in the Telegram app.
.......
Got ChatID: xxxxxxxxxx

config.toml created in ~/.wingcommander
complete

Describe alternatives you've considered
Current alternative is that users manually create the file. This can be confusing.

No error reported if Discovery Server unreachable

Describe the bug
I have just detected an issue where Wing Commander is not correctly handling errors when connecting to the Discovery Server API to validate Node connectivity.

If the connection fails the last know result is used (ie a cached result). This is not ideal, but under normal conditions should not impact the function.

I will be addressing this issue ASAP and expect to push an update tonight for it (all going well).

To Reproduce
Steps to reproduce the behavior:

  1. Run Wing Commander Bot
  2. Ensure connection to Discovery Server is available. Check by browsing to the Discovery Server website http://discovery.skycoin.net:8001/#/
  3. Issue the `/start' command to Wing Commander.
  4. Issue the '/status' command to force a re-check of the Discovery Server
  5. Prevent access to the Discovery Server (block it in your firewall or other method)
  6. Issue the /status command again. An error should be logged to the command terminal (if your running in interactive mode, but no notification will be sent to Telegram session. The Bot will respond with the previous data - which makes everything look fine.

Expected behavior
The user should be informed that the Discovery Server was unable to be contacted and that the Bot was unable to verify connectivity of the Nodes with the Discovery server at this point in time.

Too much raw data in connection notification

The Bot app, once started, will send telegram notifications when connections to other Nodes occur. This could be connections you make (outbound) to other nodes, or connections that are being made (inbound) to your nodes from others (which is really the driver for this project).

At the moment you get a verbose list of Node and App keys. This should be revised - to inform you that a connection had occurred (either inbound or outbound)

Ignore messages and commands from non-owner (admin) users

Describe the bug
A Telegram user who does not own the Wing Commander bot instance can initiate a private chat with the bot based on the bot name, and the bot will respond to commands issued from this user.

Thanks to GoldXT for assistance with identifying this issue.

To Reproduce
Steps to reproduce the behavior:

  1. Run your instance of Wing Commander.
  2. Have another Telegram user start a private chat with your bot (based on the bot name)
  3. Have the other user issue one of the commands to the bot.

Expected behavior
The bot MUST ignore all messages and commands from Telegram users who are not configured as the Admin (owner) of the bot instance within the config.toml file.

Prevent starting multiple instances

Is your feature request related to a problem? Please describe.
Its currently possible for any number of instances of the Bot application (wcbot) to be run on the same machine - however there is no point and this has caused confusion with some users.

Describe the solution you'd like
The Bot (wcbot) should detect if another instance is already present and running on the same machine and inform the user with a helpful message. The second instance should not start.

Bootstrap (initial install) script

Is your feature request related to a problem? Please describe.
While there is a lot of doco covering the steps needed to install Wing Commander for the first time, the process, especially for less technical users, can be difficult at times and because of the many commands that need to be entered on the command line - it can also be error prone.

Describe the solution you'd like
Create a simple, one-step, bootstrap installation script. The script can then be downloaded by a new user to the target system and run. The Script should then check for all dependencies (such as Go, etc) before trying to download and install Wing Commander from the current source on GitHub.

Autostart script

Is your feature request related to a problem? Please describe.
If the Bot app fails for any reason or if the Node needs to be restarted, users must manually restart it from a terminal session command line.

Describe the solution you'd like
An autostart script would avoid the need for users to access the Manager Node to restart the Wing Commander bot manually if the Pi was restarted.

The Skywire project has a similar script for bringing up the Manager and Nodes on boot. This same concept should be used to start Wing Commander.

Describe alternatives you've considered
Manual restart using the commands provided in the doco is the only alternative at this point.

Configuration Readme Spelling Errors

Spelling Errors in the Configuration Readme

cd ~
mkdir .wincommander
cd .wingcommander
cp $GOPATH/src/github.com/BigOokie/skywire-wing-commander/src/wcbot/config.example.toml ~/.wingommander/config.toml

Expected behavior

It should read

cd ~
mkdir .wingcommander
cd .wingcommander
cp $GOPATH/src/github.com/BigOokie/skywire-wing-commander/src/wcbot/config.example.toml ~/.wingcommander/config.toml

Bot App crashes on official Skyminer

There is a known issue in the v0.0.1 (alpha) release which results in the Bot app crashing in startup on an Official Skywire miner.

The issue relates the location of a file that is referenced by the Bot app - the location of which is different for an Official miner as opposed to a DIY.

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.