my minecraft smart home
play

My Minecraft Smart Home Internet of Uncanny Things Sascha Wolter - PowerPoint PPT Presentation

My Minecraft Smart Home Internet of Uncanny Things Sascha Wolter @saschawolter January 2017 Source: Mattel's Barbie Hello Dreamhouse, via https://youtu.be/lgax5y7hVpc Speed kills! In 1830 people thought, your brain stops working travelling


  1. My Minecraft Smart Home Internet of Uncanny Things Sascha Wolter @saschawolter January 2017 Source: Mattel's Barbie Hello Dreamhouse, via https://youtu.be/lgax5y7hVpc

  2. Speed kills! In 1830 people thought, your brain stops working travelling more than 20 mph . And anyone going at more than 30 mph would have all air sucked out of them and would suffocate to death . Source:Tony Robinson's Weird World of Wonders! British

  3. Internet of (Important) Things 1967 1982 Image: https://en.wikipedia.org/wiki/File:RegVarneyATM.jpg, https://www.ucc.asn.au/services/drink.ucc

  4. 100 billion connections will be generated and 2 million new sensors will be deployed every hour by 2025 (Huawei)

  5. Progressive Thinkers Worriers Antagonists Today's Smart Home solutions are not good enough for a mainstream market . These solutions are well suited to early adopters, but have so far failed to attract mainstream buyers. (see VisionMobile “The Smart Home Landscape 2015”) Regular Users don’t Rule the Tech!

  6. Value Proposition! Image: Electrolux presents Screenfridge 1999, http://www.electroluxgroup.com/en/history-1990-1999-764/

  7. Image: New York, ca. 1900 (http://ethw.org/Archives:Edison_Electric_Light_Sign/Ad)

  8. Image: Sascha Wolter

  9. Conversational User Experience Google Home: Okay Google… Amazon Echo: Alexa… LingLong DingDong : DingDong DingDong …

  10. Internet of Uncanny Things Uncanny Valley of Anticipation Source: MGM Child's Play (The Lakeshore Strangler), Vivid My friend Cayla

  11. Worlds of Wonder's Julie doll (1987), which children could train to respond to their voice. Speech Recognition Source: https://youtu.be/UkU9SbIictc

  12. Source: Boris Adryan, 2015-10-20, http://iot.ghost.io/is-it-all-machine-learning/

  13. Gender, Age and Mood Voice and Facial Recognition Source: http://www.jre-water.com/Suica/index.html

  14. Start doing a smattering of REST with SSE See also http://appinventor.mit.edu/

  15. Minecraft 101 Good to know Cheats via t-Key • See http://minecraft.gamepedia.com/ • /help • Several Versions • /weather clear • Pocket Edition (PE, e.g. Android, HoloLens), Pi • /weather rain Edition, Console Edition (e.g. Xbox, PlayStation), Education, etc. • /time set day • Samples and code in this presentation is • /time set night based on Minecraft 1.8.9 • /gamemode creative • Gamemodes • /gamerule doDaylightCycle false • Survival • /tp Player x y z • Creative (to ignore recipes) • Inventory and Recipes Inventory via e-Key • Redstones 1 st -Person via Mouse and AWSD-Keys • …

  16. Start doing a smattering of REST with SSE see also Project Malmo (http://research.microsoft.com/en-US/groups/mip-ai/default.aspx)

  17. Minecraft Forge: Simple Modding Bare minimum Get the Minecraft Forge Mod Development Kit (MDK) from http://files.minecraftforge.net/

  18. Java and Minecraft Forge: Setup and Lifecycle main @Mod(modid = SmartHomeMod. MODID , version = SmartHomeMod. VERSION ) public class SmartHomeMod { public static final String MODID = "smarthomemod"; public static final String VERSION = "0.1"; // Happens as #1 right before Minecraft loads. Used for most registration. @EventHandler public void preInit(FMLPreInitializationEvent event) {} Lifecycle Event-Subscriber, // Happens as #2 when Minecraft loads. Items, and Blocks @EventHandler public void init(FMLInitializationEvent event) {} Resources // Happens #3 when World generators and alike are loaded. @EventHandler public void postInit(FMLPostInitializationEvent event) {} // Happens #4 right before starting the server. @EventHandler public void registerCommands(FMLServerStartingEvent event) {} Commands }

  19. Minecraft Forge: Simple Command public class HelloCommand extends CommandBase { Command Name public static final String COMMAND_NAME = "hello"; @Override public String getCommandName() { return COMMAND_NAME; } @Override public String getCommandUsage(ICommandSender sender) { Command Help return String. format("/%s <name>", COMMAND_NAME); } @Override Command Code public void processCommand(ICommandSender sender, String[] args) throws CommandException { if (sender instanceof EntityPlayer) { ... } else { ... } } }

  20. Use SmartHome Plug-In via SSE and REST API • List of Things via HTTP Get http://localhost:9998/rest/things • Server Sent Events (SSE) http://localhost:9998/rest/events • Helps to check what’s possible and what’s going on • Player • Switches • Doors • Sensor • … • Unique ID is always location • Relevant data is separated into components (channels)

  21. Minecraft Spigot: Simple Plug-in Bare minimum Get the Minecraft Spigot Server, API, and Build Tools from https://www.spigotmc.org/wiki/buildtools

  22. Minecraft Spigot: SmartHome.java main public class SmartHome extends JavaPlugin { // Fired when plugin is first enabled @Override Lifecycle public void onEnable() { // Register event listener // Could handle PlayerJoinEvent, BlockRedstoneEvent, PlayerInteractEvent, BlockPlaceEvent... // ...using @EventHandler annotation Events Bukkit. getPluginManager().registerEvents( new BlockChangedListener(), this); // Register command (set an instance of command class as executor) Commands this.getCommand("sendCommand").setExecutor(new SendCommand()); } // Fired when plugin is disabled @Override public void onDisable() { } }

  23. Minecraft Spigot: Simple Command public class SendCommand implements CommandExecutor { @Override Command Code public boolean onCommand(CommandSender sender, Command command, String label, String[] args) { Bukkit. broadcastMessage("onCommand " + args[0]); Loggin/Messages Bukkit. getLogger().info("onCommand " + args[0]); return false; } }

  24. Eclipse SmartHome as open technology for Prosumers Developer Device Vendor Community Device ESH Device Device Bindings Core Bindings Bindings Device ESH Device Bindings Device Core Bindings Bindings Device Device ESH Device ESH Device Device Device Bindings Bindings Core Bindings Core Bindings Bindings Bindings Internet of Things Platform Internet of Things Platform Internet of Things Platform XY Company

  25. https://github.com/wolter

  26. Minecraft Binding for Eclipse SmartHome • Integrating Devices into Eclipse SmartHome 1. Create OSGi skeleton create_binding_skeleton 2. Edit identifiers and parameters 3. Add binding logic 4. Export and deploy 5. Test

  27. Minecraft Binding for Eclipse SmartHome @Override Handle Command public void handleCommand (ChannelUID channelUID, Command command) { switch (channelUID.getId()) { case CHANNEL_POWERED: if (command instanceof OnOffType) { MinecraftThingCommand minecraftCommand = new MinecraftThingCommand(); minecraftCommand.id = id; minecraftCommand.component = new MinecraftThingComponent(); minecraftCommand.component.type = MinecraftThingComponentType.POWERED; minecraftCommand.component.state = command.equals(OnOffType.ON) ? true : false; RESTful POST postState(minecraftCommand); Or delegate to a Bridge . } break; case CHANNEL_OPEN: ... } }

  28. Minecraft Binding for Eclipse SmartHome Runnable runnable = new Runnable() { @Override public void run() { RESTful GET requestState(); Use SSE instead! } }; refreshJob = scheduler.scheduleAtFixedRate(runnable, 0, refreshInterval, TimeUnit.SECONDS); ... MinecraftThing minecraftThing = gson.fromJson(reader, MinecraftThing.class); MinecraftThingComponent component minecraftThing.getComponentByType(MinecraftThingComponentType.POWERED); OnOffType state = ((Boolean) component.state) ? OnOffType.ON : OnOffType.OFF; Update Channel updateState(CHANNEL_POWERED, state);

  29. Why? Source: https://mojang.com/2016/06/weve-sold-minecraft-many-many-times-look/

  30. Design and Hybrid Thinking

  31. Construction Kit APIs, Services Software-Architecture (e.g. MVVM)

  32. Value Innovation Practice and Exchange to find new opportunities . Source: Siematic, Discovery Channel, BSH, Microsoft, ZDF

  33. MYTHS OF TYPICAL DEVELOPER / BORN TO CODE Innovation Prosumer: Consumer and Producer Businesses are coming to realize that attracting Millions and millions of dollars are being spent to attract developers: The millions of dollars in developers is the fastest route to innovation . developer marketing efforts serve one purpose: Moreover, attracting developers means to persuade developers to use a specific attracting external investment , which finances platform, network, tool or API set to generate innovation and expansion. innovations and to reach more consumers. In short: Developers consume an Platform, API, etc. and produce something based on it . Source: Benno Luthiger, Open-Source-Jahrbuch 2004 Source: Developer Economics 2012, www.developereconomics.com Some Consumers turn into Developers to solve their needs . Video: youtube/Microsoft

  34. Responsibility and Dogfooding Hippocratic Oath and Eating your own Dogfood. Teaching Responsibility and Enlightenment versus Believe in Wonders (i.e. Politics and Regulation) Image: Sascha Wolter, Hour of Code 2015, see also https://code.org/learn

  35. My Minecraft Smart Home Internet of Uncanny Things Sascha Wolter @saschawolter January 2017 more at http://wolter.biz Video: https://youtu.be/xgakdcEzVwgl

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend