Code Monkey home page Code Monkey logo

wmii's Introduction

Hi there πŸ‘‹

This is @jardiamj! πŸ‘‹

  • 🌱 I’m currently pursuing a Masters in Computer Science at University Of Washington - Bothell.
  • πŸ“š As part of my thesis I am working on developing simulation models for Emergency Services Communication Systems AKA the 911 system.
  • πŸ“š I hold a Bachelors degree in Agriculture and Natural Resourses.
  • ❀️ I love nature 🌿, gardening 🌱 🌹, woodworking πŸ”¨, sports ⚽ and technology πŸ’». In no specific order.
  • πŸ’¬ I also love conversations and the sharing of ideas with like minded people.

wmii's People

Contributors

jardiamj avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

pe2kmv baldompf

wmii's Issues

Compile fails under Python3 / weewx 4.5.1

Jun 1 17:38:59 mythtv2 weewx[9067] CRITICAL main: **** File "/opt/weewx/bin/user/wmII.py", line 198, in ReadWRD
Jun 1 17:38:59 mythtv2 weewx[9067] CRITICAL main: **** b'WRD' + chr((n << 4) | bankval) + chr(addr & 0x00FF) + chr(0xD)
Jun 1 17:38:59 mythtv2 weewx[9067] CRITICAL main: **** TypeError: can't concat str to bytes

I will post a "diff" if I can fix it (I expect I will be able tod)

Still having problems with getTime() in wmII.py

My weewx server has been crashing for a while now. Running latest updates to Raspbian Buster.
Just updated weewx to version 4.6.0-1. I ensured that I've got the latest top of branch version of wmII.py from github,
weewx gets these errors:

Feb 4 14:01:39 weather weewx[18881] INFO weewx.engine: Main loop exiting. Shutting engine down.
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: Caught unrecoverable exception:
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** ord() expected a character, but string of length 0 found
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** Traceback (most recent call last):
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/weewxd", line 153, in main
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** engine.run()
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/weewx/engine.py", line 197, in run
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** self.dispatchEvent(weewx.Event(weewx.PRE_LOOP))
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/weewx/engine.py", line 245, in dispatchEv
ent
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** callback(event)
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/weewx/engine.py", line 594, in pre_loop
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** now = self.engine._get_console_time()
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/weewx/engine.py", line 274, in _get_conso
le_time
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** return self.console.getTime()
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/user/wmII.py", line 108, in getTime
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** return self.station.get_time()
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** File "/usr/share/weewx/user/wmII.py", line 171, in get_time
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** sec = self.fromBCD(ord(d[2:3]))
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** TypeError: ord() expected a character, but string of length 0 foun
d
Feb 4 14:01:39 weather weewx[18881] CRITICAL main: **** Exiting.

I included my software version info, and a zip of the wmII.py file that I got from github, in case my git foo is bad...

weewx_versions.txt
wmII.py.github.ERRORS.txt
wmII.zip

Thank you,
Chris Shaker

Weewx wmII TypeError

Hi..
I have Raspeberry 3 , weewx with wmII...
When run weewx havethis error:

sudo weewxd /etc/weewx/weewx.conf
Traceback (most recent call last):
File "/usr/share/weewx/weewxd", line 261, in
main()
File "/usr/share/weewx/weewxd", line 154, in main
engine.run()
File "/usr/share/weewx/weewx/engine.py", line 158, in run
self.dispatchEvent(weewx.Event(weewx.STARTUP))
File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
callback(event)
File "/usr/share/weewx/weewx/engine.py", line 691, in startup
self.do_sync()
File "/usr/share/weewx/weewx/engine.py", line 705, in do_sync
console_time = self.engine.console.getTime()
File "/usr/share/weewx/user/wmII.py", line 96, in getTime
return self.station.get_time()
File "/usr/share/weewx/user/wmII.py", line 156, in get_time
d = self.ReadWRD(6, 1, 0xBE)
File "/usr/share/weewx/user/wmII.py", line 198, in ReadWRD
"WRD" + chr((n << 4) | bankval) + chr(addr & 0x00FF) + chr(0xD)
File "/usr/lib/python3/dist-packages/serial/serialposix.py", line 532, in write
d = to_bytes(data)
File "/usr/lib/python3/dist-packages/serial/serialutil.py", line 63, in to_bytes
raise TypeError('unicode strings are not supported, please encode to bytes: {!r}'.format(seq))
TypeError: unicode strings are not supported, please encode to bytes: 'WRDdΒΎ\r'

How fix ?

Thanks

Best Regards.

Enable wmII to work with `wee_device` to access hardware configuration

Currently, you cannot use wee_device to access the hardware configuration of the Weather Monitor II station. This would be useful for:

  • Setting the station time
  • Setting calibration for:
    -- Indoors Temperature,
    -- Outdoors Temperature,
    -- rain,
    -- Indoors Humidity,
    -- Outdoors Humidity,
    -- pressure, and
    -- wind

In order to make the driver compatible with wee_device, we need to implement a configurator class and implement the configurator_loader method, e.g.:

def configurator_loader(config_dict):
    return WMIIConfigurator()
class WMIIConfigurator(weewx.drivers.AbstractConfigurator):
   ...
   def description(self):
      ...
   def usage:
      ...
   def add_options(self, parser):
      ...
   def do_options(self, options, parser, config_dict, prompt):
      ...

