[weewx-user] BYOWS and permissions Weewx 5.1

2024-07-10 Thread Guido Groetie
I installed Weewx 5.1 on a RPI 2 and made a BYOWS station. It worked, but I 
screwed up installing updates and shutdown the RPI, so my SD was skrewed. I 
made a new installation, but no having trouble to get Weewx with BYOWS 
driver working. 

BYOWS scripts work, Weewx installing works (works fine with simulator. But 
when I install BYOWS driver and set the BYOWS as default in weewx.conf I 
get this error:

groetg@byows-jim:~ $ sudo systemctl status weewx
× weewx.service - WeeWX
Loaded: loaded (/lib/systemd/system/weewx.service; enabled; preset: enabled)
Active: failed (Result: exit-code) since Tue 2024-07-09 17:38:35 CEST; 5min 
ago
Duration: 1.661s
Docs: https://weewx.com/docs
Process: 17613 ExecStart=weewxd /etc/weewx/weewx.conf (code=exited, 
status=4)
Main PID: 17613 (code=exited, status=4)
CPU: 1.651s

Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine:  File 
"/usr/local/lib/python3.11/dist-packages/gpiozero/pins/pi.py", line 639, in 
_set_when_changed
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine:  
self._enable_event_detect()
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine:  File 
"/usr/local/lib/python3.11/dist-packages/gpiozero/pins/rpigpio.py", line 
220, in _enable_event_detect
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine:  
GPIO.add_event_detect(
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL weewx.engine:  
RuntimeError: Failed to add edge detection
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL main: Unable to load 
driver: Failed to add edge detection
Jul 09 17:38:35 byows-jim weewxd[17613]: CRITICAL main:  Exiting...
Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Main process exited, 
code=exited, status=4/NOPERMISSION
Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Failed with result 
'exit-code'.
Jul 09 17:38:35 byows-jim systemd[1]: weewx.service: Consumed 1.651s CPU 
time.

DEBUG info:
Using configuration file /etc/weewx/weewx.conf

System info
Platform: Linux-6.6.31+rpt-rpi-v7-armv7l-with-glibc2.36
Python Version: 3.11.2

Load Information
1 minute load average: 0.14
5 minute load average: 0.37
15 minute load average: 0.35

General Weewx info
Weewx version 5.1.0 detected.

Currently installed extensions
Extension Name Version Description
byows_rpi 0.51 Bring Your Own Weather Station (BYOWS) Driver for the 
Raspberry Pi

Archive info
Database name: weewx.sdb
Table name: archive
Version 4.0
Unit system: 1 (US)
First good timestamp: 2024-07-09 15:50:00 CEST (1720533000)
Last good timestamp: 2024-07-09 17:25:00 CEST (1720538700)
Number of records: 20
weewx (weewx.conf) is set to use an archive interval of 300 seconds.
The station hardware was not interrogated to determine the archive interval.

Supported SQL keys
dateTime usUnits interval
altimeter appTemp appTemp1
barometer batteryStatus1 batteryStatus2
batteryStatus3 batteryStatus4 batteryStatus5
batteryStatus6 batteryStatus7 batteryStatus8
cloudbase co co2
consBatteryVoltage dewpoint dewpoint1
ET extraHumid1 extraHumid2
extraHumid3 extraHumid4 extraHumid5
extraHumid6 extraHumid7 extraHumid8
extraTemp1 extraTemp2 extraTemp3
extraTemp4 extraTemp5 extraTemp6
extraTemp7 extraTemp8 forecast
hail hailBatteryStatus hailRate
heatindex heatindex1 heatingTemp
heatingVoltage humidex humidex1
inDewpoint inHumidity inTemp
inTempBatteryStatus leafTemp1 leafTemp2
leafWet1 leafWet2 lightning_distance
lightning_disturber_count lightning_energy lightning_noise_count
lightning_strike_count luminosity maxSolarRad
nh3 no2 noise
o3 outHumidity outTemp
outTempBatteryStatus pb pm10_0
pm1_0 pm2_5 pressure
radiation rain rainBatteryStatus
rainRate referenceVoltage rxCheckPercent
signal1 signal2 signal3
signal4 signal5 signal6
signal7 signal8 snow
snowBatteryStatus snowDepth snowMoisture
snowRate so2 soilMoist1
soilMoist2 soilMoist3 soilMoist4
soilTemp1 soilTemp2 soilTemp3
soilTemp4 supplyVoltage txBatteryStatus
UV uvBatteryStatus windBatteryStatus
windchill windDir windGust
windGustDir windrun windSpeed

Databases configured in weewx.conf:
archive_sqlite:
database_name weewx.sdb
driver weedb.sqlite
SQLITE_ROOT /var/lib/weewx
archive_mysql:
database_name weewx
driver weedb.mysql
host localhost
user weewx
password weewx

--- Start configuration file /etc/weewx/weewx.conf ---

WEEWX CONFIGURATION FILE
Copyright (c) 2009-2024 Tom Keffer tkef...@gmail.com
See the file LICENSE.txt for your rights.
##

This section is for general configuration information.
Set to 1 for extra debug info, otherwise comment it out or set to zero.
debug = 1

Whether to log successful operations. May get overridden below.
log_success = True

Whether to log unsuccessful operations. May get overridden below.
log_failure = True

This configuration file was created by ...
version = 5.1.0
config_path = /etc/weewx/weewx.conf
WEEWX_ROOT = /etc/weewx

###

[weewx-user] Re: Select which variables to be used from a certain driver

2022-12-06 Thread Guido Cioni
In case someone is interested in the future I solved by myself commenting 
out the lines in the driver where those variables where created, then 
turned back on the data service for BME280 and everything worked fine. 

On Friday, December 2, 2022 at 4:04:04 PM UTC+1 Guido Cioni wrote:

> I'm currently using the meteostick driver (
> https://github.com/matthewwall/weewx-meteostick) to read data coming from 
> a Vantage Vue Station.
> I started using a meteostick because reading the data with the rtldavis 
> driver was not working properly and caused me some headaches trying to fix 
> erroneous measurements.
>
> When using rtldavis I was saving pressure, in_temp and in_humidity coming 
> from a BME280 sensor using the bme280wx driver. With meteostick, as 
> pressure and temperature are already coming from the integrated sensor, I 
> disabled the bme280 driver. 
> However, I would like to use the data for in_temp, in_hum and pressure 
> coming from the BME280 sensor instead than the meteostick, due to the 
> higher accuracy.
>
> Is there any way to tell weewx to ignore the values coming from the 
> meteostick for these 3 variables and only take the ones from BME280?
>
> From what I understand the meteostick driver generates a LOOP packet with 
> all sensor values and the only way to prevent something from being passed 
> to weewx is to modify the driver manually, as the mapping only changes some 
> of the variable names. 
>
> On the same note, could you point to a page on the documentation that 
> explains how to add an additional variable from an additional sensor to the 
> LOOP packet and to the database? 
>
> Thanks 
>
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/9df95fa8-6e9d-4f2e-bafe-66650d3891b8n%40googlegroups.com.


[weewx-user] Select which variables to be used from a certain driver

2022-12-02 Thread Guido Cioni
I'm currently using the meteostick driver 
(https://github.com/matthewwall/weewx-meteostick) to read data coming from 
a Vantage Vue Station.
I started using a meteostick because reading the data with the rtldavis 
driver was not working properly and caused me some headaches trying to fix 
erroneous measurements.

When using rtldavis I was saving pressure, in_temp and in_humidity coming 
from a BME280 sensor using the bme280wx driver. With meteostick, as 
pressure and temperature are already coming from the integrated sensor, I 
disabled the bme280 driver. 
However, I would like to use the data for in_temp, in_hum and pressure 
coming from the BME280 sensor instead than the meteostick, due to the 
higher accuracy.

Is there any way to tell weewx to ignore the values coming from the 
meteostick for these 3 variables and only take the ones from BME280?

>From what I understand the meteostick driver generates a LOOP packet with 
all sensor values and the only way to prevent something from being passed 
to weewx is to modify the driver manually, as the mapping only changes some 
of the variable names. 

On the same note, could you point to a page on the documentation that 
explains how to add an additional variable from an additional sensor to the 
LOOP packet and to the database? 

Thanks 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/6e3ad934-3f2f-4441-bca9-373b2ab7939dn%40googlegroups.com.


Re: [weewx-user] utility to load missing data

2022-08-08 Thread Guido Cioni
You're right, sorry. I didn't see that the utility was using the /history 
endpoint.
You can only download one day at a time but of course wee_import takes care 
of that by looping over the days in the date range 

On Monday, August 8, 2022 at 11:29:46 AM UTC+2 gjr80 wrote:

> Just to clarify a few WU related wee_import points. wee_import will 
> import archive data from WU provided you have a valid station ID and API 
> key. As far as I am aware (from limited testing) your API key will allow 
> you to import data from any station. I am not aware of any limitations on 
> how much history you can access/import, I have accessed up to six years of 
> my stations WU history without issue. There is no need to manually download 
> WU data before importing, wee_import takes care of obtaining the required 
> data via the WU API.
>
> Finally, I am not aware of any issues that prevent wee_import reliably 
> working with the current WU API (other than the usually flakiness that WU 
> seems to exhibit more and more often these days).
>
> Gary
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/7935820a-e105-418c-a063-0779971e9019n%40googlegroups.com.


Re: [weewx-user] Re: Netatmo

2022-08-07 Thread Guido Cioni
Weewx runs both in Python 2 and 3, so you could easily be running in Python
2 even with the latest version.

You have to check which Python is weewx using in /etc/default/weewx and
WEEWX_PYTHON

On Mon, 8 Aug 2022, 07:37 'neu...@bnjpro.dk' via weewx-user, <
weewx-user@googlegroups.com> wrote:

> I am sure I'm running Python 3, since I upgrade WeeWX every now and then.
> I'm running version 4.8.0 (latest), And I'm sure it is not written in both
> Python 2 and Python 3. But If I'm running Python 2, where do I confirm
> which version? Both are installed on my server.
>
> And up until now the only problem I have is the issure pointed out
> earlier, with two reading from netatmo server, where only one of the are
> registered by WeeWX netatmo driver.
>
>
> Cheers
> Bent
>
> søndag den 7. august 2022 kl. 09.46.36 UTC+2 skrev guido...@gmail.com:
>
>> Are you really sure you're running weewx with Python 3? Because when I
>> tried to use this package on my installation it would not even start
>> exactly because of some incompatibilities (like print without
>> parentheses...).
>> If it's working for you I think you're still running under Python 2.
>>
>> Regarding the fix, it may not be complicated as you need to use OAuth2
>> instead than passing the password directly. Doesn't seem too difficult to
>> implement, but unfortunately I don't think I'll have time to do it :( (Plus
>> I don't use this plugin anymore so it would be difficult to test).
>> I will let you know in case
>>
>> On Saturday, August 6, 2022 at 11:20:01 PM UTC+2 neu...@bnjpro.dk wrote:
>>
>>> Well python 2 or 3, is not the problem it seems, because even though the
>>> weewx is now python 3, the driver for netatmo still works. But obviously
>>> the driver needs some sort of update to comply with the new API. I'm just
>>> not skilled for the job.
>>>
>>> But I can allways hope that somebody in the same need with the necessary
>>> skills turn up with a solution.
>>>
>>> Cheers
>>> Bent
>>>
>>> fredag den 5. august 2022 kl. 13.56.39 UTC+2 skrev guido...@gmail.com:
>>>
>>>> Unfortunately the code from the netatmo driver is really old (not even
>>>> Python 3 compatible) so I'm not sure it will be updated to account for this
>>>> change.
>>>>
>>>> On Friday, August 5, 2022 at 7:54:59 AM UTC+2 neu...@bnjpro.dk wrote:
>>>>
>>>>> I have received an email from Netatmo about them changing the API.
>>>>>
>>>>> I do not understand what that impiles to me. Does anyone understand
>>>>> what they are doing and will it break my ability to use WeeWX?
>>>>>
>>>>> The y explain about it here:
>>>>> https://dev.netatmo.com/apidocumentation/oauth#authorization-code
>>>>>
>>>>> Does anyone know or understand the code made to make Netatmo
>>>>> functional with weewx, and see a soplution to this topic?
>>>>>
>>>>> I'm not much of a programmer, especially not in python, so I'm am
>>>>> really lost. :-)
>>>>>
>>>>> Cheers
>>>>> Bent
>>>>>
>>>> --
> 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/FWGGPlg8UTE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> weewx-user+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/weewx-user/804f374b-d144-4051-81de-e78fbbae4e89n%40googlegroups.com
> <https://groups.google.com/d/msgid/weewx-user/804f374b-d144-4051-81de-e78fbbae4e89n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/CAJfSxXtodygyPNBOXewp7L6jtrPvocpJ2pbsizEkqdX07Yse1A%40mail.gmail.com.


Re: [weewx-user] utility to load missing data

2022-08-07 Thread Guido Cioni
You still need to first Download the data yourself before importing it.
For weather underground there are some APIs but they're extremely limited 
and you need to have a station there to use them.
Plus, if I remember correctly, you can only download a limited history of 
your own station.
there are some unofficial and unsupported ways of getting the data by 
parsing the html tables created when looking at.the daily history for a 
station, but that's far from ideal.
Also it depends on how long your period is

On Sunday, August 7, 2022 at 12:22:43 PM UTC+2 enu...@gmail.com wrote:

> Thank you. I did that manually. But what he was looking for was something 
> that was a data source, like weather underground, and that would import the 
> data between certain dates.
>
> El martes, 2 de agosto de 2022 a las 14:20:59 UTC+2, Tom escribió:
>
>> Look at the wee_import utility.
>>
>> Utilities Guide 
>> 
>> weewx.com 
>>  
>> 
>>
>>
>> —
>>
>> On Aug 2, 2022, at 7:09 AM, enu...@gmail.com  wrote:
>>
>> Is there any utility that allows you to download the data from a nearby 
>> station, for example from underground weather, to fill the database with 
>> the missing data?
>>
>>
>> I was looking at wuderfixer but I think it's for the opposite, to load 
>> the missing data in weather underground.
>>
>> -- 
>>
>> 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/d8a37ac1-1012-474f-9b52-45b9fa8cdecbn%40googlegroups.com
>>  
>> 
>> .
>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/f620cd3a-7dd2-4b29-83e8-363c808ae7dan%40googlegroups.com.


[weewx-user] Re: Netatmo

2022-08-07 Thread Guido Cioni
Are you really sure you're running weewx with Python 3? Because when I 
tried to use this package on my installation it would not even start 
exactly because of some incompatibilities (like print without 
parentheses...). 
If it's working for you I think you're still running under Python 2.

Regarding the fix, it may not be complicated as you need to use OAuth2 
instead than passing the password directly. Doesn't seem too difficult to 
implement, but unfortunately I don't think I'll have time to do it :( (Plus 
I don't use this plugin anymore so it would be difficult to test). 
I will let you know in case 

On Saturday, August 6, 2022 at 11:20:01 PM UTC+2 neu...@bnjpro.dk wrote:

> Well python 2 or 3, is not the problem it seems, because even though the 
> weewx is now python 3, the driver for netatmo still works. But obviously 
> the driver needs some sort of update to comply with the new API. I'm just 
> not skilled for the job.
>
> But I can allways hope that somebody in the same need with the necessary 
> skills turn up with a solution.
>
> Cheers
> Bent
>
> fredag den 5. august 2022 kl. 13.56.39 UTC+2 skrev guido...@gmail.com:
>
>> Unfortunately the code from the netatmo driver is really old (not even 
>> Python 3 compatible) so I'm not sure it will be updated to account for this 
>> change. 
>>
>> On Friday, August 5, 2022 at 7:54:59 AM UTC+2 neu...@bnjpro.dk wrote:
>>
>>> I have received an email from Netatmo about them changing the API.
>>>
>>> I do not understand what that impiles to me. Does anyone understand what 
>>> they are doing and will it break my ability to use WeeWX?
>>>
>>> The y explain about it here: 
>>> https://dev.netatmo.com/apidocumentation/oauth#authorization-code
>>>
>>> Does anyone know or understand the code made to make Netatmo functional 
>>> with weewx, and see a soplution to this topic?
>>>
>>> I'm not much of a programmer, especially not in python, so I'm am really 
>>> lost. :-)
>>>
>>> Cheers
>>> Bent
>>>
>>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/877eb4ff-0c24-4ceb-876c-edb89f4465fcn%40googlegroups.com.


[weewx-user] Re: Netatmo

2022-08-05 Thread Guido Cioni
Unfortunately the code from the netatmo driver is really old (not even 
Python 3 compatible) so I'm not sure it will be updated to account for this 
change. 

On Friday, August 5, 2022 at 7:54:59 AM UTC+2 neu...@bnjpro.dk wrote:

> I have received an email from Netatmo about them changing the API.
>
> I do not understand what that impiles to me. Does anyone understand what 
> they are doing and will it break my ability to use WeeWX?
>
> The y explain about it here: 
> https://dev.netatmo.com/apidocumentation/oauth#authorization-code
>
> Does anyone know or understand the code made to make Netatmo functional 
> with weewx, and see a soplution to this topic?
>
> I'm not much of a programmer, especially not in python, so I'm am really 
> lost. :-)
>
> Cheers
> Bent
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/8d7a92c9-03e1-48f2-a765-a23e931d8007n%40googlegroups.com.


[weewx-user] Re: Wrong python version used with smbus2?

2022-07-11 Thread Guido Cioni
Ok I figured out that those libraries need to be installed in the python3 
of sudo, because weewx is starting as sudo...
Not sure if this is the default behaviour or not 

On Monday, July 11, 2022 at 7:21:49 PM UTC+2 Guido Cioni wrote:

> I'm trying to add the BME280 sensor with the 
> https://gitlab.com/wjcarpenter/bme280wx plugin. I installed all required 
> dependencies and verified that the data are correctly read using a python 
> script containing
>
> import smbus2 
>
> which I invoke as python test.py. 
> I have only 1 version of python installed in this system, that is this 
> python linked to python3
>
> pi@weather:~ $ python
> Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
> [GCC 10.2.1 20210110] on linux
>
> It has smbus2 installed 
>
> pi@weather:~ $ pip list
> Package   Version
> - -
> 
> smbus20.4.2
> 
>
> this is apparently the same Python version  used by weewx 
>
> Jul 11 19:11:27 weather weewx[2704] INFO __main__: Using Python 3.9.2 
> (default, Feb 28 2021, 17:03:44) #012[GCC 10.2.1 20210110]
>
> However this fails to import smbus2 
>
> Jul 11 19:11:27 weather weewx[2707] DEBUG weewx.engine: Loading service 
> user.bme280wx.Bme280wx
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: Caught 
> unrecoverable exception:
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   No module 
> named 'smbus2'
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   Traceback 
> (most recent call last):
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
> "/usr/share/weewx/weewxd", line 147, in main
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
>  engine = weewx.engine.StdEngine(config_dict)
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 93, in __init__
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
>  self.loadServices(config_dict)
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
> "/usr/share/weewx/weewx/engine.py", line 161, in loadServices
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   obj = 
> weeutil.weeutil.get_object(svc)(self, config_dict)
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
> "/usr/share/weewx/weeutil/weeutil.py", line 1150, in get_object
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   mod = 
> __import__(module)
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
> "/usr/share/weewx/user/bme280wx.py", line 5, in 
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
>  import smbus2
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
>  ModuleNotFoundError: No module named 'smbus2'
> Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   Exiting.
>
> I'm really puzzled...which version of Python is weewx using? 
>

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/91fd9eef-9ed5-4bf8-aad2-f6184ca4da5en%40googlegroups.com.


[weewx-user] Wrong python version used with smbus2?

2022-07-11 Thread Guido Cioni
I'm trying to add the BME280 sensor with 
the https://gitlab.com/wjcarpenter/bme280wx plugin. I installed all 
required dependencies and verified that the data are correctly read using a 
python script containing

import smbus2 

which I invoke as python test.py. 
I have only 1 version of python installed in this system, that is this 
python linked to python3

pi@weather:~ $ python
Python 3.9.2 (default, Feb 28 2021, 17:03:44) 
[GCC 10.2.1 20210110] on linux

It has smbus2 installed 

pi@weather:~ $ pip list
Package   Version
- -

smbus20.4.2


this is apparently the same Python version  used by weewx 

Jul 11 19:11:27 weather weewx[2704] INFO __main__: Using Python 3.9.2 
(default, Feb 28 2021, 17:03:44) #012[GCC 10.2.1 20210110]

However this fails to import smbus2 

Jul 11 19:11:27 weather weewx[2707] DEBUG weewx.engine: Loading service 
user.bme280wx.Bme280wx
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: Caught unrecoverable 
exception:
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   No module 
named 'smbus2'
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   Traceback 
(most recent call last):
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
"/usr/share/weewx/weewxd", line 147, in main
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   engine 
= weewx.engine.StdEngine(config_dict)
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
"/usr/share/weewx/weewx/engine.py", line 93, in __init__
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
 self.loadServices(config_dict)
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
"/usr/share/weewx/weewx/engine.py", line 161, in loadServices
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   obj = 
weeutil.weeutil.get_object(svc)(self, config_dict)
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
"/usr/share/weewx/weeutil/weeutil.py", line 1150, in get_object
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   mod = 
__import__(module)
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__: File 
"/usr/share/weewx/user/bme280wx.py", line 5, in 
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   import 
smbus2
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:  
 ModuleNotFoundError: No module named 'smbus2'
Jul 11 19:11:27 weather weewx[2707] CRITICAL __main__:   Exiting.

I'm really puzzled...which version of Python is weewx using? 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/10d797b4-5b33-4179-b65f-506fbb2dcd0an%40googlegroups.com.


[weewx-user] MQTT to WeewX

2022-02-20 Thread Guido Groetie
I want to add a watertemperature sensor (DS18B01) with a NodeMCU ESP8266 
board into weewx, it will be the first MQTT things i will do.

I got the following working:
Beside a RPI with WeewX I have another RPI with Domotizcz.
I got it running that the temp mearurements of the ESP Easy software is 
getting through Domoticz MQTT into Domoticz (topic: domoticz/in)

So I use the Domoticz RPI as a broker for WeewX.

In the ESP Easy webinterface I see in JSON:

So my fieldname should me temperature
Topic should be: domoticz/in


In WeewX I want the values of meaurements in extraTemp2 place in database. 
But I see no result in my neo-wx material skin...
www.weerindedraai.nl

Here is a piece of weewx.conf file:
[MQTTSubscribeService]
# This section is for the MQTTSubscribe service.

# Turn the service on and off.
# Default is: true
# Only used by the service.
enable = true

# The MQTT server.
# Default is localhost.
host = 192.168.1.71

# The port to connect to.
# Default is 1883.
port = 1883

# Maximum period in seconds allowed between communications with the 
broker.
# Default is 60.
keepalive = 60

# username for broker authentication.
# Default is None.
username = admin

# password for broker authentication.
# Default is None.
password = wh0racl3

# The binding, loop or archive.
# Default is: loop
# Only used by the service.
binding = loop

# The message handler to use
[[message_callback]]
# The format of the MQTT payload.
# Currently support: individual, json, keyword
# Must be specified.
type = json

# The topics to subscribe to.
[[topics]]
# Units for MQTT payloads without unit value.
# Valid values: US, METRIC, METRICWX
# Default is: US
unit_system = METRIC

[[[topic/domoticz/in]]]
  temperature
# The WeeWX name.
# Default is the name from MQTT.
name = extraTemp2

# True if the incoming data should not be processed into WeeWX.
# Valid values: True, False
# Default is False
ignore = False

# True if the incoming data is cumulative.
# Valid values: True, False
# Default is False
contains_total = False

# The conversion type necessary for WeeWX compatibility
# Valid values: bool, float, int, none
# Default is float
conversion_type = float

# The units of the incoming data.
# Useful if this field's units differ from the topic's 
unit_system's units.
# Valid values: see, 
http://www.weewx.com/docs/customizing.htm#units
# Default is not set
units = degree_C  

I changed the topic name to something without an / an is now: openwatertemp

in logfile WeewX:
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Version is 2.0.0
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) Log 
level: 0
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) Log 
debug setting: 0
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) Log 
console: False
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) Log 
file: None
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
message_callback_provider_name is user.MQTTSubscribe.MessageCallbackProvider
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
clientid is MQTTSubscribe-9039
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
client_session is True
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) host 
is 192.168.1.71
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) port 
is 1883
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
keepalive is 60
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
username is admin
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
password is set
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Archive topic is None
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
binding is loop
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Waiting for MQTT connection.
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Connected with result code 0
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Connected flags {'session present': 0}
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Subscribing to topic/openwatertemp has a mid 1 and rc 0
Feb 20 11:58:55 weewx weewx[32438] INFO user.MQTTSubscribe: (Service) 
Subscribed to mid: 1 is size 1 has a QOS of 0

