{"action":"created","issue":{"url":"https://api.github.com/repos/kizniche/Mycodo/issues/418","repository_url":"https://api.github.com/repos/kizniche/Mycodo","labels_url":"https://api.github.com/repos/kizniche/Mycodo/issues/418/labels{/name}","comments_url":"https://api.github.com/repos/kizniche/Mycodo/issues/418/comments","events_url":"https://api.github.com/repos/kizniche/Mycodo/issues/418/events","html_url":"https://github.com/kizniche/Mycodo/issues/418","id":301332688,"number":418,"title":"Bug: The first sensor to be read won't show the correct value","user":{"login":"Kattihatt","id":31818740,"avatar_url":"https://avatars2.githubusercontent.com/u/31818740?v=4","gravatar_id":"","url":"https://api.github.com/users/Kattihatt","html_url":"https://github.com/Kattihatt","followers_url":"https://api.github.com/users/Kattihatt/followers","following_url":"https://api.github.com/users/Kattihatt/following{/other_user}","gists_url":"https://api.github.com/users/Kattihatt/gists{/gist_id}","starred_url":"https://api.github.com/users/Kattihatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kattihatt/subscriptions","organizations_url":"https://api.github.com/users/Kattihatt/orgs","repos_url":"https://api.github.com/users/Kattihatt/repos","events_url":"https://api.github.com/users/Kattihatt/events{/privacy}","received_events_url":"https://api.github.com/users/Kattihatt/received_events","type":"User","site_admin":false},"labels":[{"id":174185310,"url":"https://api.github.com/repos/kizniche/Mycodo/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":8,"created_at":"2018-03-01T09:26:43Z","updated_at":"2018-03-11T04:07:10Z","closed_at":null,"author_association":"NONE","body":"Hello again!\r\n\r\nSo I'm running: 5.5.24 and I had this issue:\r\n\r\nI'm trying to read values from the MCP3008, but the first value in the data input list, will not read correct values. \r\n\r\nWhen trying to read values from the MCP3008, I use a transistor switch to the soil moisture sensor circuit and when I had this turned on at all times, it worked as expected. When I on the other hand turned this off, and turned it on by choosing pre-output, I got no reading on the first sensor in the list. This of course, made me think it was a hardware error, and I looked at the circuit but found nothing wrong, also it was working before, when it was turned on all the time. So the next thing to do was to try to increas the on timing before grabbing the data, which changed nothing, even if I set a pre-output duration of 30 seconds. \r\n\r\nSo the next thing I tried, was to simply add another data input from the MCP3008, and place it above the first actual value to be read. Now the first one still shows a nonsensical value, but the second one, which is the value I want, works fine. Now this made me come to the conclusion that it is a software error.\r\n\r\nI see nothing of relevance in the logs, no complaints or errors.\r\n\r\nI'd say it's not a top priority to try to settle this since the workaround was as simple as creating a new data input, but it might be worth knowing that the problem exists and if someone else has it maybe they have something more to contribute. I hope it's good for something :)"},"comment":{"url":"https://api.github.com/repos/kizniche/Mycodo/issues/comments/372087816","html_url":"https://github.com/kizniche/Mycodo/issues/418#issuecomment-372087816","issue_url":"https://api.github.com/repos/kizniche/Mycodo/issues/418","id":372087816,"user":{"login":"Kattihatt","id":31818740,"avatar_url":"https://avatars2.githubusercontent.com/u/31818740?v=4","gravatar_id":"","url":"https://api.github.com/users/Kattihatt","html_url":"https://github.com/Kattihatt","followers_url":"https://api.github.com/users/Kattihatt/followers","following_url":"https://api.github.com/users/Kattihatt/following{/other_user}","gists_url":"https://api.github.com/users/Kattihatt/gists{/gist_id}","starred_url":"https://api.github.com/users/Kattihatt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kattihatt/subscriptions","organizations_url":"https://api.github.com/users/Kattihatt/orgs","repos_url":"https://api.github.com/users/Kattihatt/repos","events_url":"https://api.github.com/users/Kattihatt/events{/privacy}","received_events_url":"https://api.github.com/users/Kattihatt/received_events","type":"User","site_admin":false},"created_at":"2018-03-11T04:07:10Z","updated_at":"2018-03-11T04:07:10Z","author_association":"NONE","body":"I guess it could, I've wondered how it all works. What I really would need would be one pre-output, turn on the transisor switch before taking ALL the readings, not turning it on and off as I suspect is happening now. Turn on 5 seconds before, read channel 0 to 7, turn it off. If it turns off right before, then I guess that might explain it, if it turns off the switch before taking a reading, since that is the probe floating and it's pretty much just taking a reading across one resistor, but why wouldn't it affect the other readings, but only the first? "}}
{"actor":{"display_login":"Kattihatt"}}