Hello again.

Through further testing I think it is the UV sensor. 

For example: 

b3050100b8 -> ignore b3, gives 5 : 1 : 0 : 185
b3050200ba -> ignore b3, gives 5 : 2 : 0 : 186

So bit 1 always gives 5 - Could be battery status not sure
Bit 2 seems to tally with what the WMR89 is displaying on its screen
Bit 3 is always 0
Bit 4 is 184 plus bit 2

I have added the following to the driver and am getting what looks to be 
sensible readings:

    def _wmr89_uv_packet(self, packet):
        ## 0   1   2   3   4
        ## b3  05  00  00  b8
        ## b3  05  01  00  b9
        ## b3  05  02  00  ba

        ## looks like 2 is the UV reading although 4 is 184 + UV reading at 
the moment

        #Get readings from the packet to print out to syslog for testing
        num1=ord(packet[1])
        num2=ord(packet[2])
        num3=ord(packet[3])
        num4=ord(packet[4])

        Send readings to the syslog
        logdbg("UV1 : " + str(num1) + "  UV2 : " + str(num2) + "  UV3 : " + 
str(num3) + "  UV4 : " + str(num4))

        _record = {'uv': ord(packet[2]),
                   #'battery_status_uv': packet[0] >> 4,
                   'dateTime': int(time.time() + 0.5),
                   'usUnits': weewx.METRIC
        }

        return _record


To get it all working and to help people like me who have no real idea on 
how to code you'll need to add the following to the driver:

class WMR89(weewx.drivers.AbstractDevice):
    """Driver for the Oregon Scientific WMR89 console.

    The connection to the console will be open after initialization"""

    DEFAULT_MAP = {
        'barometer': 'barometer',
        'pressure': 'pressure',
...
        'windchill': 'windchill',
        'UV': 'uv'}

...


and in  *def genLoopPackets(self):*

 elif decode[i][0].encode('hex')=='b5':#T/Hum  OK
                    _record = self._wmr89_temp_packet(decode[i])
                 elif decode[i][0].encode('hex')=='b3': #UV ?
                    _record = self._wmr89_uv_packet(decode[i])
                 else:

...



-- 
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.

Reply via email to