Page 1 of 2

Problems with new installation

Posted: Sun 25 Aug 2024 5:01 pm
by Joe Curtis
20240825-172136.txt
I have recently had to reinstall my system due to my micro SSD card going on the blink.
When I restart the new system it appears to continually restart.

Any insights would be more than welcome


cmx@Pi3SOS:~ $ cd /opt/CumulusMX
cmx@Pi3SOS:/opt/CumulusMX $ dotnet CumulusMX.dll
Cumulus MX v.4.1.3 build 4028
Working Dir: /opt/CumulusMX/

Cumulus running at: http://localhost:8998/
http://127.0.1.1:8998/
http://192.168.1.107:8998/

Open the admin interface by entering one of the above URLs into a web browser.

Opening station type 5 - Fine Offset
Last update: 2024-08-24T07:10:00
Looking for Fine Offset station
Fine Offset station found
Looking for Fine Offset station
Fine Offset station found
Looking for Fine Offset station
Fine Offset station found
Looking for Fine Offset station
Fine Offset station found
etc.

Apart from the date the dashboard entries are missing

Re: Problems with new installation

Posted: Sun 25 Aug 2024 5:50 pm
by PaulMy
Hi,
A few things in the MXdiags...

Code: Select all

2024-08-25 17:21:40.369 TestPhpUploadCompression: Error - 
2024-08-25 17:21:40.373 TestPhpUploadCompression: Error -  - Exception Type: System.AggregateException
Message: One or more errors occurred. (Connection refused (192.168.1.107:443))
Inner Exception... 
Exception Type: System.Net.Http.HttpRequestException
Message: Connection refused (192.168.1.107:443)
Inner Exception... 
Exception Type: System.Net.Sockets.SocketException
Message: Connection refused
Others may know better, but first, if you are uploading to website using the PHP method have you copied the PHP Upload secret: code in your \webfiles\upload.php file and then FTP that file to your website?

Code: Select all

2024-08-25 17:21:43.122 ERROR: Duplicate entry in dayfile for 22/08/2024
2024-08-25 17:21:43.122 ERROR: Duplicate entry in dayfile for 23/08/2024
2024-08-25 17:21:43.127 LoadDayFile: Loaded 94 entries to recent daily data list
2024-08-25 17:21:43.129 LoadDayFile: Found 34 duplicate entries, please correct your dayfile and try again
2024-08-25 17:21:43.142 Monthly log file data/202408log.txt Checked OK
2024-08-25 17:21:43.161 GetRainCounter: Nothing to do
2024-08-25 17:21:43.166 GetRainFallTotals: Getting rain totals, rain season start = 1
2024-08-25 17:21:43.167 GetRainFallTotals: Today = 25/08/24
2024-08-25 17:21:43.169 GetRainFallTotals: Rainthismonth from dayfile: 1.04
2024-08-25 17:21:43.169 GetRainFallTotals: Rainthisyear from dayfile: 4.949999999999998
2024-08-25 17:21:43.174 Checking SQLite integrity...
2024-08-25 17:21:43.256 SQLite integrity check OK
As noted, the dayfile has errors. Where you able to correct the dayfile from your issue a couple months ago?

Code: Select all

2024-08-25 17:21:43.274 FO synchronise reads: True
2024-08-25 17:21:43.274 FO synchronise avoid time: 3
2024-08-25 17:21:43.274 FO last station time: 2024-08-16T01:20:00
2024-08-25 17:21:43.274 FO last sensor time : 2024-08-16T01:18:39
2024-08-25 17:21:43.280 Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
2024-08-25 17:21:43.451 Fine Offset station found
2024-08-25 17:21:43.488 Stream open failed
2024-08-25 17:21:45.472 This Cumulus MX instance is running the latest release version
2024-08-25 17:21:53.489 Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
2024-08-25 17:21:53.507 Fine Offset station found
2024-08-25 17:21:53.510 Stream open failed
2024-08-25 17:22:03.511 Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
2024-08-25 17:22:03.525 Fine Offset station found
2024-08-25 17:22:03.528 Stream open failed
2024-08-25 17:22:13.528 Looking for Fine Offset station, VendorID=0x1941 ProductID=0x8021
2024-08-25 17:22:13.543 Fine Offset station found
2024-08-25 17:22:13.547 Stream open failed
Have you entered the correct settings for your station type?

Enjoy,
Paul

Re: Problems with new installation

Posted: Sun 25 Aug 2024 6:53 pm
by SamiS
I think this is yet another FO usb station that does not work due to the ”Stream open failed” error. I think no-one has resolved this yet.

Re: Problems with new installation

Posted: Mon 26 Aug 2024 2:49 pm
by mcrossley
It is a permissions problem.

If I run CumulusMX as root it can read the HID device OK. As a regular user it fails.

I have tried adding a new rule file to /etc/udev/rules.d/
with the contents:

Code: Select all

SUBSYSTEM=="usb", ATTR{idVendor}=="1941", ATTR{idProduct}=="8021", MODE="0666"
and adding a new line to the existing 99-com.rules file

Code: Select all

