kneckter / rotomonitor Goto Github PK
View Code? Open in Web Editor NEWRotomonitor is a simple discord bot to monitor device status for Rotom.
Rotomonitor is a simple discord bot to monitor device status for Rotom.
RDMMonitor could be scheduled to not reboot/check devices (use a separate config basically) during defined time period in the day. This could be useful in conjunction with DCM's device scheduler for questing and leveling with other backends.
Hello,
Tried running this for the first time, and wrote a Dockerfile & docker-compose for it. Building didn't raise issues, although starting the script gave me the output shown below:
[9/17/2022, 3:54:19 PM]Uncaught exception: {}
[9/17/2022, 3:54:19 PM]Unexpected error, bot stopping, likely websocket
[9/17/2022, 3:54:18 PM]Logging in Discord bot token
I will do a PR to make my Dockerfiles/compose available
Iโm using a basic auth dir my rotom dashboard, with that rdmmonitor is unable to connect to /api/status
Maybe a basic auth login could get implemented into the Rotommonitor version ?
When testing the new Rotom version of this when a device/worker goes offline and it attempts to start a reboot RDMMonitor crashes and restarts
The error that displays says
Uncaught exception {}
Restarting in 1 min
If I run a reboot command manually in a channel it works and sends the command to the listener and restarts the device
I'm running android with GCv3 don't know if this has anything to do with it
Problem: Instances are not being posted to Discord channel.
Error:
1|RDMMonitor | [1/23/2021, 9:31:41 PM]Beginning RDM query
1|RDMMonitor | [1/23/2021, 9:31:42 PM]Could not retrieve data from website: {Redacted large JSON of all leveling instances}
1|RDMMonitor | [1/23/2021, 9:31:36 PM]SyntaxError: Unexpected token i in JSON at position 283
1|RDMMonitor | [1/23/2021, 9:31:36 PM]Finished RDM query
1|RDMMonitor | [1/23/2021, 9:31:37 PM]Finished posting device status
Position 283 is at "time_left":inf
from a leveling instance in JSON
{"type":"Leveling","name":"L - Tokyo","status":[{"time_left":inf,"xp_current":0,"xp_target":2000000,"username":"AccountName","level":0,"xp_per_hour":0,"xp_start":0,"xp_percentage":0.0}
Reproduce: Create a leveling instance and add at least 1 device.
At the moment, reboot and reopen will handled by worker and not for the hole device.
This means that the commands are executed several times for the same device.
[12/8/2023, 4:12:11 PM]Sending reboot request for sn04_003 to remote listener
[12/8/2023, 4:12:11 PM]Sending reboot request for sn04_001 to remote listener
[12/8/2023, 4:12:11 PM]Sending reboot request for sn04_002 to remote listener
[12/8/2023, 4:12:12 PM]Beginning device query
[12/8/2023, 4:12:12 PM]Finished device query
[12/8/2023, 4:12:31 PM]Posting device summary
[12/8/2023, 4:12:32 PM]Finished posting device summary
[12/8/2023, 4:12:42 PM]Beginning device query
[12/8/2023, 4:12:42 PM]Finished device query
[12/8/2023, 4:13:11 PM]Sending reboot request for sn04_003 to remote listener
[12/8/2023, 4:13:11 PM]Sending reboot request for sn04_001 to remote listener
[12/8/2023, 4:13:11 PM]Sending reboot request for sn04_002 to remote listener
[12/8/2023, 4:13:12 PM]Beginning device query
[12/8/2023, 4:13:12 PM]Finished device query
[12/8/2023, 4:13:32 PM]Posting device summary
[12/8/2023, 4:13:32 PM]Finished posting device summary
[12/8/2023, 4:13:42 PM]Beginning device query
[12/8/2023, 4:13:42 PM]Finished device query
[12/8/2023, 4:14:11 PM]Sending reboot request for sn04_003 to remote listener
[12/8/2023, 4:14:11 PM]Sending reboot request for sn04_001 to remote listener
[12/8/2023, 4:14:11 PM]Sending reboot request for sn04_002 to remote listener
[12/8/2023, 4:14:12 PM]Beginning device query
[12/8/2023, 4:14:12 PM]Finished device query
[12/8/2023, 4:14:32 PM]Posting device summary
[12/8/2023, 4:14:33 PM]Finished posting device summary
[12/8/2023, 4:14:42 PM]Beginning device query
[12/8/2023, 4:14:42 PM]Finished device query
[12/8/2023, 4:15:11 PM]Sending reboot request for sn04_003 to remote listener
[12/8/2023, 4:15:11 PM]Sending reboot request for sn04_001 to remote listener
[12/8/2023, 4:15:11 PM]Sending reboot request for sn04_002 to remote listener
Noticed in this code you can specify reboot retries, but reopen only happens once. Sometimes ATVs need a few more reopens before trying a reboot.
The restart function works, but i have a device that sometimes even after a restart keeps stuck, i have then to manually reboot it with iphonecontroller.
Would a extra reboot function be possible.
Now we see that rdmmonitor sents the reboot function and then does not check or does it again until the device is back online by hand.
It would be nice if there is a check every 10 minutes, if device has not been online sent reboot command even if it was already done.
Have a .update
command to request that iPC or DCMRL run an update command on the local machine. Need to update those so they can run the command. Make the command configurable so people can tailor it to their system
As part of the list of commands, it would be nice if we could take a screenshot of a device and post that image to Discord.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.