{"action":"created","issue":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/1195","repository_url":"https://api.github.com/repos/ev3dev/ev3dev","labels_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/1195/labels{/name}","comments_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/1195/comments","events_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/1195/events","html_url":"https://github.com/ev3dev/ev3dev/issues/1195","id":381578239,"node_id":"MDU6SXNzdWUzODE1NzgyMzk=","number":1195,"title":"brickman control via web server","user":{"login":"dwalton76","id":468309,"node_id":"MDQ6VXNlcjQ2ODMwOQ==","avatar_url":"https://avatars2.githubusercontent.com/u/468309?v=4","gravatar_id":"","url":"https://api.github.com/users/dwalton76","html_url":"https://github.com/dwalton76","followers_url":"https://api.github.com/users/dwalton76/followers","following_url":"https://api.github.com/users/dwalton76/following{/other_user}","gists_url":"https://api.github.com/users/dwalton76/gists{/gist_id}","starred_url":"https://api.github.com/users/dwalton76/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dwalton76/subscriptions","organizations_url":"https://api.github.com/users/dwalton76/orgs","repos_url":"https://api.github.com/users/dwalton76/repos","events_url":"https://api.github.com/users/dwalton76/events{/privacy}","received_events_url":"https://api.github.com/users/dwalton76/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-11-16T12:23:38Z","updated_at":"2018-11-18T01:01:36Z","closed_at":null,"author_association":"NONE","body":"### What are you trying to do?\r\n\r\nI am trying to develop a web interface for navigating brickman.  I have written a small web server in python that:\r\n- Uses https://github.com/AndrewFromMelbourne/fb2png to create a png of ``/dev/fb0``\r\n- index.html is a web page that displays that png\r\n- index.html also has some javascript that listens for up, down, left, etc keystrokes on the client keyboard and if it hears one it uses ajax to inform the web server about the keystroke\r\n- when the web server hears about a keystroke from the client (via ajax) I want it to simulate that keystroke in order to navigate brickman\r\n\r\nThe last bullet is the gotcha.  I have tried pyautogui, pynput (these both barf due to no DISPLAY),  evdev and conspy but I have not found anything yet that actually allows me to navigate brickman remotely.  Of these evdev seems the most straightforward, I am doing\r\n\r\n```\r\n            with uinput.UInput() as ui:\r\n                if key == \"UP\":\r\n                    ui.write(e.EV_KEY, e.KEY_UP, 1)\r\n                elif key == \"DOWN\":\r\n                    ui.write(e.EV_KEY, e.KEY_DOWN, 1)\r\n                elif key == \"LEFT\":\r\n                    ui.write(e.EV_KEY, e.KEY_LEFT, 1)\r\n                elif key == \"RIGHT\":\r\n                    ui.write(e.EV_KEY, e.KEY_RIGHT, 1)\r\n                elif key == \"ENTER\":\r\n                    ui.write(e.EV_KEY, e.KEY_ENTER, 1)\r\n                elif key == \"ESC\":\r\n                    ui.write(e.EV_KEY, e.KEY_ESC, 1)\r\n                else:\r\n                    raise Exception(\"Invalid key {}\".format(key))\r\n\r\n                ui.syn()\r\n```\r\n\r\nbrickman does not update though.  Ideas on how I can remotely navigate brickman?\r\n\r\n\r\n\r\n### What hardware and software are you using (including version numbers)?\r\n\r\n**System info (from `ev3dev-sysinfo`)**\r\n```\r\nImage file:         ev3dev-stretch-rpi2-generic-2017-12-13\r\nKernel version:     4.14.71-ev3dev-2.3.0-rpi2\r\nBrickman:           0.10.0\r\nBogoMIPS:           38.40\r\nBoard:              board0\r\nBOARD_INFO_HW_REV=A22082\r\nBOARD_INFO_MODEL=Raspberry Pi 3 Model B Rev 1.2\r\nBOARD_INFO_SERIAL_NUM=000000002f94f0a9\r\nBOARD_INFO_TYPE=main\r\nBoard:              board1\r\nBOARD_INFO_FW_VER=1.4.3\r\nBOARD_INFO_HW_REV=3.2.1\r\nBOARD_INFO_MODEL=Dexter Industries BrickPi3\r\nBOARD_INFO_SERIAL_NUM=E1DA1CC95150324336202020FF19312F\r\nBOARD_INFO_TYPE=aux\r\n```"},"comment":{"url":"https://api.github.com/repos/ev3dev/ev3dev/issues/comments/439659339","html_url":"https://github.com/ev3dev/ev3dev/issues/1195#issuecomment-439659339","issue_url":"https://api.github.com/repos/ev3dev/ev3dev/issues/1195","id":439659339,"node_id":"MDEyOklzc3VlQ29tbWVudDQzOTY1OTMzOQ==","user":{"login":"dlech","id":963645,"node_id":"MDQ6VXNlcjk2MzY0NQ==","avatar_url":"https://avatars0.githubusercontent.com/u/963645?v=4","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"created_at":"2018-11-18T01:01:36Z","updated_at":"2018-11-18T01:01:36Z","author_association":"MEMBER","body":"> but even after change the pi3 `/dev/uinput` perms to 660 and changing the group to `input` it still doesn't work.\r\n\r\nWorks for me\r\n\r\n> Would you be willing to ship this as part of ev3dev?\r\n\r\nIf it gets packaged into a debian package\r\n\r\n\r\n> Having a web interface up and running by default could be a nice little feature.\r\n\r\nExcept for the fact it uses lots of memory, so nack on enabling it by default."}}
{"actor":{"display_login":"dlech"}}