SUBSYSTEM=="usb", GROUP="pi", MODE="0660"
Either of which is supposed to fix this, but even after a reboot (incase "sudo udevadm control --reload" didn't work) my regular user "pi" on an old system still had not access to the HID device.

Any Linux gurus got any more ideas?

Re: Problems with new installation

Posted: Mon 26 Aug 2024 2:52 pm
by mcrossley
I also tried changing the file permissions ton the device itself (/dev/usb/hiddev0), still the same problem.

Re: Problems with new installation

Posted: Mon 26 Aug 2024 3:07 pm
by freddie
Try adding the pi user to the wheel group.

Re: Problems with new installation

Posted: Mon 26 Aug 2024 3:56 pm
by mcrossley
I tried using "plugdev" as the group in the udev rules as recommended elsewhere - and the pi user is a member of that group by default. No workie.

Add the pi user to wheel group - "The group "wheel" does not exist.

Re: Problems with new installation

Posted: Mon 26 Aug 2024 4:19 pm
by mcrossley
OK fixed! The rule syntax is slightly different from the original source I looked at.

To fix this I did the following (all as root/sudo)...
  1. Create a new udev rule file:

    Code: Select all

    /etc/udev/rules.d/50-usb-cmx.rules
  2. Add the following content:

    Code: Select all

    SUBSYSTEM=="input", GROUP="input", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE:="0666", GROUP="plugdev"
    KERNEL=="hidraw*", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666", GROUP="plugdev"
  3. Unplug the stations USB cable
  4. Run the command

    Code: Select all

    sudo udevadm control --reload-rules
  5. Plug the station USB cable back in
  6. Run Cumulus MX as a regular user - now works :D

Re: Problems with new installation

Posted: Tue 27 Aug 2024 4:00 pm
by Joe Curtis
Many thanks Mark, that seems to have done the trick although I haven't a clue what is going on!

Re: Problems with new installation

Posted: Thu 29 Aug 2024 10:33 pm
by dazza1223
mcrossley wrote: Mon 26 Aug 2024 4:19 pm OK fixed! The rule syntax is slightly different from the original source I looked at.

To fix this I did the following (all as root/sudo)...
  1. Create a new udev rule file:

    Code: Select all

    /etc/udev/rules.d/50-usb-cmx.rules
  2. Add the following content:

    Code: Select all

    SUBSYSTEM=="input", GROUP="input", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE:="0666", GROUP="plugdev"
    KERNEL=="hidraw*", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666", GROUP="plugdev"
  3. Unplug the stations USB cable
  4. Run the command

    Code: Select all

    sudo udevadm control --reload-rules
  5. Plug the station USB cable back in
  6. Run Cumulus MX as a regular user - now works :D
so i have updated both of the images so can somebody test them before i release them and let me know

https://www.davisworthing.co.uk/downloads.php

Re: Problems with new installation

Posted: Wed 04 Sep 2024 12:51 pm
by Bob.Stansfield
i have been having issues where no data was received on dashboard after upgrading to v4 with my fine offset station. I have done the above and is now working at long last, thank you Mark :clap:

Re: Problems with new installation

Posted: Tue 07 Jan 2025 3:51 pm
by leeb9972
mcrossley wrote: Mon 26 Aug 2024 4:19 pm OK fixed! The rule syntax is slightly different from the original source I looked at.

To fix this I did the following (all as root/sudo)...
  1. Create a new udev rule file:

    Code: Select all

    /etc/udev/rules.d/50-usb-cmx.rules
  2. Add the following content:

    Code: Select all

    SUBSYSTEM=="input", GROUP="input", MODE="0666"
    SUBSYSTEM=="usb", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE:="0666", GROUP="plugdev"
    KERNEL=="hidraw*", ATTRS{idVendor}=="1941", ATTRS{idProduct}=="8021", MODE="0666", GROUP="plugdev"
  3. Unplug the stations USB cable
  4. Run the command

    Code: Select all

    sudo udevadm control --reload-rules
  5. Plug the station USB cable back in
  6. Run Cumulus MX as a regular user - now works :D
Can you make this a bit simpler for raspberry pi noob, how to get root/sudo ??

Re: Problems with new installation

Posted: Tue 07 Jan 2025 4:47 pm
by freddie
Either

Code: Select all

 sudo su -
and then run the commands, or prefix every command with

Code: Select all

sudo

Re: Problems with new installation

Posted: Tue 07 Jan 2025 5:06 pm
by leeb9972
Hmm, get the following error?
sudo: /etc/udev/rules.d/50-usb-cmx.rules: command not found
Any ideas?

Re: Problems with new installation

Posted: Tue 07 Jan 2025 5:33 pm
by freddie
You're creating a new rule which is stored in a file. So you need to do

Code: Select all

sudo vi /etc/udev/rules.d/50-usb-cmx.rules
to create the file and open it in a text editor, add the rule in the file and save it. With vi/vim you hit ESC and press

Code: Select all

:wq
to save the file and quit the editor.
Alternatively, create your file on your laptop/pc and upload it to your pi. - but you will need to change ownership and permissions if you do it that way, so might be best to brave the vim command line editor.