{"action":"created","issue":{"url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/1","labels_url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/1/comments","events_url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/1/events","html_url":"https://github.com/jamorham/python-usb-wixel-xdrip/issues/1","id":101299796,"number":1,"title":"Rasperry Pi loose contact with the Wixel","user":{"login":"christerjensen","id":11073675,"avatar_url":"https://avatars.githubusercontent.com/u/11073675?v=3","gravatar_id":"","url":"https://api.github.com/users/christerjensen","html_url":"https://github.com/christerjensen","followers_url":"https://api.github.com/users/christerjensen/followers","following_url":"https://api.github.com/users/christerjensen/following{/other_user}","gists_url":"https://api.github.com/users/christerjensen/gists{/gist_id}","starred_url":"https://api.github.com/users/christerjensen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christerjensen/subscriptions","organizations_url":"https://api.github.com/users/christerjensen/orgs","repos_url":"https://api.github.com/users/christerjensen/repos","events_url":"https://api.github.com/users/christerjensen/events{/privacy}","received_events_url":"https://api.github.com/users/christerjensen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-08-16T21:15:15Z","updated_at":"2015-10-09T13:19:30Z","closed_at":null,"body":"I have a Raspberry Pi 2 with 4 USB-ports. After a few hours/days the python sctipt loose contact with the Wixel (the Wixel collects signals, and the python script acknowledge requests from the phone). The scrips does not get any values from the Wixel, so I guess it has lost contact with the Wixel. \r\n\r\nIn your code you mention that the Wixel reboots and comes back as a new device. Have you written the code for the old Raspberry Pi with 2 USB-ports? Should I change the code to include all 4 USB-ports?\r\n\r\n# sometimes the wixel reboots and comes back as a different\r\n\t\t\t# device - this code seemed to catch that happening\r\n\t\t\t# more complex code might be needed if the pi has other\r\n\t\t\t# ACM type devices.\r\n\r\n\t\t\tif (os.path.exists(\"/dev/ttyACM0\")):\r\n\t\t\t\tser = serial.Serial('/dev/ttyACM0', 9600)\r\n\t\t\tif (os.path.exists(\"/dev/ttyACM1\")):\r\n\t\t\t\tser = serial.Serial('/dev/ttyACM1', 9600)"},"comment":{"url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/comments/146869604","html_url":"https://github.com/jamorham/python-usb-wixel-xdrip/issues/1#issuecomment-146869604","issue_url":"https://api.github.com/repos/jamorham/python-usb-wixel-xdrip/issues/1","id":146869604,"user":{"login":"jamorham","id":12565568,"avatar_url":"https://avatars.githubusercontent.com/u/12565568?v=3","gravatar_id":"","url":"https://api.github.com/users/jamorham","html_url":"https://github.com/jamorham","followers_url":"https://api.github.com/users/jamorham/followers","following_url":"https://api.github.com/users/jamorham/following{/other_user}","gists_url":"https://api.github.com/users/jamorham/gists{/gist_id}","starred_url":"https://api.github.com/users/jamorham/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jamorham/subscriptions","organizations_url":"https://api.github.com/users/jamorham/orgs","repos_url":"https://api.github.com/users/jamorham/repos","events_url":"https://api.github.com/users/jamorham/events{/privacy}","received_events_url":"https://api.github.com/users/jamorham/received_events","type":"User","site_admin":false},"created_at":"2015-10-09T13:19:30Z","updated_at":"2015-10-09T13:19:30Z","body":"Okay, so do I understand correctly that this latest version of the script fixes the problem or did you change anything else? Are you still restarting with a cron job?"}}