Posted 01 December 2014 - 09:33 PM
Hello,
I am trying to set up a machine monitoring system on my private server so I can see which machines are running, how they get activated and much more.
At the moment I have three programs running in this network (look at the picture):
The main computer (left), the satellite (top, a normal computer) and a computer at my tree farm (ignore the nuclear reactor to the left of the tree farm for now).
These are my codes:
tree farm: http://pastebin.com/26eMyWnD
main computer: http://pastebin.com/50a17fDi
satellite: http://pastebin.com/6KhzskVM
What the programs should do is:
Control the tree farm (and other machines when it works) from any computer in the network by sending "Tree.true/false" via modem to the satellite which will send it to the tree farm. The tree farm should be turned on/off and send information about it back to the satellite and from the satellite to the monitoring computer which lists the information.
The tree farm also sends information about how it was (de-)activated (Redstone or Network/Computer).
My problem is that when I activate my tree farm with modem.transmit(101, 100, "Tree.true") (or deactivate it with "Tree.false") it turns on/off but doesn't send information back to the main computer.
When activating/deactivating the tree farm with redstone (attached to the front of the computer at the tree farm), everything works fine.
If you take a look at the picture you can see which computer uses which port. Red line is the command route, Green line is the information route.
What I noticed is that the problem should be in this code:
If you have any questions regarding this, I will answer them :)/>
I have no idea where I made the mistake, maybe I'm just blind but I tried different changes for hours already.
I am trying to set up a machine monitoring system on my private server so I can see which machines are running, how they get activated and much more.
At the moment I have three programs running in this network (look at the picture):
The main computer (left), the satellite (top, a normal computer) and a computer at my tree farm (ignore the nuclear reactor to the left of the tree farm for now).
These are my codes:
tree farm: http://pastebin.com/26eMyWnD
main computer: http://pastebin.com/50a17fDi
satellite: http://pastebin.com/6KhzskVM
What the programs should do is:
Control the tree farm (and other machines when it works) from any computer in the network by sending "Tree.true/false" via modem to the satellite which will send it to the tree farm. The tree farm should be turned on/off and send information about it back to the satellite and from the satellite to the monitoring computer which lists the information.
The tree farm also sends information about how it was (de-)activated (Redstone or Network/Computer).
My problem is that when I activate my tree farm with modem.transmit(101, 100, "Tree.true") (or deactivate it with "Tree.false") it turns on/off but doesn't send information back to the main computer.
When activating/deactivating the tree farm with redstone (attached to the front of the computer at the tree farm), everything works fine.
If you take a look at the picture you can see which computer uses which port. Red line is the command route, Green line is the information route.
What I noticed is that the problem should be in this code:
function control()
rs.setOutput("right", Info["rs"])
Message = textutils.serialize(Info)
modem.transmit(PortOut, PortIn, Message)
Time = textutils.formatTime(os.time(), true)
Day = os.day()
print(Day.." - "..Time.." - "..Message)
end
It prints the Message but it is not sent to/not received by the satellite.If you have any questions regarding this, I will answer them :)/>
I have no idea where I made the mistake, maybe I'm just blind but I tried different changes for hours already.