Skill name: network-diagnostic-skill
As a user I want this Skill to make some basic network tests, so I can understand why sometimes mycroft is not working. At the moment just says:
I’m having trouble communicating with the Mycroft servers.
Please wait few minutes before trying to speak to me.
But the user really doesn’t know what’s happening. This skill will do some basic network test to determine if the problem is related to the user environment or is a problem on the Mycroft backend.
On the user-side, this skill must make the following test.
- Check if the device has an IP (and note if it is the wlan or eth0)
- If the former test passes, then it will check if the device has a default GW and is reachable (ping)
- If the former test passes, then it will scan for other devices on the LAN and will ping them
- If the former test passes, then it will check if the device has set at least one DNS and are reachable (ping and port 53), ping also 220.127.116.11
- If the former test passes, then it will ping somewhere on the Net with 99,99999% uptime (google.com)
- If the former test passes, then it will ping mycroft services (api.mycroft.ai, etc)
Once ALL THE TEST on the user-side are OK, then the skill should do some other simple test onmthe backend side, it should do a simple test to check the different services (api, market, mimic2, etc) and determine if they are working properly.
After the test, Mycroft should give a detailed answer to the user if it founded an error on the user side or if it is a backend problem, tell the user that the problem has been reported to Mycroft AI.
Are there similar Mycroft Skills already?
None as far as I know.
What will the user Speak to trigger the Skill?
Mycroft: I’m having trouble communicating with the Mycroft servers. Do you want me to determine what’s happening?
What phrases will Mycroft Speak?
If the skill found some trouble on the user-side:
- Check failed to see if the device has an IP
I don’t have a network IP address set, please check connectivity, and if your other devices are connected to the internet, please re-run Mycroft connection Wizard
- If it has an IP but there are some problems with the default GW
I cannot reach your default GW on 192.168.X.X but I can reach other devices on the Local Area Network, so if your other devices can reach Internet and I’m the only one who can’t, restart both the router and me
I can see more devices connected to the Local Area Network but I cannot reach any of them, check the cable (if Mycroft is connected via eth) or restart me and the router if you can’t reach the internet with any other of your devices (if it’s connected via wlan)
- I the former test passes, check if the device has set at least one DNS and are reachable (ping and port 53)
I don’t have any DNS set, do you want to use a working one and repeat the tests? (Saying yes, Mycroft will use a 99,999999% uptime DNS servers (Google, OpenDNS, etc)
I cannot reach the DNS X.X.X.X, do you want me to put a working one from Google?
I cannot reach ANY DNS, nor local neither on the NET, if I’m the only device on the Local Area Network which can’t, please restart me and run the wizard once again, if any device can’t reach the Internet, restart the router and the ONT. If the problem persists, please call your ISP provider
- Ping somewhere on the Net with 99,99999% uptime (google.com)
I cannot reach Internet. if I’m the only device on the Local Area Network which can’t, please restart me and run the wizard once again, if any device can’t reach the Internet, restart the router and the ONT. If the problem persists, please call your ISP provider
- Ping mycroft services (api.mycroft.ai, etc)
It seems there are a problem with Mycroft Servers, I’m going to reporting them right now. Please wait few minutes before trying to speak to me
If it did found problems on the backend side:
I found some problems related to the backend, let me report directly to the Mycroft Support! (And it will send a notification to Mycroft SysOps with a detailed report.
If it didn’t found any problem:
Network seems good so far, I can reach the internet and Mycroft services, and they seem working as expected
What Skill Settings will this Skill need to store?
It can store all the results of the user-side tests (IP, GW, DNS) just to do the steps one by one. The only data it will send to Mycroft are the detailed reports when backend services are reachable (via ping) but when testing via API gave some errors.
The skill will make the test one by one, sequentially, and when it found an error, it won’t try the next one test and will report the user immediately. This skill can be expanded on the future with more extensive test and it could even, if it finds an ISP problem, give you their support phone number or something more cool.