Wow. First try and it works? Impossible.

Did you try it under both Python 2 and 3?

On Mon, May 4, 2020 at 7:46 AM andr3id <andrei.pene...@gmail.com> wrote:

> Hi!
>
> The driver seems to work, but the function byte2int has to be removed. I
> don't think it's needed since binascii.hexlify and binascii.unxelify sorts
> the types out correctly.
> I have attached an update without the byte2int function and here is some
> output from my tests with Python 2.7 and Python 3.7:
>
> $ PYTHONPATH=/usr/share/weewx python2 wmr89.py --port=/dev/ttyUSB1
> {'dateTime': 1588602699, 'inHumidity': 35.0, 'inDewpoint': 6, 'usUnits':
> 16, 'inTemp': 21.900000000000002}
> {'dateTime': 1588602700, 'inHumidity': 35.0, 'inDewpoint': 6, 'usUnits':
> 16, 'inTemp': 21.900000000000002}
> {'windchill': None, 'dateTime': 1588602725, 'windDir': 315.0, 'windSpeed':
> 17.28, 'windGust': 18.36, 'usUnits': 16}
> {'outHumidity': 45.0, 'outTemp': 12.700000000000001, 'usUnits': 16,
> 'dewpoint': 1, 'dateTime': 1588602725}
> {'windchill': None, 'dateTime': 1588602726, 'windDir': 315.0, 'windSpeed':
> 17.28, 'windGust': 18.36, 'usUnits': 16}
> {'outHumidity': 45.0, 'outTemp': 12.700000000000001, 'usUnits': 16,
> 'dewpoint': 1, 'dateTime': 1588602726}
> {'dewpoint1': 4, 'extraTemp1': 19.8, 'dateTime': 1588602754, 'usUnits':
> 16, 'extraHumid1': 35.0}
> {'dewpoint1': 4, 'extraTemp1': 19.8, 'dateTime': 1588602755, 'usUnits':
> 16, 'extraHumid1': 35.0}
> {'dateTime': 1588602760, 'inHumidity': 35.0, 'inDewpoint': 6, 'usUnits':
> 16, 'inTemp': 22.0}
> {'dateTime': 1588602761, 'inHumidity': 35.0, 'inDewpoint': 6, 'usUnits':
> 16, 'inTemp': 22.0}
> {'windchill': None, 'dateTime': 1588602775, 'windDir': 292.5, 'windSpeed':
> 11.879999999999999, 'windGust': 17.28, 'usUnits': 16}
> {'windchill': None, 'dateTime': 1588602776, 'windDir': 292.5, 'windSpeed':
> 11.879999999999999, 'windGust': 17.28, 'usUnits': 16}
>
>  $ PYTHONPATH=/usr/share/weewx python3 wmr89.py --port=/dev/ttyUSB1
> {'inTemp': 22.0, 'inHumidity': 35.0, 'inDewpoint': 6, 'dateTime':
> 1588602820, 'usUnits': 16}
> {'inTemp': 22.0, 'inHumidity': 35.0, 'inDewpoint': 6, 'dateTime':
> 1588602821, 'usUnits': 16}
> {'windSpeed': 14.04, 'windDir': 292.5, 'windGust': 11.879999999999999,
> 'windchill': None, 'dateTime': 1588602830, 'usUnits': 16}
> {'windSpeed': 14.04, 'windDir': 292.5, 'windGust': 11.879999999999999,
> 'windchill': None, 'dateTime': 1588602831, 'usUnits': 16}
> {'outTemp': 13.0, 'outHumidity': 45.0, 'dewpoint': 2, 'dateTime':
> 1588602831, 'usUnits': 16}
> {'windSpeed': 14.04, 'windDir': 292.5, 'windGust': 11.879999999999999,
> 'windchill': None, 'dateTime': 1588602832, 'usUnits': 16}
> {'outTemp': 13.0, 'outHumidity': 45.0, 'dewpoint': 2, 'dateTime':
> 1588602832, 'usUnits': 16}
> {'extraTemp1': 19.8, 'extraHumid1': 35.0, 'dewpoint1': 4, 'dateTime':
> 1588602871, 'usUnits': 16}
> {'extraTemp1': 19.8, 'extraHumid1': 35.0, 'dewpoint1': 4, 'dateTime':
> 1588602872, 'usUnits': 16}
> {'inTemp': 22.0, 'inHumidity': 35.0, 'inDewpoint': 6, 'dateTime':
> 1588602879, 'usUnits': 16}
> {'inTemp': 22.0, 'inHumidity': 35.0, 'inDewpoint': 6, 'dateTime':
> 1588602880, 'usUnits': 16}
> {'windSpeed': 18.0, 'windDir': 292.5, 'windGust': 17.64, 'windchill':
> None, 'dateTime': 1588602886, 'usUnits': 16}
> {'windSpeed': 18.0, 'windDir': 292.5, 'windGust': 17.64, 'windchill':
> None, 'dateTime': 1588602887, 'usUnits': 16}
>
> I will continue to analyse and verify the received data compared to the
> data showed on the weather station display, but this is more related to
> understanding the data from WMR89 and not making the driver work in WeeWX.
>
> Thanks for your time and support!
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-development" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-development+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-development/0c5eb37b-0a0a-4f23-b5cd-ff623117802c%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-development/0c5eb37b-0a0a-4f23-b5cd-ff623117802c%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/CAPq0zEDw9MEar51MSbGwrk_UpiiH4qxFAPeSbgpH-HM%2B6J7SuQ%40mail.gmail.com.

Reply via email to