Mensajes recientes

Páginas: 1 ... 7 8 [9] 10
81
Bricometeo / Re:Exposición a la intemperie pluviómetro Cocorash
« Último mensaje por Ubik en 08 de Septiembre de 2026, 08:40:40 »
Es es el problema de todos los plásticos.
82
 Perfecto, esta versión si que funciona, corriendo sin problemas.
 plau2
83
Versión 0.2 funcionando en mi ordenador bajo Python 3.11

Espero que me digas si funciona con 3.13
84
Vaya....he vuelto a subir otra versión.

Me di cuenta que el viento estaba mal en la corrección.....

Tengo que limpiar ficheros....3 ordenadores es mal negocio para hacer actualizaciones *+* *+* *+* *+* al final me lio entre la versión que tengo guardada en un ordenador y la de otros
85
Bien.....el problema es que distutils fue eliminado en Python 3.12

Como yo no tengo actualmente ningún Debian 13 no puedo probar la corrección.

Voy a subir a Github la versión 0.2 del uploader.

Ya me contarás si funciona
86
He encontrado el error, con la ayuda de Gemini.

" El script que te han pasado está obsoleto para tu versión de sistema operativo. Intenta importar distutils, una librería nativa que fue eliminada definitivamente a partir de Python 3.12 (y tu Debian 13 está ejecutando Python 3.13, como se ve en el log)."

Como tú usas Python 3.11.2, si que te funciona.
87
Pues no te puedo decir.

Pero la línea "REQUIRED_WEEWX = "3.8.0"" indica que se requiere una versión mínima de Weewx, pero no exclusivamente esa versión.

