ImportError: No module named Simulator

230 views
Skip to first unread message

Chirag Anand

unread,
Jun 19, 2015, 6:25:43 AM6/19/15
to weewx...@googlegroups.com
Hi,

I am trying weewx for the first time with a Vantage Vue station. I have set up weewx.conf but it is getting stuck at the import error. Same error message when I change station_type to "Vantage". 

Output:
[weewx@redblack ~]$ ./bin/weewxd.py ./weewx.conf 
Traceback (most recent call last):
 File "./bin/weewxd.py", line 63, in <module>
   weewx.engine.main(options, args)
 File "/home/weewx/bin/weewx/engine.py", line 831, in main
   engine = EngineClass(config_dict)
 File "/home/weewx/bin/weewx/engine.py", line 71, in __init__
   self.setupStation(config_dict)
 File "/home/weewx/bin/weewx/engine.py", line 94, in setupStation
   __import__(driver)
ImportError: No module named Simulator

[weewx@redblack ~]$ python2 ./bin/wee_config_device --help
Using configuration file /home/weewx/weewx.conf
Cannot load configurator for Simulator

I am on Arch Linux, so I have python3 also installed. For working with weewx, I have changed symlinks for /usr/bin/python to point to /usr/bin/python2 and similarly for python-config.

I tried searching a lot on Python imports, and on weewx forums but couldn't find any answers. Can anyone please give me a hint on what could be wrong?

Thank you,
Chirag

Thomas Keffer

unread,
Jun 19, 2015, 9:32:21 AM6/19/15
to weewx-user
Double check the [Simulator] stanza in your weewx.conf. It should look something like:

[Simulator]
    # This section for the weewx weather station simulator

    ...

    # The driver to use:
    driver = weewx.drivers.simulator


Make sure your version does not say

    driver = Simulator

If that doesn't work, take out any passwords, then post your configuration file, weewx.conf. Also, please post the log.

-tk



--
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 weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vince

unread,
Jun 19, 2015, 10:29:52 AM6/19/15
to weewx...@googlegroups.com
> No module named Simulator

Did you start in simulator mode to learn the software and later connected the Vue and wanted to switch to Vantage to 'go live' ?

Does sourceforge.net/p/weewx/wiki/changedriver help any ?

Chirag Anand

unread,
Jun 20, 2015, 6:43:40 AM6/20/15
to weewx...@googlegroups.com
Hi,

Thank you for your answers. Yes, I was trying to run the Simulator before switching to the actual hardware. I had gotten the driver name incorrect, 'weewx.drivers.vantage' has resolved that issue. But now it is not getting ACK from the station. I have attached my conf file and the syslog:

/* kernel log after attaching the console */
Jun 20 15:58:03 redblack kernel: usb 3-3: new full-speed USB device number 29 using xhci_hcd
Jun 20 15:58:04 redblack kernel: cp210x 3-3:1.0: cp210x converter detected
Jun 20 15:58:04 redblack kernel: usb 3-3: cp210x converter now attached to ttyUSB0
Jun 20 15:58:04 redblack mtp-probe[13472]: checking bus 3, device 29: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-3"
Jun 20 15:58:04 redblack mtp-probe[13472]: bus: 3, device: 29 was not an MTP device
Jun 20 15:58:05 redblack systemd[1]: Starting Manage ttyUSB0 for GPS daemon...
Jun 20 15:58:05 redblack gpsdctl[13504]: gpsd_control(action=add, arg=/dev/ttyUSB0)
Jun 20 15:58:05 redblack gpsdctl[13504]: reached a running gpsd
Jun 20 15:58:05 redblack systemd[1]: Started Manage ttyUSB0 for GPS daemon.

/* weewx log */
Jun 20 15:58:19 redblack weewx[13531]: engine: Initializing weewx version 3.1.0
Jun 20 15:58:19 redblack weewx[13531]: engine: Using Python 2.7.9 (default, Dec 11 2014, 04:42:00) 
Jun 20 15:58:19 redblack weewx[13531]: engine: Using configuration file /home/weewx/weewx.conf
Jun 20 15:58:19 redblack weewx[13531]: engine: Initializing engine
Jun 20 15:58:19 redblack weewx[13531]: engine: Loading station type Vantage (weewx.drivers.vantage)
Jun 20 15:58:19 redblack weewx[13531]: vantage: Opened up serial port /dev/ttyUSB0, baudrate 19200
Jun 20 15:58:20 redblack weewx[13531]: vantage: successfully woke up console
Jun 20 15:58:20 redblack weewx[13531]: vantage: No <ACK> received from console
Jun 20 15:58:20 redblack weewx[13531]: engine: Unable to load driver: No <ACK> received from Vantage console
Jun 20 15:58:20 redblack weewx[13531]: ****  Waiting 60 seconds then retrying...
Jun 20 15:59:20 redblack weewx[13531]: engine: retrying...
Jun 20 15:59:20 redblack weewx[13531]: engine: Using configuration file /home/weewx/weewx.conf
Jun 20 15:59:20 redblack weewx[13531]: engine: Initializing engine
Jun 20 15:59:20 redblack weewx[13531]: engine: Loading station type Vantage (weewx.drivers.vantage)
Jun 20 15:59:20 redblack weewx[13531]: vantage: Opened up serial port /dev/ttyUSB0, baudrate 19200
Jun 20 15:59:20 redblack weewx[13531]: vantage: successfully woke up console
Jun 20 15:59:20 redblack weewx[13531]: vantage: No <ACK> received from console
Jun 20 15:59:20 redblack weewx[13531]: engine: Unable to load driver: No <ACK> received from Vantage console
Jun 20 15:59:20 redblack weewx[13531]: ****  Waiting 60 seconds then retrying...




