Trouble installing WeeWX-MQTTSubscribe

366 views
Skip to first unread message

Frank Gruhlke Gg

unread,
Jan 27, 2024, 4:38:36 PMJan 27
to weewx-user
Hello all..   hopefully someone can help me!
I have a fresh raspbean install on a pi-4 and want to install the MQTT driver found here:

So far managed to install the Paho MQTT Python Client but then started to run into issues.

First,  DOWNLOAD_DIR = /tmp   gave me a "bad command error so I adjusted and ran:

/tmp $ wget https://github.com/bellrichm/WeeWX- MQTTSubscribe/archive/refs/tags/v2.3.1.tar.gz

and managed to get "v2.3.1.tar.gz into the /tmp directory

now it seems no matter what I try I cant install from here..

frank@pi4:/tmp $ BIN_DIR/wee_extension --install=v2.3.1.tar.gz
bash: BIN_DIR/wee_extension: No such file or directory
also tried 
frank@pi4:/tmp $ BIN_DIR/wee_extension --install v2.3.1.tar.gz
bash: BIN_DIR/wee_extension: No such file or directory

I am sure its something minor but I have no hair left to pull! 



bell...@gmail.com

unread,
Jan 27, 2024, 4:56:30 PMJan 27
to weewx-user

Rich Bell

unread,
Jan 27, 2024, 5:20:12 PMJan 27
to weewx...@googlegroups.com
Drop the BIN_DIR
wee_extension --install=v2.3.1.tar.gz
Assuming you are /tmp

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-user/d3d4555a-b6b7-4594-a022-128c6739442cn%40googlegroups.com.

Frank Gruhlke Gg

unread,
Jan 27, 2024, 5:34:15 PMJan 27
to weewx-user
Thanks for helping me out...  here is what got..

frank@pi4:/tmp $ wee_extension --install=v2.3.1.tar.gz
bash: wee_extension: command not found

Rich Bell

unread,
Jan 27, 2024, 5:54:08 PMJan 27
to weewx...@googlegroups.com
Just double checking, you installed WeeWX 4.x?
What method, package or setup?
It’s a bit of a matrix of what to do depending on WeeWX version and install method. I am hoping to simplify my instructions, but the docs are partially done. Sorry about that. We’ll get you up and running. 


vince

unread,
Jan 27, 2024, 5:54:23 PMJan 27
to weewx-user
You didn't say which version of weewx but you probably installed v5.

See if 'weectl extension install' works (v5 syntax) rather than 'wee_extension --install' (v4 syntax).

Frank Gruhlke Gg

unread,
Jan 27, 2024, 6:20:14 PMJan 27
to weewx-user
That got me much closer...    but (PermissionError: [Errno 13] Permission denied: '/etc/weewx/bin/user/MQTTSubscribe.py')


frank@pi4:/tmp $ weectl extension install v2.3.1.tar.gz
Using configuration file /etc/weewx/weewx.conf
Install extension 'v2.3.1.tar.gz' (y/n)? y
Extracting from tar archive v2.3.1.tar.gz
Traceback (most recent call last):
  File "/usr/share/weewx/weectl.py", line 74, in <module>
    main()
  File "/usr/share/weewx/weectl.py", line 66, in main
    namespace.func(namespace)
  File "/usr/share/weewx/weectllib/__init__.py", line 121, in dispatch
    namespace.action_func(config_dict, namespace)
  File "/usr/share/weewx/weectllib/extension_cmd.py", line 116, in install_extension
    ext.install_extension(namespace.source, no_confirm=namespace.yes)
  File "/usr/share/weewx/weecfg/extension.py", line 138, in install_extension
    extension_name = self._install_from_file(extension_path, filetype)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/weewx/weecfg/extension.py", line 168, in _install_from_file
    extension_name = self.install_from_dir(extension_dir)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/share/weewx/weecfg/extension.py", line 185, in install_from_dir
    self._install_files(installer['files'], extension_dir)
  File "/usr/share/weewx/weecfg/extension.py", line 269, in _install_files
    shutil.copy(source_path, destination_path)
  File "/usr/lib/python3.11/shutil.py", line 419, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/usr/lib/python3.11/shutil.py", line 258, in copyfile
    with open(dst, 'wb') as fdst:
         ^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: '/etc/weewx/bin/user/MQTTSubscribe.py'


Frank Gruhlke Gg

unread,
Jan 27, 2024, 6:20:52 PMJan 27
to weewx-user
And sorry, yes using WeeWx 5

Frank Gruhlke Gg

unread,
Jan 27, 2024, 6:44:59 PMJan 27
to weewx-user
This worked!   Vince and Rich, thank you so much!!

Frank Gruhlke Gg

unread,
Jan 29, 2024, 2:01:14 PMJan 29
to weewx-user
I am still trying to get everything installed correctly...

