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

OC + Raspberry Pi 2

Recommended Posts

As we've seen in this topic: http://oc.cil.li/index.php?/topic/778-somebody-used-oc-to-control-a-lamp-in-real-life/ OC can communicate with the outside world! With enough coding it should be easy!

 

You'd just need an internet card on your in-game machine, and have the pi set up to recieve messages from the in-game computer.

 

However, we forget the blacklist:

 

blacklist=[
      "127.0.0.0/8",
      "10.0.0.0/8",
      "192.168.0.0/16",
      "172.16.0.0/12"
    ]
 
This means that you can't have the pi on the same local network unless you changed the blacklist to allow OC to use the local network (Be careful with this)
 
Besides that though? Completely possible!
Link to post
Share on other sites

thank you very much, I will be back in few years... ( playing with Lua and Python a bit )

 

my next question and example is:

 

lets say, Raspberry will have some sensors ( temperature, humidity bla bla bla ) and it will run some script...

 

is possible "to send something" to OC running on dedicated server, then display it?

 

most simple example would be temperature sensor in the garden...sending data to OC via Rasperry to be displayed in Minecraft world?

 

 

 

The idea is probably not interesting for 99.9% of people who play Minecraft, but, some of them have Rasperry and maybe they want to create something unique, maybe...

Link to post
Share on other sites

You could set up your router to make your RPi's "garden temperature service" port available over the internet, then you don't have to worry about modifying the blacklist. And you can get your garden temperature from any computer running on any server, not just from one in your LAN. Of course you'll have to live with the danger of people gaining access to highly personal information like the temperature in your garden. :P

 

As for how to implement it on the RPi side, you'd probably have some kind of Python HTTP server running, which would return the garden temperature on the URL http://weathermaster.example.net/garden/temp or something. Then you could easily query that using a simple HTTP request.

Link to post
Share on other sites

You could set up your router to make your RPi's "garden temperature service" port available over the internet, then you don't have to worry about modifying the blacklist. And you can get your garden temperature from any computer running on any server, not just from one in your LAN. Of course you'll have to live with the danger of people gaining access to highly personal information like the temperature in your garden. :P

 

As for how to implement it on the RPi side, you'd probably have some kind of Python HTTP server running, which would return the garden temperature on the URL http://weathermaster.example.net/garden/temp or something. Then you could easily query that using a simple HTTP request.

 

thats exactly what I was talking about, thank you very much for reply... I saw some scripts for raspberry on internet...

 

with relays and raspberry is possible to control everything ( almost ) :D

 

I found today geiger counter kit for raspberry, so finally I can place it in the garden too :D no more radioactive animals in the garden :D :D :D

 

It looks it will take probably weeks or months to complete this and any help will be nice.

Link to post
Share on other sites

You could set up your router to make your RPi's "garden temperature service" port available over the internet, then you don't have to worry about modifying the blacklist. And you can get your garden temperature from any computer running on any server, not just from one in your LAN. Of course you'll have to live with the danger of people gaining access to highly personal information like the temperature in your garden. :P

 

As for how to implement it on the RPi side, you'd probably have some kind of Python HTTP server running, which would return the garden temperature on the URL http://weathermaster.example.net/garden/temp or something. Then you could easily query that using a simple HTTP request.

 

I hadn't thought of that! It doesn't seem all that heavy in theory. But as we all know, theory is not much of anything in the eyes of actually doing something. Still, planning now will always work for us!

 

I can see that OC is about to be the 'driver' (Bad pun, I'm sorry) that utterly destroys Minecraft's fourth wall, and shall help us with amazing ideas, in-game, in real life, or both even now! I'll see what I can do to help too, although with my full plate, ideas are the most I can say for now.  :D

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.