--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/UWqyrBy5KWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.
--

http://atvariance.in/chiraganand

weewx.conf

mwall

unread,
Jun 20, 2015, 7:17:17 AM6/20/15
to weewx...@googlegroups.com, anand....@gmail.com
On Saturday, June 20, 2015 at 6:43:40 AM UTC-4, Chirag Anand wrote:
Thank you for your answers. Yes, I was trying to run the Simulator before switching to the actual hardware. I had gotten the driver name incorrect, 'weewx.drivers.vantage' has resolved that issue. But now it is not getting ACK from the station. I have attached my conf file and the syslog:

systemd has grabbed /dev/ttyUSB0, so if that is actually the vantage station you need to prevent systemd from thinking it is a gps device.

if the vantage is actually something else like /dev/ttyUSB1, then you need to specify that in weewx.conf

even better, make a udev rule so that the vantage always shows up as /dev/vantage then refer to /dev/vantage in weewx.conf

m

Chirag Anand

unread,
Jun 20, 2015, 8:33:32 AM6/20/15
to weewx...@googlegroups.com
Okay so I looked at the udev configuration. It seems that this same chip is used in GPS devices also. The default udev rules which come with the distribution have this entry:

# Cygnal Integrated Products, Inc. CP210x Composite Device (Used by Holux m241 and Wintec grays2 wbt-201) [linux module: cp210x]
ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", SYMLINK+="gps%n", TAG+="systemd", ENV{SYSTEMD_WANTS}="gpsdctl@%k.service"

So I removed the gpsd package from the system, and disabled it, now systemd does not take it by default. But the same error.

This is what is happening now:
/**/
Jun 20 17:56:16 redblack kernel: usb 3-2: new full-speed USB device number 41 using xhci_hcd
Jun 20 17:56:17 redblack kernel: cp210x 3-2:1.0: cp210x converter detected
Jun 20 17:56:17 redblack kernel: usb 3-2: cp210x converter now attached to ttyUSB0
Jun 20 17:56:17 redblack mtp-probe[20298]: checking bus 3, device 41: "/sys/devices/pci0000:00/0000:00:14.0/usb3/3-2"
Jun 20 17:56:17 redblack mtp-probe[20298]: bus: 3, device: 41 was not an MTP device
Jun 20 17:56:25 redblack weewx[20345]: engine: Initializing weewx version 3.1.0
Jun 20 17:56:25 redblack weewx[20345]: engine: Using Python 2.7.9 (default, Dec 11 2014, 04:42:00) 
[GCC 4.9.2]
Jun 20 17:56:25 redblack weewx[20345]: engine: Using configuration file /home/weewx/weewx.conf
Jun 20 17:56:25 redblack weewx[20345]: engine: Initializing engine
Jun 20 17:56:25 redblack weewx[20345]: engine: Loading station type Vantage (weewx.drivers.vantage)
Jun 20 17:56:25 redblack weewx[20345]: vantage: Opened up serial port /dev/ttyUSB0, baudrate 19200
Jun 20 17:56:26 redblack weewx[20345]: vantage: successfully woke up console
Jun 20 17:56:26 redblack weewx[20345]: vantage: No <ACK> received from console
Jun 20 17:56:26 redblack weewx[20345]: engine: Unable to load driver: No <ACK> received from Vantage console
Jun 20 17:56:26 redblack weewx[20345]: ****  Waiting 60 seconds then retrying...
/**/

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/UWqyrBy5KWI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--

http://atvariance.in/chiraganand

Thomas Keffer

unread,
Jun 20, 2015, 10:13:28 AM6/20/15
to weewx-user
Did you try Establishing connectivity in the User's Guide?

-tk

--
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 weewx-user+...@googlegroups.com.

Chirag Anand

unread,
Jun 23, 2015, 8:17:14 AM6/23/15
to weewx...@googlegroups.com
Hi Thomas,

Thanks for your help. I tried establishing connectivity using minicom
and screen, but I don't get TEST echoed back to me. Instead 'OK' is
output irrespective of what command I type in. I am assuming because
of this, weewx is not able to receive ACK from it, since its not
recognising any of the commands.
Chirag Anand
http://atvariance.in/chiraganand

Thomas Keffer

unread,
Jun 23, 2015, 9:17:04 AM6/23/15
to weewx-user
If you're getting anything back, you've established connectivity. 

When you typed in "TEST", did you make sure it was all in capital letters? You can also try other commands such as

VER 
(send firmware date code)

NVER 
(send firmware version number)

If none of these work, there's something wrong with your logger. Oh, by the way, do you have a logger? Or, are you using a home-built serial connector?

-tk

Chirag Anand

unread,
Jun 23, 2015, 9:22:49 AM6/23/15
to weewx...@googlegroups.com
Hi Thomas,

Yes, TEST was all caps. I tried other commands as well, they just send
back "OK", nothing else. I have a logger attached to the console.

Output (enabled local echo):

/**/
Port /dev/ttyUSB0, 18:48:16

Press CTRL-A Z for help on special keys



OK

TEST


OK

VER


OK

NVER


OK
/**/

Thomas Keffer

unread,
Jun 23, 2015, 9:32:50 AM6/23/15
to weewx-user
If everything is correct (double check the baud rate), I have no explanation. This one will require a call to Davis. 

-tk

Chirag Anand

unread,
Jun 23, 2015, 9:39:12 AM6/23/15
to weewx...@googlegroups.com
I tried with different baud rates, 9600 doesn't work at all (no OK
either), neither does 14400. Only 19200 seems to do something.

Okay I will contact Davis and update here. Thanks for all your help so far.
Reply all
Reply to author
Forward
0 new messages