Thanks, I got it working a short while ago and is busy testing.


On Friday, 26 July 2019 16:37:26 UTC+2, Andrew Milner wrote:
>
> try copying in the code that reads the sensor used at startup would be a 
> good starting point, and you may need to declare humidity as a global.  
>
>
>
> On Friday, 26 July 2019 16:46:47 UTC+3, Danie Cillie wrote:
>>
>> Thanks Gary, I came to the same conclusion but have not been able to 
>> figure out how to get sampleAndDisplay() to read the humidity sensor.
>>
>> Any ideas?
>>
>> On Thursday, 25 July 2019 21:19:49 UTC+2, gjr80 wrote:
>>>
>>> genLoopPackets() assigns the variable ‘humidity’ to the ‘outHumidity’ 
>>> field in the loop packet (line 341) but when genLoopPackets() is iterating 
>>> continuously it calls the sampleAndDisplay() method to (presumably) obtain 
>>> updated sensor values. As far as I can tell variable ‘humidity’ is not set 
>>> by sampleAndDisplay(). ‘humidity’ is only set at line 254 when the driver 
>>> module is first loaded. This probably explains why the value is only 
>>> correct/updated when WeeWX is started/restarted. 
>>>
>>> I think you need to revise you driver to ensure that that variable 
>>> ‘humidity’ is in fact updated on a regular basis. 
>>>
>>> Gary
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0a8fb616-4218-421b-8ded-965506ce8da5%40googlegroups.com.

Reply via email to