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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/0ae28e0d-cfa1-4d90-aa2c-a5795358d3c9%40googlegroups.com.

Reply via email to