Citar
jantoni@rock64:~$ sudo systemctl restart weewx@gw2000 && sudo journalctl -f -u weewx@gw2000
[sudo] contraseña para jantoni:
sep 07 06:52:27 rock64 weewxd-gw2000[48740]: INFO __main__: Received signal TERM (15).
sep 07 06:52:27 rock64 weewxd-gw2000[48740]: INFO weewx.engine: Main loop exiting. Shutting engine down.
sep 07 06:52:27 rock64 systemd[1]: Stopping [email protected] - WeeWX gw2000...
sep 07 06:52:27 rock64 weewxd-gw2000[48740]: INFO weewx.engine: Shutting down StdReport thread
sep 07 06:52:28 rock64 weewxd-gw2000[48740]: INFO user.gw1000: GatewayCollector thread has been terminated
sep 07 06:52:28 rock64 weewxd-gw2000[48740]: INFO __main__: Terminating weewx version 5.5.0
sep 07 06:52:28 rock64 systemd[1]: [email protected]: Deactivated successfully.
sep 07 06:52:28 rock64 systemd[1]: Stopped [email protected] - WeeWX gw2000.
sep 07 06:52:28 rock64 systemd[1]: [email protected]: Consumed 12h 55min 7.183s CPU time.
sep 07 06:52:28 rock64 systemd[1]: Started [email protected] - WeeWX gw2000.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Initializing weewxd-gw2000 version 5.5.0
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Command line: /usr/share/weewx/weewxd.py --log-label weewxd-gw2000 /etc/weewx/gw2000.conf
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Using Python: 3.11.2 (main, May 12 2026, 05:17:27) [GCC 12.2.0]
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Located at:   /usr/bin/python3
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Platform:     Linux-6.18.37-current-rockchip64-aarch64-with-glibc2.36
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Locale:       'es_ES.UTF-8'
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Entry path:   /usr/share/weewx/weewxd.py
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: WEEWX_ROOT:   /etc/weewx
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Config file:  /etc/weewx/gw2000.conf
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: User module:  /etc/weewx/bin/user
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Debug:        0
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: User:         weewx
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Group:        weewx
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO __main__: Groups:       dialout weewx
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Loading station type GW1000 (user.gw1000)
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO user.gw1000: GatewayDriver: version is 0.6.3
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO user.gw1000:      device address is 192.168.0.170:45000
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO user.gw1000:      poll interval is 5 seconds
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.engine: StdConvert target unit is 0x1
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.wxservices: StdWXCalculate will use data binding wx_binding
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Archive will use data binding wx_binding
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Record generation will be attempted in 'software'
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Using archive interval of 300 seconds (software record generation)
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: StationRegistry: Registration not requested.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: Wunderground: Posting not enabled.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: PWSweather: Posting not enabled.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: CWOP: Posting not enabled.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: WOW: Posting not enabled.
sep 07 06:52:29 rock64 weewxd-gw2000[222606]: INFO weewx.restx: AWEKAS: Posting not enabled.
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.meteoclimatic_v3: version is 0.1
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.meteoclimatic_v3: Station M2223
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.meteoclimatic_v3: Data will be uploaded to https://api.m11c.net/v3/station/wxupdate
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.meteoclimatic_v3: Fields: TMP;DHTM;DLTM;MHTM;MLTM;YHTM;LHTM;HUM;DHHM;DLHM;MHHM;MLHM;YHHM;YLHM;BAR;DHBR;DLBR;MHBR;MLBR;YHBR;YLBR;AZI;WND;DGST;MGST;YGST;DPCP;MPCP;YPCP;SUN;DSUN;MSUN;YSUN;UVI;DUVI;MUVI;YUVI;PM1;DHPM1;DLPM1;MHPM1;MLPM1;YHPM1;YLPM1;PM25;DHPM25;DLPM25;MHPM25;MLPM25;YHPM25;YLPM25;PM10;DHPM10;DLPM10;MHPM10;MLPM10;YHPM10;YLPM10
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO weewx.engine: 'pyephem' detected, extended almanac data is available
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO __main__: Starting up weewx version 5.5.0
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Using binding 'wx_binding' to database 'gw2000.sdb'
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO weewx.manager: Starting backfill of daily summaries
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO weewx.manager: Daily summaries up to date
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO weewx.engine: Starting main packet loop.
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.gw1000: Using 't_rainyear' for rain total
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.gw1000: Using 'p_rainyear' for piezo rain total
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.gw1000: skipping rain measurement of 337.8: no last rain
sep 07 06:52:30 rock64 weewxd-gw2000[222606]: INFO user.gw1000: skipping piezo rain measurement of 326.7: no last rain
sep 07 06:55:16 rock64 weewxd-gw2000[222606]: INFO weewx.manager: Added record 2026-09-07 06:55:00 UTC (1788764100) to database 'gw2000.sdb'
sep 07 06:55:16 rock64 weewxd-gw2000[222606]: INFO weewx.manager: Added record 2026-09-07 06:55:00 UTC (1788764100) to daily summary in 'gw2000.sdb'
sep 07 06:55:18 rock64 weewxd-gw2000[222606]: INFO weewx.restx: MeteoclimaticV3: Published record 2026-09-07 06:55:00 UTC (1788764100)
sep 07 06:55:25 rock64 weewxd-gw2000[222606]: INFO weewx.cheetahgenerator: Generated 8 files for report SeasonsReport in 7.19 seconds
sep 07 06:55:26 rock64 weewxd-gw2000[222606]: INFO weewx.imagegenerator: Generated 16 images for report SeasonsReport in 1.59 seconds
sep 07 06:55:31 rock64 weewxd-gw2000[222606]: INFO weewx.reportengine: ftpgenerator: Ftp'd 23 files in 4.42 seconds

Como ves, uso Weewx 5.5.0, con Python 3.11
88
 He descomentado y este es el error que me dá:
