Welcome to the Cumulus Support forum.

Latest Cumulus MX V3 release 3.28.6 (build 3283) - 21 March 2024

Cumulus MX V4 beta test release 4.0.0 (build 4017) - 17 March 2024

Legacy Cumulus 1 release v1.9.4 (build 1099) - 28 November 2014 (a patch is available for 1.9.4 build 1099 that extends the date range of drop-down menus to 2030)

Download the Software (Cumulus MX / Cumulus 1 and other related items) from the Wiki

WH1080 not communicating with CumulusMX on Linux Mint

From build 3044 the development baton passed to Mark Crossley. Mark has been responsible for all the Builds since. He has made the code available on GitHub. It is Mark's hope that others will join in this development, but at the very least he welcomes your ideas for future developments (see Cumulus MX Development suggestions).

Moderator: mcrossley

Post Reply
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

I have setup latest CumulusMX on my PC running Linux Mint. However, no reading is happening and when I open terminal it periodically repeats:

Code: Select all

Looking for Fine Offset station
Fine Offset station found
How can I solve this? Thank you in advance!
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by mcrossley »

Switch on debug logging in Cumulus and then post the latest MXdiags log file, ta.
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

Here is the file. Just to add more details: I already tried restarting Cumulus, the PC, the station, tried disconnecting and connecting again. Also the user is added to the dialout group in order to have permission to use USB.
You do not have the required permissions to view the files attached to this post.
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by mcrossley »

There is no debug logging in that file?

But is does show that CMX is not able to open the file stream to the USB device.

Have you tried running CMX with sudo to minimise any permissions issues?
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

Well, I do not know what the debug info should look like. Anyway, I launched it with the -debug option like so:

Code: Select all

mono ./CumulusMX/CumulusMX.exe -debug
I also tried it with sudo, and it works.

Is there a list of possible permission requirements other than the mentioned dialout group?
Or more generally: how to make it run without sudo?
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by mcrossley »

I'm not really the man for this - maybe @freddie?

But a quick search shows pages like - https://ramonh.dev/2020/09/22/usb-device-linux-startup/
freddie
Posts: 2433
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by freddie »

mcrossley wrote: Thu 19 May 2022 5:02 pm I'm not really the man for this - maybe @freddie?

But a quick search shows pages like - https://ramonh.dev/2020/09/22/usb-device-linux-startup/
If you follow all the steps in the link @mcrossley provided (changing the references to suit your specific device) then you will be able to run unprivileged. However it is much easier just to run privileged - i.e. using sudo. What is your argument for not doing this?
Freddie
Image
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

First is the fact, that it needs to enter password everytime Cumulus starts. I know it should not get shut down often, but the computer is a temporarry solution, because it sometimes unexpectedly crashes. Even though that may be automated.

Next is just giving superuser privileges to a program that can do anything after that.

Also is there a way for me to find which device is used by Cumulus?

Thank you
freddie
Posts: 2433
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by freddie »

throwaway123 wrote: Thu 19 May 2022 6:38 pm First is the fact, that it needs to enter password everytime Cumulus starts. I know it should not get shut down often, but the computer is a temporarry solution, because it sometimes unexpectedly crashes. Even though that may be automated.

Next is just giving superuser privileges to a program that can do anything after that.

Also is there a way for me to find which device is used by Cumulus?

Thank you
If you run Cumulus as a service then that does away with having to enter a password.
I do understand your reluctance to have a program running privileged. Do you use the computer for anything else - i.e. running a web site? Is the computer accessible from outwith your network? Does anybody who you don't trust have access to your computer? If the answer is no to these questions then I don't see the risk in running Cumulus under a privileged user. I do this (and can answer "no" to the questions).
You can run the command "lsusb" in a terminal, and you should be able to spot your device in the list. Note that the device will be your weather station (not Cumulus - Cumulus just reads data from the device via USB).
Freddie
Image
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

Well, I might just give in to your arguments. :D

I used lsusb myself and the weather station shows up, but there is no info about which file represents it in the /dev folder. Or how to refere to it in any other way.
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by mcrossley »

Ah, yes a 1080 station is a USB HID device, it will not show up in /dev. I'm not sure how Linux would refer to these devices for permissions.

Cumulus writes to the USB port to send commands to read you station, normally that sort of task is performed by an elevated process on behalf of the user.
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

There is a folder /dev/usb taht contains hiddevX, where X is 0, 1, 2, ... On my main computer there are hiddev0 and hiddev1 representing my mouse and keyboard. Could you give me some info about which part of source code are responsible for communication with the 1080? I would try to have a look and perhaps I'll find somthing.

Thank you.
User avatar
mcrossley
Posts: 12689
Joined: Thu 07 Jan 2010 9:44 pm
Weather Station: Davis VP2/WLL
Operating System: Bullseye Lite rPi
Location: Wilmslow, Cheshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by mcrossley »

My code just calls a library to do the HID handling. It just passes in the VID/PID of the FO station (VID = 0x1941, PID = 0x8021) and gets an object back I can use to open a Stream to read/write to the device.
freddie
Posts: 2433
Joined: Wed 08 Jun 2011 11:19 am
Weather Station: Davis Vantage Pro 2 + Ecowitt
Operating System: GNU/Linux Ubuntu 22.04 LXC
Location: Alcaston, Shropshire, UK
Contact:

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by freddie »

throwaway123 wrote: Thu 19 May 2022 7:28 pm Well, I might just give in to your arguments. :D

I used lsusb myself and the weather station shows up, but there is no info about which file represents it in the /dev folder. Or how to refere to it in any other way.
I would use udev to do this rather than changing perms manually on anything under /dev. lsusb should give you output like this (as an example):

Code: Select all

Bus 001 Device 003: ID 090c:1000 Silicon Motion, Inc. - Taiwan (formerly Feiya Technology Corp.) Flash Drive
Take note of the vendor and product IDs relating to your weather station. In the example above, vendor ID is 090c and product ID is 1000.
Create a file (as root) under /etc/udev/rules.d/ and name it something like 60-wh1080.rules (it has to have the .rules extension). Put this in the file:

Code: Select all

SUBSYSTEM=="usb", ATTRS{idVendor}=="090c", ATTR{idProduct}=="1000", MODE:="0666"
replacing the 090c and 1000 with your weather station's vendor and product IDs. Save the file. Reboot and then try running Cumulus as an unprivileged user.
Freddie
Image
throwaway123
Posts: 7
Joined: Thu 19 May 2022 7:02 am
Weather Station: WH1080
Operating System: Linux Mint

Re: WH1080 not communicating with CumulusMX on Linux Mint

Post by throwaway123 »

Thank you to both of you. I decided to let it run as a service, which works wonderfully.
Post Reply