I can install weewx 5,  no problem    (sudo apt install weewx)
I can install Paho-Mqtt, no problem   (pip install paho-mqtt)
I am using this to install  WeewxMQTTSubcribe (sudo weectl extension install https://github.com/bellrichm/WeeWX-MQTTSubscribe/archive/refs/tags/v2.3.1.tar.gz)

When use" "wectl station reconfigure", it indicates I may have path issues?

Installed drivers include:
  0) ?               (user.MQTTSubscribe)      No module named 'paho'
  1) AcuRite         (weewx.drivers.acurite)
  2) CC3000          (weewx.drivers.cc3000)
  3) FineOffsetUSB   (weewx.drivers.fousb)
  4) Simulator       (weewx.drivers.simulator)
  5) TE923           (weewx.drivers.te923)
  6) Ultimeter       (weewx.drivers.ultimeter)
  7) Vantage         (weewx.drivers.vantage)
  8) WMR100          (weewx.drivers.wmr100)
  9) WMR300          (weewx.drivers.wmr300)
 10) WMR9x8          (weewx.drivers.wmr9x8)
 11) WS1             (weewx.drivers.ws1)
 12) WS23xx          (weewx.drivers.ws23xx)
 13) WS28xx          (weewx.drivers.ws28xx)
choose a driver [4]:

vince

unread,
Jan 29, 2024, 2:23:41 PMJan 29
to weewx-user
Use the packaged version of paho-mqtt.....

$ sudo apt-get install python3-paho-mqtt

Frank Gruhlke Gg

unread,
Jan 29, 2024, 2:33:14 PMJan 29
to weewx-user
That worked, thank you vince!    

Frank Gruhlke Gg

unread,
Jan 31, 2024, 10:17:27 AMJan 31
to weewx-user
Quick question, I use a ESP32 with an attached BME280 programed to gather my data and then use "weewxMQTTSubcribe" to feed Weewx.
The outdoor station sends the temp in "C" and the BME280 sends the pressure in "Pa"
Where and how in my chain does it makes the most sense to convert the temperature to "F" and the pressure to "inHg" ?


bell...@gmail.com

unread,
Jan 31, 2024, 12:20:22 PMJan 31
to weewx-user

You have a couple of options. If all (or the majority) of your data coming in is metric, you can use; https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Common-Options#unit_system
Or you can set it at the field level via, https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Additional-Options#units

rich
Message has been deleted

Frank Gruhlke

unread,
Feb 1, 2024, 5:49:30 PMFeb 1
to weewx-user
Hey Rich, thanks again... I managed to get my out-door temp to read F with this in my weewx.conf:

[[[[temperature_C]]]]
            ignore = false
            name = outTemp
            units = degree_C

I have tried every "units" option for Weewx  Barometer unit ( inHg, mbar, hPa and kpa)
for the "pa" field in my mqtt topic.

 [[[pa]]]]
          ignore = false # opt back in for this field
           name = barometer
           units = hPa

I just get  N/A (N/A) for the Barometer Reading in my reports.
I don't see any errors restarting weewx.

Here is what I am subscribed to in the driver.
"pa" is the pressure reading I am trying to bring into Weewx

{
"tempc": 20.59,
"tempf": 69.062,
"hum": 38.88184,
"pa": 98790.06,
"altim": 213.1839,
"altift": 699.4224
}


Any Ideas?

Frank Gruhlke

unread,
Feb 2, 2024, 8:32:34 AMFeb 2
to weewx-user
On a weewx re-boot this morning I spotted this warning:

WARNING weewx.qc: 2024-02-01 19:29:32 CST (1706837372) LOOP value 'barometer' 2924.9393558775 outside limits (26.0, 32.5)

Seems the driver is now converting the BME280 T reading of 98790.06  to  2924.9393558775.  Point of reference (30.00 in) is about right for my location at this time.
Is there a way for the driver to also reformat the 2924.9393558775 to something more like 29.24 ?

bell...@gmail.com

unread,
Feb 2, 2024, 4:20:05 PMFeb 2
to weewx-user

So it looks like your pressure is off by a factor of 100. I would think either of these would work (untested).
http://www.weewx.com/docs/5.0/reference/weewx-options/stdcalibrate/?h=stdco
[StdCalibrate]
[[Corrections]]
barometer = barometer / 100

https://github.com/bellrichm/WeeWX-MQTTSubscribe/wiki/Additional-Options#conversion_func


[[[pa]]]]
ignore = false # opt back in for this field
name = barometer
units = hPa

conversion_func = lambda x : x / 100

I can see pros and cons of either.

Frank Gruhlke

unread,
Feb 2, 2024, 6:29:13 PMFeb 2
to weewx-user
Tried option #2 and weewx is now reporting the barometer in inHg!  Truely appreciate your willingness to help!

Thank you, thank you, thank you!

bell...@gmail.com

unread,
Feb 3, 2024, 7:34:35 AMFeb 3
to weewx-user
That’s great! Thanks for letting us know.
rich

Reply all
Reply to author
Forward
0 new messages