Saddamo 3 Posted November 23, 2015 Share Posted November 23, 2015 Yo everybody... Just an idea... Is possible to "connect" OC and Raspberry Pi 2? Quote Link to post Share on other sites
DevonTheNovice 6 Posted November 23, 2015 Share Posted November 23, 2015 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! Quote Link to post Share on other sites
Saddamo 3 Posted November 23, 2015 Author Share Posted November 23, 2015 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... Quote Link to post Share on other sites
dgelessus 26 Posted November 23, 2015 Share Posted November 23, 2015 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. 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. Quote Link to post Share on other sites
Saddamo 3 Posted November 24, 2015 Author Share Posted November 24, 2015 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. 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 ) I found today geiger counter kit for raspberry, so finally I can place it in the garden too no more radioactive animals in the garden :D It looks it will take probably weeks or months to complete this and any help will be nice. Quote Link to post Share on other sites
DevonTheNovice 6 Posted November 24, 2015 Share Posted November 24, 2015 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. 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. Quote Link to post Share on other sites
Saddamo 3 Posted November 24, 2015 Author Share Posted November 24, 2015 good or funny idea is always best start Quote Link to post Share on other sites