Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Elijahlorden

StattenOS - Base control system

Recommended Posts

https://github.com/elijahlorden/StattenOS

This is a very early implementation of StattenOS, a networked base control system I am developing.

Installation instructions:

You will need a hard drive with an existing OpenOS install, and an internet card to access Pastebin. You will also need one tier 3.5 memory (at least) in order to run the installer.

Navigate to the root directory (which is just up one from the default OpenOS directory) and run the following commands:

pastebin get fNQ4EUTg InstallData

pastebin get uZhxkJLt Installer

The first file may take a moment to download, as it is rather large.

After both of them have downloaded, type 'Installer' into the prompt and wait.  (If you get a 'too long without yielding' error, please report it in this thread)

Once the installation has finished, power the computer off and on again, and it should now boot into StattenOS.  (Currently, if no network card is installed, it will crash)

 

Purpose:

The purpose of StattenOS is to allow a player to automate parts of their base, and then access those parts from anywhere, at any time.  Any device on the network can run a command on any other device, and receive feedback.  Devices can also broadcast notifications across the network to alert the player if something happens while they are out around.  If the OS is updated and you install the update on the central server, you can send the update to all networked devices, you can also create a new StattenOS install from any existing StattenOS install.

Devices currently supported:

SGCraft Stargates - Allow Tablets to wirelessly dial Stargates, and save addresses to the server which are then replicated to other tablets on the network.

Mekanism Fusion Reactors - Allow automated charging and firing of the ignition laser, as well as checking status and a notification if, for whatever reason, the reactor deactivates.

 

StattenOS will load device-specific settings and commands based on what 'Device Driver' it has been set to.  You can use the command 'listDeviceDrivers' to print out a list of these.  In order for the network to function correctly, at least one device must use the 'Server' driver.

StattenOS can also compile task-specific lightweight versions of itself called 'miniApps'.  Currenttly there are two of these:

GCont - Simple gate control program which works with the dialGate and closeGate commands in the Tablet driver.

LRelay - A relay for sending/receiving packets via linked cards.  The primary purpose of this is to allow Tablets a network connection no matter where they are.  (I couldn't get Linked Cards to function properly when placed in Relays)

In order to install one of these apps, insert a floppy disk (I generally use a Floppy disk for these, but you can use a hard drive aswell) into a computer with a StattenOS install, and note the assigned drive letter (Drive A will always be the drive where the StattenOS install is located) and use the command 'installMiniApp driveLetter appName' to install the application on the disk.  The disk can then be removed and placed in another computer.  If a StattenOS update also updates one of the miniApps, you can simply insert the disk and it will automatically be wiped and updated with the new version of the app. (as long as you do not change the label)

 

 

 

 

More information will come later.

 

 

 

 

 

 

 

Link to post
Share on other sites

The simplicity is intentional, I prefer to be rather utilitarian with my code.  The system IS very network-oriented.  The goal is to be able to access any device on the network from any other device on the network.  The eventual point of this project is a system which will allow me to control various aspects of my base from anywhere (this is accomplished by using linked cards in the control tablets).  Currently I am going to be focusing mostly on utility.  The first useful function the system will perform is SGCraft related.  I know there are already plenty of gate control systems out there, but mine will have a few additional functions.  All saved addresses are stored on the server, the tablets only keep a cache of this kind of information.  Any change to the registered gates will automatically be replicated to other tablets.  This means large groups of players won't have to manually share any newly created gates.  The gates directly connected to the network will of course have Iris automation.  Long story short, this project aims to centralize things that you would normally create isolated systems for.

Link to post
Share on other sites
On 20.4.2017 at 8:32 AM, Elijahlorden said:

All saved addresses are stored on the server, the tablets only keep a cache of this kind of information.  Any change to the registered gates will automatically be replicated to other tablets.  This means large groups of players won't have to manually share any newly created gates.

My stargate control program shares new addresses automatically too but my approach is a bit different it is decentralized instead of centralized.

 

How do you even get the OS to an ingame computer for testing? Do you have an installer?

Could you explain how to use this OS?

Link to post
Share on other sites

The first OS install will have to be done on top of an existing OpenOS install, which will be erased and replaced with StattenOS.  The OS has a command you can use to install copies of itself to another drive.  Additionally, if you update the OS on the central server, you can use the sendUpdate command to compile and send a copy of the new OS files to every device on the network, which means you don't need to go to every device and update it individually.

Link to post
Share on other sites

https://github.com/elijahlorden/StattenOS-Installer

You can get the installer files from here for now.  use wget to close the Installer and InstallData files to files of the same names in the root directory of an existing OpenOS install (not the OpenOS floppy).  Next, run the installer and power cycle the computer once it has completed.  I will add instructions to the initial post (including the wget commands for copy/paste).

Link to post
Share on other sites

I tried it now and it stops at "InstallData read into memory, decoing..."

edit:
btw pastebin run mH1ymDs3

It was not enough memory. I had two 1,5 memory now I switched it to two 3,5 memory and I'm getting "too long without yielding".
Why do you have to press a key just to be able to input a command again?

And I don't really understand what I can do with this OS.

 

I found some bugs.

nuJ1vxo.png

wFh2pjT.png

rOMcdSh.png

WcVKply.png

 

I think its highly unlikly that it removes those on every start.
FyrNUV4.png

 

This was a bit confusing. I thought it was still loading.
qjlKPXF.png

Link to post
Share on other sites

Wow.  Ok then.  The OS is heavily network-oriented.  It's written so any device can run a command on any other device in the network.  The reason for having to press a key to bring up the prompt is because running one of these commands from the network will mess up the prompt if it is open.  listComponentMethods takes an address, if you look at the arguments listed in 'help listComponentMethods' (I can allow it to look for components by primary if it does not find one by address).  The shutdown/reboot command errors are legit, it's happening because the command does not for the case where a device-specific module (I call these 'Drivers') is not actually loaded (this happens by default since the device is set to 'Default', which does not load a file from /Drivers/.  I forgot to remove some testcode which compiled the installer/InstallData files on boot, which is why it says it's removing them every time it starts (it's also why you see the OS packaging itself every time it starts).

Link to post
Share on other sites

OK, this OS worths watching. Your system sounds interesting and I'm really looking forward you adding other modules.

Just out of curiosity, how much can Statten "talk" with wireless network cards? I tried it (I usually use wireless cards in tablets), and although I was able to distribute update, ping was not able to see tablet.

EDIT: Also, could be possible to add autocomplete feature like in OpenOS?

EDIT2: (Moved to edit3)

EDIT3: To first question, I have kinda mixed results when it comes to wireless cards. I can do sys-update over it, and control GConts, but I can't do Gate database modifications, those can be done only over linked card. Also, ping often detects nothing for some reason.

PS. If anyone wonders, why I'm throwing literal tide of edits, it's because I'm finding questions as I play with StattenOS, and most forums hates multiposting.

Edited by Toskin
Link to post
Share on other sites
17 minutes ago, BrisingrAerowing said:

This is actually really cool. I may mess with creating some additional drivers for this later (e.g. for Power Management [Extreme Reactors / Draconic Evolution / RFTools / etc], Fluid / Inventory management [Refined Storage / Pressure Pipes / Inventory Controller / Tank Controller / etc], and automated farming [Robots?]).

If you do end up creating additional drivers, let me know.  I would love to include them!

Link to post
Share on other sites

It may be a while. I am still trying to find a 1.12 Biomes O' Plenty seed that I like. I usually end up spawning on a tiny island in the middle of a giant ocean, with no major landmasses for miles. The times I don't there are usually mostly ugly biomes near spawn (Wastelands being a major one. Too much fog that can't be removed [at least I haven't figured out how to do it]).