We can use the Vantage driver as an example. The file can be found under /usr/share/weewx/weewx/drivers/ in Debian systems.

LOOP value 'outHumidity' 155 outside limits (0.0, 100.0)

Continued from Issue: #1

I now suspect this is related to something surrounding the station because it seems to only happen at certain times of day. Perhaps solar, temperature, nearby RF or human (switching something off) related.

See the following graphs which put me onto this new theory.

image

More graph data here: https://aprs.fi/weather/a/2E0PGS-WX

This seems to happen every day at the same times +or- an hour.

Anomaly in Wunderground Post

This is a perplexing problem. I don't know enough about the structure of weewx code or the Davis Monitor II driver to hazard a guess as to which nay be the problem. My station, a Davis Monitor II, running on a Raspberry PI B+ appears to be working fine without drama. The PI has an IP assigned outside of DHCP on a Spectrum Gateway router. I have always had stability issues between PIs and Spectrum. I have avoided the random disconnects by running this on the hour as a chron task.

#!/bin/bash
sudo ifconfig wlan0 down
sudo ifconfig wlan0 up
sudo service networking restart

I let the setup run several days before enabling posting to Wundergound. My data when views on the web site locally looked fine. When I looked at my data on WundergroundI discovered an anomaly with humidity. After the chron task ran the pressure reads low for one reading.

Wu_report

This is beyond weird. Only pressure is off and it is only the first reading after the network reconnect. What could be wrong? Have I discovered some really subtle bug? If you think so, I can repost on the weewx google development forum.

Bill - AB6OR

** EDIT

Reply from the Google forum:

Looking at KCAORANG21, the WU is receiving low values for pressure on the hour, although with the WU, you never really know. But, given that you are cycling the wifi adapter at exactly the same time, odds are that the problem is on your end, rather than on the WU end.

I am not familiar with the wmii driver but, looking through its code, it ignores the checksum, so it's entirely possible it is receiving a bad packet on the hour, which gets decoded into nonsense values. The many bad values logged give evidence to this theory. For example,

Sep 1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'pressure' -29.33 outside limits (24.0, 34.5)
Sep 1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'outHumidity' 128 outside limits (0.0, 100.0)
Sep 1 08:29:17 raspberrypi weewx[425]: engine: 2019-09-01 08:29:17 PDT (1567351757) LOOP value 'outTemp' 3276.7 outside limits (-40.0, 120.0)
Sep 1 08:29:18 raspberrypi weewx[425]: engine: 2019-09-01 08:29:18 PDT (1567351758) LOOP value 'pressure' -29.33 outside limits (24.0, 34.5)
Sep 1 08:29:18 raspberrypi weewx[425]: engine: 2019-09-01 08:29:18 PDT (1567351758) LOOP value 'outHumidity' 128 outside limits (0.0, 100.0)

So, when weewx calculates the average pressure for the interval, it gets an off value. Incidentally, you're getting low values for other types, such as outside temperature. They are probably suffering from the same problem.


I will be happy to work on the code if you can point me in the right direction. It looks to be like you are using CRC but perhaps the wrong thing is happening if a bad CRC is discovered.

So far so good , except indoor humidity

Like you, I acquired a used Monitor II station gratis. Thank you for the driver and especially for the installation instructions. Once I realized that my Prolific serial to USB cable was not assigned to /dev/ttyUSBx without a reboot, I was up and running.

I have had one incident of out of bounds humidity as was reported in the prior post. I rebooted the PI and it has not reoccurred. I will reply to that post if I get more information.

The only remaining problem is a hardware issue. The indoor humidity sensor is off by about 50%. It does respond to changes in the environment so it’s not totally shot but I would rather replace the sensor than try to adjust out the error.

Have you run across any schematics or parts lists for the monitor II? I looked around online without success.

error message pass through

Occasionally, I have trouble getting up and running on a reboot. I checked the syslog for errors and did not find a smoking gun. Weewx shut down when the driver was on failure 3 of 5. Not sure why. I did notice this somewhat unrelated issue. The log shows this:

Sep 12 00:01:02 raspberrypi weewx[423]: **** syslog.syslog(level, 'Weather Monitor II: %s' % msg)
Sep 12 00:01:02 raspberrypi weewx[423]: **** TypeError: [priority,] message string
Sep 12 00:01:02 raspberrypi weewx[423]: **** Exiting.

My python is rusty. Is line line okay in the driver?

39 syslog.syslog(level, 'Weather Monitor II: %s' % msg)

The second % looks misplaced.

P.S. I am working on other issues right now. I am a ham. If I transmit on 20m at 100 watts. I get bad data from the weather station. RF is being picked up and rectified by the humidity/temp sensor. Adding Ferrite to cable is helping. I have added some small caps to a spare humidity/temp sensor board and I eant to see if that helps. Here's my station:

(https://www.wunderground.com/dashboard/pws/KCAORANG21?cm_ven=localwx_pwsdash)

Driver error in syslog

Hi I have the following entry in my syslog:

Mar 17 14:20:36 raspberrypi wee_device[2077]: The driver user.wmII does not include a configuration tool: 'module' object has no attribute 'configurator_loader'

Any ideas?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.