sep 07 05:12:33 debian13 weewxd[71519]: INFO user.gw1000: GatewayCollector thread has been terminated
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__: Caught unrecoverable exception:
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****  '(' was never closed (meteoclimatic_v3.py, line 70)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****  Traceback (most recent call last):
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd.py", line 121, in main
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      engine = weewx.engine.StdEngine(config_dict)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 90, in __init__
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      self.loadServices(config_dict)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 158, in loadServices
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      obj = weeutil.weeutil.get_object(svc)(self, config_dict)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****            ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/usr/share/weewx/weeutil/weeutil.py", line 1405, in get_object
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      module = importlib.import_module(module_name)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/usr/lib/python3.13/importlib/__init__.py", line 88, in import_module
sep 07 05:12:33 debian13 weewxd[71519]: Using configuration file /root/weewx-data/weewx.conf
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      return _bootstrap._gcd_import(name[level:], package, level)
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****             ~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap_external>", line 1022, in exec_module
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap_external>", line 1160, in get_code
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap_external>", line 1090, in source_to_code
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****    File "/root/weewx-data/bin/user/meteoclimatic_v3.py", line 70
sep 07 05:12:33 debian13 weewxd[71519]: Traceback (most recent call last):
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****      raise weewx.UnsupportedFeature("weewx %s or greater is required, found %s"
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****                                    ^
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****  SyntaxError: '(' was never closed
sep 07 05:12:33 debian13 weewxd[71519]: CRITICAL __main__:     ****  Exiting.
sep 07 05:12:33 debian13 weewxd[71519]:   File "/usr/share/weewx/weewxd.py", line 226, in <module>

Igual es porque tengo Debian 13 o Python 3.13
89
Esto es lo que tengo en la configuración de Weewx

Citar
    [[MeteoclimaticV3]]
        # Esta sección está dedicada a la configuración para enviar datos a la API V3 de Meteoclimatic

        # No es válida para enviar datos a APIs más antiguas.
        # Puedes consultar la documentación y la Wiki de la API V3 en https://github.com/meteoclimatic/API_V3
        enable = true
        station_id = "M2223"
        api_key = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
        log_success = true
        log_failure = true

Y en el "uploader":

Citar
# Copyright 2024
# derived from wns.py by Johanna Roedenbeck, which was
# derived from the Windy driver by Matthew Wall
# thanks to Gary and Tom Keffer from Weewx development group

"""
This is a weewx extension that uploads data to Meteoclimatic (v3 API)

https://www.meteoclimatic.net

Data is sent as a JSON payload in a HTTP POST request to

    https://api.m11c.net/v3/station/wxupdate

The station code travels inside the JSON payload (field 'stationcode'),
together with the current timestamp in ISO-8601 UTC format (field 'TS')
and all the weather values. The user's APIkey is NOT sent in the
payload; it goes in the 'APIkey' HTTP header instead.

Minimal configuration

[StdRESTful]
    [[MeteoclimaticV3]]
        enable = true
        station_id = your Meteoclimatic station code
        api_key = your Meteoclimatic APIkey
        skip_upload = false
        log_url = false

"""

# deal with differences between python 2 and python 3
try:
    # Python 3
    import queue
except ImportError:
    # Python 2
    # noinspection PyUnresolvedReferences
    import Queue as queue

from distutils.version import StrictVersion
import datetime
import json
import sys
import time

import weedb
import weewx
import weewx.manager
import weewx.restx
import weewx.units
import weewx.xtypes
from weeutil.weeutil import to_bool, TimeSpan
import weeutil.weeutil

VERSION = "0.1"

REQUIRED_WEEWX = "3.8.0"
if StrictVersion(weewx.__version__) < StrictVersion(REQUIRED_WEEWX):
    raise weewx.UnsupportedFeature("weewx %s or greater is required, found %s"
                                   % (REQUIRED_WEEWX, weewx.__version__))
90
 Pues no sé, a mí no me cargaba, las he comentado y a funcionar.
 Ahora no puedo, mañana pruebo a descomentarlas. Igual a coincidido y era otra cosa.
Páginas: 1 ... 7 8 [9] 10