I've done what you ask. This is what I get with my sensor n°2: 1/ with battery at normal status: Feb 13 21:08:20 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() phase getting live packets Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D Temperature id:2 17.7 C trend: Stable Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D Humidity id:2 69% trend: Stable Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D Dew point id:2: 12.0 C Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D Queuing live packet rx:24415 live_queue_len:1 Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() Yielding live queued packet id:25886 Feb 13 21:08:28 petitpc-dot-s weewx[831]: wmr200: MainThread: D Queuing live packet rx:24416 live_queue_len:1 Feb 13 21:08:29 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() Yielding live queued packet id:25887
2/with low bats : Feb 13 21:27:41 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() Yielding live queued packet id:26223 Feb 13 21:27:42 petitpc-dot-s weewx[831]: wmr200: MainThread: D Queuing live packet rx:24733 live_queue_len:1 Feb 13 21:27:43 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() Yielding live queued packet id:26224 Feb 13 21:27:44 petitpc-dot-s weewx[831]: wmr200: MainThread: D Temperature id:2 22.2 C trend: Stable Feb 13 21:27:44 petitpc-dot-s weewx[831]: wmr200: MainThread: D Humidity id:2 50% trend: Stable Feb 13 21:27:44 petitpc-dot-s weewx[831]: wmr200: MainThread: D Dew point id:2: 12.0 C Feb 13 21:27:44 petitpc-dot-s weewx[831]: wmr200: MainThread: D Queuing live packet rx:24734 live_queue_len:1 Feb 13 21:27:45 petitpc-dot-s weewx[831]: wmr200: MainThread: D genLoop() Yielding live queued packet id:26225 Le dimanche 12 février 2017 23:01:01 UTC+1, mwall a écrit : > > On Sunday, February 12, 2017 at 4:10:22 PM UTC-5, Mic G77 wrote: >> >> I have a wmr200. >> I have seen that the following information are available : >> outTempBatteryStatus, windBatteryStatus, uvBatteryStatus, and >> rainBatteryStatus >> >> What i would like to have is this information for de 2 extra THGR sensor >> i have (temperature and humidity) >> For exemple : I have acces to extratemp2, extrahumid 2 but not to >> extra2BatteryStatus.. >>> >>> >>> > according to the wmr200 driver, battery status is available only in the > console status packets. the console status packet contains > outTempBatteryStatus, windBatteryStatus, uvBatteryStatus, and > rainBatteryStatus. > > however, according to the wmr100 driver, the T/H and T packets contain the > battery status for remote sensors, at least for the sensors on channel 0 > and channel 1. (i'm guessing that there is battery status on other > channels too, but the wmr100 driver does not capture those) > > so it is possible that the remote battery status could be decoded in the > wmr200 driver. the question is where and how? > > the wmr100 driver expects a 6-byte payload for T/H packets, and looks for > the battery status in the hi nibble of byte 0: > > (payload[0] & 0x40) >> 6 > > the wmr200 expects a 7-byte payload for T/H packets: > > payload[0] & 0x0f - channel > (payload[0] >> 6) & 0x3 - temperature trend > (payload[0] >> 4) & 0x3 - humidity trend > (((payload[2] & 0xf) << 8) | payload[1]) / 10.0 - temperature (sign is > payload[2] & 0x80) > payload[3] - humidity > (((payload[5] & 0xf) << 8) | payload[4]) / 10.0 - dewpoint (sign is > payload[5] & 0x80) > (payload[6] - 32) / (9.0 / 5.0) - heatindex > > which leaves some room for a battery status bit - probably in byte 0 > > so if you can identify which byte/nibble is the battery status, we can map > that to the weewx data structures. > > please run weewx with extra debug enabled. in weewx.conf: > > debug=1 > [WMR200] > ... > debug_raw = 1 > debug_packets_temp = 1 > > this will show the bytes in each packet in the log. then put weak > batteries into one of your t/h sensors. from that we can figure out which > bytes contain the battery status. > > m > -- 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]. For more options, visit https://groups.google.com/d/optout.