Does rc 0 means that is does not receiving data??

Can somebody help m

[weewx-user] Sensor.community (Luftdat) api in Weex

2021-12-26 Thread Guido Groetie
I am not an IT expert, got my davis vantage pro 2 running on Weewx along 
with the soilmoist sensor. Since yesterday my particulate meter is running 
and is linked to sensor.community. There is an api on it (particulate meter 
is connected via wifi and not via usb to the rpi that Weewx runs on.

I am now looking for a step by step explanation where I can add the api 
data from the particulate meter to the weewx dabase and display it in a 
graph in the neo-material skin. Www.weatherindedraai.co.uk is me website.

Do I need a mqtt broker to collect the api data and how do I get the data 
into the weewx database.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/b06875a6-e0c3-458e-b5ba-51d96cecff14n%40googlegroups.com.


[weewx-user] Modbus connection WEEWX Vantage through KTA-282 module

2018-10-26 Thread Guido
Good morning ,

I have a Vantage Pro 2 weather station with the Envoy logger and through 
the serial connection a KTA-282 Modbus module from Ocean Controls. 

Now I would like to access from Weewx on raspberry the Davis, but the 
Vantage driver have not the right access parameters to do that : there is 
someone that already have solved this problem ? Or someone the knows the 
driver could suggest the modification to do ?

The modbus module answer as a client on an local ip address and the port 
502 with the mode3 ( read registers from location 4+1).

Thanks 

Guido

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


[weewx-user] Modbus connection WEEWX Vantage through KTA-282 module (Read 146 times)

2018-10-26 Thread Guido
Good morning ,

I have a Vantage Pro 2 weather station with the Envoy logger and through 
the serial connection a KTA-282 Modbus module from Ocean Controls. 

Now I would like to access from Weewx on raspberry the Davis, but the 
Vantage driver have not the right access parameters to do that : there is 
someone that already have solved this problem ? Or someone the knows the 
driver could suggest the modification to do ?

The modbus module answer as a client on an local ip address and the port 
502 with the mode3 ( read registers from location 4+1).

Thanks 

Guido

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


[weewx-user] Re: Te923 driver is not starting anymore.

2016-09-10 Thread &#x27;Guido Albers' via weewx-user


>
> unfortunately i have only one configuration on which to test.  so feedback 
> from other te923 users is *greatly* appreciated.  but that feedback needs 
> to be about the latest driver and the configuration on which it is running.
>
> it would be nice to configure a bunch of virtual machines or containers 
> and set up automated unit tests for the driver...
>
> m
>

Hello, 

a small feedback. I'm using weewx with a Raspberry PI and "Raspbian 
GNU/Linux 8 (jessie)".
Currently only the driver version 0.17 works for me. 
Driver 0.18 throws following errors:

Sep 11 02:30:03 weewx weewx[695]:   Waiting 60 seconds then 
retrying...
Sep 11 02:31:03 weewx weewx[695]: engine: retrying...
Sep 11 02:31:03 weewx weewx[695]: engine: Using configuration file 
/etc/weewx/weewx.conf
Sep 11 02:31:03 weewx weewx[695]: engine: Loading station type TE923 
(weewx.drivers.te923)
Sep 11 02:31:03 weewx weewx[695]: te923: driver version is 0.18
Sep 11 02:31:03 weewx weewx[695]: te923: polling interval is 10
Sep 11 02:31:03 weewx weewx[695]: te923: observation map is {'t_in': 
'inTemp', 't_1': 'ch1Temp', 't_2': 'outTemp', 't_3': 'ch3Temp', 't_4': 
'ch4Temp', 't_5': 'ch5Temp', 'h_in': 'inHumidity', 'h_1': 'ch1Humidity', 
'h_2': 'outHumidity', 'h_3': 'ch3Humidity', 'h_4': 'ch4Humidity', 'h_5': 
'ch5Humidity', 'bat_1': 'ch1Batt', 'bat_2': 'ch2Batt', 'bat_3': 'ch3Batt', 
'bat_4': 'ch4Batt', 'bat_5': 'ch5Batt', 'windchill': 'windchill', 
'winddir': 'windDir', 'windgust': 'windGust', 'windspeed': 'windSpeed', 
'bat_wind': 'windBatt', 'bat_rain': 'rainBatt', 'uv': 'UV', 'bat_uv': 
'uvBatt'}
Sep 11 02:31:03 weewx weewx[695]: te923: Found device on USB bus=001 
device=004
Sep 11 02:31:03 weewx weewx[695]: te923: Failed attempt 1 of 5 to read 
data: error sending control message: Das Gerät oder die Ressource ist belegt
Sep 11 02:31:06 weewx weewx[695]: te923: Failed attempt 2 of 5 to read 
data: error sending control message: Das Gerät oder die Ressource ist belegt
Sep 11 02:31:09 weewx weewx[695]: te923: Failed attempt 3 of 5 to read 
data: error sending control message: Das Gerät oder die Ressource ist belegt
Sep 11 02:31:12 weewx weewx[695]: te923: Failed attempt 4 of 5 to read 
data: error sending control message: Das Gerät oder die Ressource ist belegt
Sep 11 02:31:15 weewx weewx[695]: te923: Failed attempt 5 of 5 to read 
data: error sending control message: Das Gerät oder die Ressource ist belegt
Sep 11 02:31:18 weewx weewx[695]: engine: Unable to load driver: Read 
failed after 5 tries
Sep 11 02:31:18 weewx weewx[695]:   Waiting 60 seconds then 
retrying...
Sep 11 02:32:18 weewx weewx[695]: engine: retrying...

The driver 0.19 throws this:

Sep 11 01:50:01 weewx weewx[5424]:   Waiting 60 seconds then 
retrying...
Sep 11 01:50:58 weewx weewx[5465]: Stopping weewx weather system: weewx.
Sep 11 01:53:04 weewx weewx[5640]: engine: Initializing weewx version 3.5.0
Sep 11 01:53:04 weewx weewx[5640]: engine: Using Python 2.7.9 (default, 
Mar  8 2015, 00:52:26) #012[GCC 4.9.2]
Sep 11 01:53:04 weewx weewx[5640]: engine: Platform 
Linux-4.4.13-v7+-armv7l-with-debian-8.0
Sep 11 01:53:04 weewx weewx[5640]: engine: pid file is /var/run/weewx.pid
Sep 11 01:53:04 weewx weewx[5644]: engine: Using configuration file 
/etc/weewx/weewx.conf
Sep 11 01:53:04 weewx weewx[5644]: engine: Loading station type TE923 
(weewx.drivers.te923)
Sep 11 01:53:04 weewx weewx[5644]: te923: driver version is 0.19
Sep 11 01:53:04 weewx weewx[5644]: te923: polling interval is 10
Sep 11 01:53:04 weewx weewx[5644]: te923: observation map is {'t_in': 
'inTemp', 't_1': 'ch1Temp', 't_2': 'outTemp', 't_3': 'ch3Temp', 't_4': 
'ch4Temp', 't_5': 'ch5Temp', 'h_in': 'inHumidity', 'h_1': 'ch1Humidity', 
'h_2': 'outHumidity', 'h_3': 'ch3Humidity', 'h_4': 'ch4Humidity', 'h_5': 
'ch5Humidity', 'bat_1': 'ch1Batt', 'bat_2': 'ch2Batt', 'bat_3': 'ch3Batt', 
'bat_4': 'ch4Batt', 'bat_5': 'ch5Batt', 'windchill': 'windchill', 
'winddir': 'windDir', 'windgust': 'windGust', 'windspeed': 'windSpeed', 
'bat_wind