{"action":"created","issue":{"url":"https://api.github.com/repos/joan2937/pigpio/issues/34","labels_url":"https://api.github.com/repos/joan2937/pigpio/issues/34/labels{/name}","comments_url":"https://api.github.com/repos/joan2937/pigpio/issues/34/comments","events_url":"https://api.github.com/repos/joan2937/pigpio/issues/34/events","html_url":"https://github.com/joan2937/pigpio/issues/34","id":117952056,"number":34,"title":"DHT11 pigpio Anomalies with Jessie Environment","user":{"login":"baqwas","id":7071255,"avatar_url":"https://avatars.githubusercontent.com/u/7071255?v=3","gravatar_id":"","url":"https://api.github.com/users/baqwas","html_url":"https://github.com/baqwas","followers_url":"https://api.github.com/users/baqwas/followers","following_url":"https://api.github.com/users/baqwas/following{/other_user}","gists_url":"https://api.github.com/users/baqwas/gists{/gist_id}","starred_url":"https://api.github.com/users/baqwas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/baqwas/subscriptions","organizations_url":"https://api.github.com/users/baqwas/orgs","repos_url":"https://api.github.com/users/baqwas/repos","events_url":"https://api.github.com/users/baqwas/events{/privacy}","received_events_url":"https://api.github.com/users/baqwas/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-20T02:23:04Z","updated_at":"2015-11-20T14:19:38Z","closed_at":null,"body":"The code contribution at https://github.com/joan2937/pigpio/commit/523fe868626edd65fdba7d478b0414ced6dfbcbe by srounet does not work under Python 3 under Jessie on RPi for a DHT11 sensor. After the very nominal syntax change for the iter definition, the module runs, throws an exception after the first iteration and continues to report constant values for temperature and relative humidity despite changes in the ambient conditions. The numbers themselves are spurious because they vary for each separate invocation of the module. Since I have the sensor working with the wiringPi library without any modifications to the breadboard, I will use joan2937's suggestion to use the new library at http://abyz.co.uk/rpi/pigpio/examples.html#pdif2_DHTXXD for further experiments (including DHT22) but I thought I would pass along my note in the event others seeking a Python 3 solution (for whatever reason) spin futile cycles to make this particular code work. I did not try the DHT22 sensor with the original code.\r\n\r\nOf course, I will be willing to test any forthcoming revisions to the code. I understand the caveats in using these types of sensors under RPi's OS since I have an Arduino UNO sending back correct data to its RPi host via the Python pyserial module on the RPi. The only reason I became partial to Python was owing to the ease in using SQLite and MySQL interfaces through Python for further extensions.\r\n\r\nThanks for your guidance. Rdgs.\r\n"},"comment":{"url":"https://api.github.com/repos/joan2937/pigpio/issues/comments/158413355","html_url":"https://github.com/joan2937/pigpio/issues/34#issuecomment-158413355","issue_url":"https://api.github.com/repos/joan2937/pigpio/issues/34","id":158413355,"user":{"login":"joan2937","id":5736953,"avatar_url":"https://avatars.githubusercontent.com/u/5736953?v=3","gravatar_id":"","url":"https://api.github.com/users/joan2937","html_url":"https://github.com/joan2937","followers_url":"https://api.github.com/users/joan2937/followers","following_url":"https://api.github.com/users/joan2937/following{/other_user}","gists_url":"https://api.github.com/users/joan2937/gists{/gist_id}","starred_url":"https://api.github.com/users/joan2937/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joan2937/subscriptions","organizations_url":"https://api.github.com/users/joan2937/orgs","repos_url":"https://api.github.com/users/joan2937/repos","events_url":"https://api.github.com/users/joan2937/events{/privacy}","received_events_url":"https://api.github.com/users/joan2937/received_events","type":"User","site_admin":false},"created_at":"2015-11-20T14:19:38Z","updated_at":"2015-11-20T14:19:38Z","body":"I have removed the reference to DHT22 as there is no evidence that code does not work as expected for Python 2 and Python 3.\r\n\r\nYou should be aware that the Python module and the (C) pigpio daemon interface module (C libraries libpigpiod_if and libpigpiod_if2) are equally capable of producing the correct results.  They both get the raw timing data from the pigpio daemon."}}