Jump to content




[MC 1.2.5] - [CC 1.33] ccSensors [SMP/SSP]

peripheral java lua

  • This topic is locked This topic is locked
454 replies to this topic

#261 yoskaz01

    Featured on Reddit!

  • New Members
  • 92 posts

Posted 24 June 2012 - 06:03 PM

sorry, was pre-occupied as well lately...:P/>
was looking at this issue - .. i'm probably missing something

Cloudy, i'll be on IRC tomorrow.

#262 LucasUK

  • Members
  • 64 posts

Posted 25 June 2012 - 12:39 PM

Hi Guys, this mod is awesome. Just registered to say how great it is although I can only use 1 sensor / frequency currently (SMP) due to the issues described by Fostenal.

However I can see the potential, it makes CC like 1000X more useful, please fix this as its killer :P/>

One more thing, I Spent ages thinking it wasnt setup as I couldnt find the ccSensors folder on my CC computer, maybe add a comment for people (who think they know best) where you say to run: /ccSensors/console
That this folder is only present when controller is next to PC. I was checking it was setup right and wanted to see it and watch it error if i ran the app.

Cheers!!

#263 blipman17

  • Members
  • 92 posts

Posted 25 June 2012 - 08:24 PM

hello, i'm having difficulties to find the api and get it working.
i think i found it but i'm not shure.
can you help me, and can you post the filediretory in windows, mac or whatever on the first post of this forum.
i think iit would save mutch people a lot of stress.
and if i actually found it, am i allowed to write my own api and publish it?
i think that the file i just found is a bit complicated.

#264 mrgreaper

  • Members
  • 88 posts

Posted 25 June 2012 - 10:10 PM

This does seem like exactly what im after but i wanted to find something out, i cant test it for myself at mo as im at work.


ok my planed set up that i want to read

in the bottom of my base 4 mfsu power storage devices, 1 large tank of oil (30 blocks high) 1 large tank of fuel (30 blocks high)

ok so in the top of my base will be a computer room, along with a big monitor, on the monitor i want it to display like so

Power: Oil xx%
1) xx eus fuel xx%
2) xx eus
3) xx eus
4) xx eus

where the power is the eus in each mfsu oil and fuel is the percentage of capacity of the big tanks

i havent been near computer craft in months so im rusty at lua but im sure i can figure out (or find) how to print to a monitor so ignore the flaws in the next section for now (unless your feeling very kind)


function stats()
REM get the details from the sensors ?? guessing at mo
mfsua == sensor.1
mfsub == sensor.2
mfsuc == sensor.3
mfsud == sensor.4
oilcap == sensor.5
oilact == sensor.6
fuelcap == sensor.7
fuelact == sensor.8
REM im guesing you need to set one sensor to detact the capacity of a tank stack and one to detect contents ?
oil == (oilact/oilcap)*100
fuel == (fuelact/fuelcap)*100
term.redirect(top)
term.clear
print("Power:					 Oil "),oil,("% ")
print("1) "),mfsua,(" eus				  fuel "),fuel,("%")
print("2) "),mfsub,(" eus ")
print("3) "),mfsuc,(" eus ")
print("4) "),mfsud,(" eus")
wait(5)
rem wait 5 secs to not overload it
stats()
rem the only way out is to shut down the computer..im ok with that

ok im willing to bet theres syntex errors with the other stuff etc but dont worry about that unless your feeling very kind as im sure searching this forum will help with them, what i really need to know is have i got recieving the data from the sensors right?

i know i have to put id cards in each and have a sensor controller hooked into the computer, but so long as i name them sensor.1 etc will i be able to get the data from the sensor or do i need to specify in the program what data im grabbing

MODS: my laptop hicuped while typing this and it apears its posted multiple times please delete the ones below this, sorry about that, it wasnt intentional.

#265 mrgreaper

  • Members
  • 88 posts

Posted 25 June 2012 - 10:10 PM

delete me

#266 blipman17

  • Members
  • 92 posts

Posted 26 June 2012 - 05:55 AM

View Postmrgreaper, on 25 June 2012 - 10:10 PM, said:

delete me
can't jou just delete your own post?

#267 mrgreaper

  • Members
  • 88 posts

Posted 26 June 2012 - 05:52 PM

View Postblipman17, on 26 June 2012 - 05:55 AM, said:

View Postmrgreaper, on 25 June 2012 - 10:10 PM, said:

delete me
can't jou just delete your own post?

nope :P/> the best i could do was edit it down

any help with reading sensors? i didnt get a chance to try it after work and im back at work now :)/>

#268 blipman17

  • Members
  • 92 posts

Posted 26 June 2012 - 07:29 PM

View Postmrgreaper, on 26 June 2012 - 05:52 PM, said:

View Postblipman17, on 26 June 2012 - 05:55 AM, said:

View Postmrgreaper, on 25 June 2012 - 10:10 PM, said:

delete me
can't jou just delete your own post?

nope :P/> the best i could do was edit it down

any help with reading sensors? i didnt get a chance to try it after work and im back at work now :)/>
nope, i'm also struggeling with it.
i'm trying to make an api for it, but i need to know the original ccsensors api file first.
probably i alredy found it and tossed it in a can or searged further or something like that.
but does anyone know where to find the functions?

#269 LucasUK

  • Members
  • 64 posts

Posted 29 June 2012 - 06:00 PM

Is the API not one of the files in here: http://goo.gl/SD92A

From the OP.

Keep up good work and fix SMP sensors controller please :P/> :)/> B)/>

Diamonds all round

#270 Yurameki

  • Members
  • 25 posts

Posted 30 June 2012 - 05:30 AM