Edited by BrisingrAerowing
Missed a word :derp:
Link to post
Share on other sites
7 hours ago, Elijahlorden said:

I designed the tablet driver with the intention of using linked cards.  I find wireless networks in OC to be unreliable, especially where the tablet is concerned.  I can add an option to toggle the use of wireless cards in responding to a ping and accessing the gateRegistry, though.

I've used wireless network cards and haven't noticed that they are unreliable.

Do you know about this?

Quote

The higher the strength the more energy is required to send the message. The strength is equivalent to the distance the message can travel. The hardness of blocks in the path is subtracted from the strength. Some randomness is applied to the strength.

Link to post
Share on other sites
16 hours ago, Nexarius said:

I've used wireless network cards and haven't noticed that they are unreliable.

Do you know about this?

Yes, I did know about that.  If you look at the code in the network module you will see that I set the card's strength to max before sending a packet.  I have also found on several occasions that wireless packets are sporadically not received when sent from the same location.  I've had this happen multiple times when, for instance, dialing a gate ~10 blocks away from the receiving computer with one layer of bocks separating the broadcast and reception points.  While it only happens sometimes, it is annoying enough for me to not use wireless networks if I am not required to.

 

 

Link to post
Share on other sites

I am currently working on the OS again, and will look at the installer once I have finished the rather large amount of refactoring I have started on the network code  (I found a huge optimization which should stop issues I was having with the computers locking up during times of high network traffic).  What version of OpenComputers are you using?  For now, if you would like to install the operating system to use it, you can always manually place the files in a filesystem (world/OpenComputers/FilesystemUUID).  To do this the filesystem must have been initialized (either install OpenOS or mount it to a computer running OpenOS and edit a file onto it).

Link to post
Share on other sites

My computer isn't picking up my fusion reactor. Where should I connect it, and where should I put the rest of my adapters in order to manage my reactor? I put the adapter on the logic port and it shows up as a component in the computer, but I can't use any commands that only involve the reactor because it says there is no reactor interface connected. I'm not very good with Opencomputers, so sorry if I missed something.

Link to post
Share on other sites

The Fusion Reactor is composed of five components.  You can view these using the 'listCompAddresses' command on a StattenOS install set to the Fusion Reactor driver. The command will list the name of each device, what block it is, and what it should be connected to.  Use the 'setCompAddress [name] [UUID]' command to register a component specified with the name parameter to the UUID (will accept shortened UUID string) provided with the UUID parameter.  

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.