Space Engineers

Space Engineers

Smart Solar Panels
27 Comments
Wowy 19 Nov, 2016 @ 5:03am 
i doesnt work for me :/
Schventagon 15 Feb, 2016 @ 1:02pm 
Hey Bilky, I've had trouble gettin gyour script to work. I'm running it with the Powerfix mod and the Freya Battery Management script. I have the rotor that "rolls" my panel sheet named "Rotor Solar" and the screen it's supposed to display on as "LCD Power" with my sunrise angle set at 70 degrees. The code checks out...am I missing a step?
sybersmoke 5 Dec, 2015 @ 7:01pm 
Any plans to adapt your system to allow a T design? So a left and right side rotor?
Damadark 4 Dec, 2015 @ 8:41am 
Nilky thank you for the script. been having not so much fun to maintain power since I am on a very hard start so slowly building up on solar panels. I have 1 issue however. My rotor is reversed so I need it to go 0 to -180. where can I change it so it tilts the right direction? Is it in the code line rotor.SetValueFloat("UpperLimit", 179.9f);. plus you mention to set the direction of the rotor tilt but I can't locate that.
Digital_Samurai 4 Dec, 2015 @ 6:56am 
Can I share my world to you so you can take a look at my setup? I think I did something wrong and have checked several times for it but keep missing it. (I do that a lot) sometimes it helps to have a second pair of eyes on it.
Golden Dragon 23 Nov, 2015 @ 11:45am 
This work on DS?
August_Grimm 22 Nov, 2015 @ 1:06pm 
I don't mess around with timer blocks ore scripts, could you provide more in-depth detail on how to set the timer block up?
Bilky  [author] 20 Nov, 2015 @ 1:38pm 
@Commander Shepard - just loaded it into a test world and it ran without any hiccups. Love the design dude, looks great! Those exception errors occur when the script is trying to access something that doesn't exist. It usually occurs when you've renamed a block to something different to what you've called it in the script... I'm gonna make a wild guess and say you may have renamed the rotor/lcd to match your naming convention and didn't match it up with the first page of the script maybe? =P
aaronlukemarshall 20 Nov, 2015 @ 9:43am 
When i load the game i run into an excpetion on the script, do you find this too?
Bilky  [author] 19 Nov, 2015 @ 1:35pm 
@Commander Shepard - Good news! Glad it works for you =P Just a heads up, I'll be adding in some error handling soon which will change the way you input values (all through the argument field with no scripting) so keep in mind that you'll need to set it up again at some point in the future (but it'll be super easy, I promise =P) I'm not too sure what a trigger pulse is, but if you mean a 60hz timer, it's supposed to run off that already! If you've only got it on a 1hz (1 second) timer it'll only trigger the solar rotational portion of the script every 20 seconds lol
aaronlukemarshall 19 Nov, 2015 @ 6:08am 
Thanks for that, i will publish soon, it works perfectly and no tweaking is required which is a double win. It works better when running on trigger pulses than 1 seconds timers.
Weso 19 Nov, 2015 @ 12:13am 
I tried it out. It looks like the session timer gets stuck on 1s or 2s, so I can't tell if it keeps doing it after that (maybe I messed something up in the timer block?). Also I'm not sure if I built the panels right. When you say to alight the rotor to 0, how should the panels be oriented - vertically or horizontally? I did it horizontally (90 and 270) and when I started the thing it spun around and ended up where it started, which doesn't look like the most efficient orientation. Will try re-placing the panels tomorrow, but in the meantime thanks for this!
Deewad 18 Nov, 2015 @ 1:08pm 
what is the timer block used for?
Softcore Trashtalk 18 Nov, 2015 @ 7:34am 
@Bilky sadly i dont think fixing that is high on keen's priority list :( which makes me sad because it's a very useful tool. I'm not 100% on the method but i do know there's a modded solar tracker block that works on dedicated servers, after much hounding of the owner of the one i play on it is now the only non-cosmetic mod on the server xD
ChilliConQueezo 18 Nov, 2015 @ 12:38am 
Nevermind.. Got it sorted ☺
ChilliConQueezo 17 Nov, 2015 @ 9:39pm 
Hey man, brilliant idea.
I can't get the script working though. I am a programing noob so Where exactly do I enter the names of the rotor and lcd?
Thanks
Bilky  [author] 17 Nov, 2015 @ 7:59pm 
@cold.fire - Yeah, two axis require too much stuffing around for my liking when I'm trying to set up a survival base =P given that, it should handle 45° orientation just fine (direction of sunrise is up to you, yay) but it will lose efficiency in the moring and evening.

@Commander Shepard - That's great! Just credit my work somewhere and I'm happy for you to include it. If you would like it modified a bit to specifically fit your blueprint let me know ;)

@phoenix & @Softcore Trashtalk - Unfortunately, it does not work on MP at the moment. I should update the title and description to reflect that! Currently, there's no reliable way to pull the output data other than through DetailedInfo =[ I was considering modifying the script for MP to use an oxygen farm for solar tracking as they have a GetOutput() function, but... well, you'd have to build an oxygen farm on your solar array and it would need an empty tank to fill, otherwise you'd get an output of 0...
Softcore Trashtalk 17 Nov, 2015 @ 7:22pm 
@phoenix easy way to check if it will work or not. load it into a programming block and see if it uses "panel.DetailedInfo.IndexOf" to call the output of the solar panels. if it does, it wont work on dedicated servers, if it doesn't, it should work as advertised. I'm not able to login to test it myself so i cant say for sure, though i do like the concept and the workaround it includes :P
phoenix 17 Nov, 2015 @ 6:53pm 
does this work on dedicated servers? me and a friend play on a private dedicated server, we have found similar scripts but none of them seem to work on dedicated servers for some reason?
aaronlukemarshall 17 Nov, 2015 @ 4:03pm 
Can i publish a blueprint that use your script. Thanks
cold.fire 17 Nov, 2015 @ 3:02pm 
This looks pretty cool! I tried setting up my own simple solar panel array on earth but I lack scripting knowledge, so I did it with a simple timer setup and a rotor turning very very slowly. Unfortunately I had an issue with the rotors acting up on me, possibly due to the fact that I had to use 2 rotors, one for horizontal rotation in order to point at the sun and then a second to turn the panels for tracking as it passed overhead.

Your design certainly has the automation I was looking for, but how does it handle situations when the sun is travelling in a 45 degree orientation from the station grid? Have you experienced issues with the rotors suddenly wildly vibrating and spinning around?

I do hope Keen adresses rotor issues soon, as tracking the sun seems like a very logical step to take in survival to maximize your power efficiency.
Bilky  [author] 17 Nov, 2015 @ 12:56pm 
@Commander Shepard @Commander Shepard
Haha I have not put up a blueprint yet. It's really just a 15ish-block tall 1x1 tower with a rotor stuck on the side and a staircase. Really, there's nothing fancy about it =P But I'll get it uploaded after work (~10 hours from this post) and put the link in the description for you guys
Bilky  [author] 17 Nov, 2015 @ 12:53pm 
@Sir Cluff Halbarté
I... I never even considered the poles. To be honest, I've never even visited the poles! I'll add a fix as soon as I have one piece of information... is there constant sun at the poles?
Delebre 17 Nov, 2015 @ 9:58am 
Yeah, post your tower blueprint! This would make your concept a lot easier to start up.
aaronlukemarshall 17 Nov, 2015 @ 8:36am 
have you got a blueprint for your tower?
Sir Cluff Halbarté 17 Nov, 2015 @ 8:30am 
how well does this work on the poles?