is there still no bukkit option? :P/> I really want this on my server

#271 musznik

  • Members
  • 8 posts

Posted 30 June 2012 - 07:14 PM

Strange server incompatibility with Mystcraft @ FORGE 3.3.7/3.3.8 (another 20mods working fine: RP,IC,BC,RC,Forestry itp, but only ccS crashes the server)

[FINER] Pre-initializing .../ccSensors-server-MC125-B017pr2
[FINE] Reading existing configuration file for mod_ccSensors : mod_ccSensors.cfg
[FINE] Configuration for mod_ccSensors written to mod_ccSensors.cfg
[SEVERE] Unexpected exception
java.lang.StackOverflowError
at java.lang.Integer.valueOf(Unknown Source)
at forge.DimensionManager.getWorld(DimensionManager.java:53)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:741)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:743)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:743)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
at net.minecraft.server.MinecraftServer.a(MinecraftServer.java:743)
at net.minecraft.server.MinecraftServer.initDimension(MinecraftServer.java:689)
...
...


#272 Fokka

  • New Members
  • 16 posts

Posted 01 July 2012 - 05:32 PM

Hi all,

I want to create an new Script that shows some Informations at a single page without the need to switch between targets, they should all predefined.

Current Reactor Heat
Current Reactor Output
EU Storage
Bluealloypower Chargepower
Bluealloypower Storage
Buildcraft Engine States
Buildcraft Liquid Tank Status
Buildcraft Pumps


I started to make a simple script that shows only Reactor current heat and output.


os.loadAPI("/rom/apis/sensors")
os.loadAPI("/rom/apis/sensorsUI")
local sensor="Reactortest"
local side = sensors.getController()
local sSide = "left"
local targets = sensors.getAvailableTargetsforProbe(side,sensor,"Reactor")
local e = sensorsData.getProbe("ic2","reactor")
local reactor = sensors.getSensorReadingAsDict(side,sensor,targets[1],"Reactor")
local Out=reactor.output
local Heat=reactor.heat
print ("Current Heat: " ..Heat)
print ("Output: " ..Out)
sleep (0.1)

and


os.loadAPI("/rom/apis/sensors")
os.loadAPI("/rom/apis/sensorsUI")
local sensor="Reactortest"
local side = sensors.getController()
local sSide = "left"
local targets = sensors.getAvailableTargetsforProbe(side,sensor,"Reactor")
local e = sensorsData.getProbe("ic2","reactor")
local reactor = sensors.getSensorReadingAsDict(side,sensor,targets[1],"Reactor")
local Out=reactor[e.energy.val]
local Heat=reactor[e.heat.val]
print ("Current Heat: " ..Heat)
print ("Output: " ..Out)
sleep (0.1)

But i only get Errors...

test2:15: attempt to concatenate string and nil

Means it has no Values to Print because there are none ?

And has someone a "list" with all functions to display the other things i want ?

#273 KevinW1998

  • Members
  • 93 posts
  • LocationAustria(German)

Posted 02 July 2012 - 02:01 PM

Use this:
local Out=reactor['output']
local Heat=reactor['heat']
You don't need to get a Probe if you know what you're looking for!
LG Kevin

PS: I can't wait to use the ccSensors in SMP so I hope it will be fixed soon ^^

#274 Cerulan

  • New Members
  • 6 posts

Posted 03 July 2012 - 01:26 PM

Still no bukkit support yet? This would really be amazing on my tekkit server. I would try to port it myself, but I can't stand MCP.

#275 Deathknight0897

  • New Members
  • 95 posts

Posted 05 July 2012 - 12:29 PM

1 quick question does this work on tekkit yet and are you planning on make it compatible

#276 JadarMC

  • New Members
  • 8 posts

Posted 05 July 2012 - 01:12 PM

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

#277 Fokka

  • New Members
  • 16 posts

Posted 05 July 2012 - 02:27 PM

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work

#278 Deathknight0897

  • New Members
  • 95 posts

Posted 05 July 2012 - 04:40 PM

awesome

View PostFokka, on 05 July 2012 - 02:27 PM, said:

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work


#279 JadarMC

  • New Members
  • 8 posts

Posted 05 July 2012 - 10:45 PM

View PostDeathknight0897, on 05 July 2012 - 04:40 PM, said:

awesome

View PostFokka, on 05 July 2012 - 02:27 PM, said:

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work


Ditto on tekkit..


View PostFokka, on 05 July 2012 - 02:27 PM, said:

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work

Do you know how to get data from sensors? I can't figure out, or find any API calls or anything.. I hope it is as easy as something like

local data = sensors.getData()

Or something along those lines.. xD

#280 Cerulan

  • New Members
  • 6 posts

Posted 06 July 2012 - 06:10 PM

View PostJadarMC, on 05 July 2012 - 10:45 PM, said:

View PostDeathknight0897, on 05 July 2012 - 04:40 PM, said:

awesome

View PostFokka, on 05 July 2012 - 02:27 PM, said:

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work


Ditto on tekkit..


View PostFokka, on 05 July 2012 - 02:27 PM, said:

View PostDeathknight0897, on 05 July 2012 - 12:29 PM, said:

1 quick question does this work on tekkit yet and are you planning on make it compatible

I run it on Tekkit, is working so far


View PostJadarMC, on 05 July 2012 - 01:12 PM, said:

Hey guys, I'm confused on how to use this, (still freaking awesome), because I can't find an API reference, and the console program doesn't have comments explaining it.. Could someone please explain the basics of ccSensors to me? (Pretty much already know LUA...)

Thanks!

Im looking for the same too, i can run some things but the most doesn't work


Tekkit Server? I can run it SSP





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users