OK, I placed this at the end of weewx.conf:

# Options for extension 'GW1000'
[GW1000]
    driver = user.gw1000
[[field map]]
extraTemp2  = intemp
extraHumid2  = inhumid
extraTemp1 = temp1
extraHumid1 = humid1
soilMoist1 = soilmoist1

Result is the same as before; the first two lines produce null values in 
the database, and the latter three appear in the correct fields. In fact, 
it doesn't seem to matter what I put in this file. For example:


# Options for extension 'GW1000'
[GW1000]
    driver = user.gw1000
[[field map]]
extraTemp2  = intemp
extraHumid2  = inhumid
extraTemp1 = foobar1
extraHumid1 = foobar2
soilMoist1 = foobar3

produces the same results! The first two lines give nulls; foobar lines 
work. Is this the correct format and location for a field map?

On Thursday, August 20, 2020 at 2:41:03 PM UTC-6 gjr80 wrote:

> Thanks, now I understand. You have the right approach but unfortunately 
> the execution is not quite correct. Did you run the driver directly with 
> the —live-data command line option? The output will detail all of the 
> available GW1000 ‘fields’ and their current values. Those field names are 
> what should be used on the right hand side of the = in the field map 
> entries. You will notice the GW1000 ‘fields’ are all in lowercase. So you 
> should be using:
>
>     extraTemp2 = intemp
>
> Likewise extraHumid2 and soilMoist1. Your extraTemp1 mapping should be:
>
>     extraTemp1 = temp1
>
> Likewise extraHumid1.
>
> Gary
>
> On Friday, 21 August 2020 at 05:41:47 UTC+10 timothye...@gmail.com wrote:
>
>> Thanks for the detailed reply; I'll try to be more clear. I have two 
>> services running, as indicated by this line:
>>
>> data_services = user.bme280wx.Bme280wx, user.gw1000.Gw1000Service
>>
>> The first service is an i2c sensor providing temp/humidity at the 
>> raspberry pi. It's options are so:
>>
>> [Bme280wx]
>>     temperature_must_have = ""
>>     humidityKeys = inHumidity
>>     pressureKeys = ""
>>     pressure_must_have = ""
>>     i2c_port = 1
>>     humidity_must_have = ""
>>     i2c_address = 0x76
>>     usUnits = US
>>     temperatureKeys = inTemp
>>
>> The sensor data are humidityKeys and temperatureKeys and they are mapped 
>> to inHumidity and inTemp. This service runs and reports properly; where my 
>> skin uses inTemp the data from the sensor is displayed.
>>
>> The GW1000 options are currently set so, following the instructions in 
>> your reply:
>>
>>
>> [GW1000]
>>     driver = user.gw1000
>> [[field map]]
>> extraTemp2  = inTemp
>> extraHumid2  = inHumidity
>> extraTemp1 = extraTemp1
>> extraHumid1 = extraHumid1
>> soilMoist1 = soilMoist1
>>
>> Three of the fields provided by the GW1000 are the same in the database 
>> (the latter three), and they are reporting correctly. I want the GW1000 
>> fields inTemp and inHumidity to map to the weewx database fields extraTemp2 
>> and extraHumid2. That is not working with the field map as shown. Have I 
>> missed something?
>>
>>
>> On Wednesday, August 19, 2020 at 6:03:58 PM UTC-6 gjr80 wrote:
>>
>>> Hi,
>>>
>>> I think we might need a bit of clarification as to what it is you are 
>>> trying to do. You say "inTemp is being used by another service", do you 
>>> mean that WeeWX field inTemp is being *provided* by another 
>>> service/driver (which has consequences for running the  GW1000 driver as as 
>>> service) or do you mean WeeWX field inTemp is being *used* by another 
>>> service (which has no consequences for the GW1000 driver when run as a 
>>> service). Does the same apply for inHumidity? When you ran the GW1000 
>>> driver directly with --test-service there was no extraTemp2 or 
>>> extraHumid2 fields and your field map does not map anything to these 
>>> fields so I would expect extraTemp2 and extraHumid2 to show as N/A in 
>>> any reports.
>>>
>>> Perhaps you have a misunderstanding re the field map. The field map maps 
>>> GW000 'fields' to WeeWX fields. The GW1000 driver uses a default field map. 
>>> The default field map can be altered in two ways; you can replace the 
>>> entire default field map by defining your own field map using a 
>>> [[field_map]] stanza, or you can alter the default field map by listing 
>>> changes to the default field map in a [[field_map_extensions]] stanza. 
>>> It is not clear if you were attempting one of these approaches as you have 
>>> no [[ ]] level stanza in the config extra you posted. Also when 
>>> defining a field map entry the format is:
>>>
>>>     WeeWX field name = GW1000 field name
>>>
>>>     where:
>>>         GW1000 field name is the name of the GW1000 'field' that you 
>>> wish to map 
>>>         WeeWX field name is the WeeWX field name you wish to contain 
>>> the data from the GW1000 'field' concerned. The WeeWX field name is the the 
>>> field name you will use in reports etc
>>>
>>> You can see what fields your GW1000 emits by running the GW1000 driver 
>>> directly with the --live-data command line option (the fields shown 
>>> when running the driver directly using the --test-service or 
>>> --test-driver command line options are WeeWX field names, ie they have 
>>> been mapped using the field map, fields shown using --live-data are 
>>> GW1000 'fields' ie they are unmapped).
>>>
>>> Gary
>>>
>>> On Thursday, 20 August 2020 08:15:29 UTC+10, Timothy Buchanan wrote:
>>>>
>>>> I installed GW1000 as a service and the test-service command gives this 
>>>> output:
>>>>
>>>> dateTime: 1597861672, dummyTemp: 96.3, extraHumid1: 26, extraTemp1: 
>>>> 85.1, inHumidity: 33, inTemp: 75.74, pressure: 22.2360805875, 
>>>> relbarometer: 
>>>> 753.0, soilMoist1: 15, usUnits: 1, wh31_ch1_batt: 0, wh51_ch1_batt: 0
>>>>
>>>> In weewx.conf, I put this list of options:
>>>>
>>>> [GW1000]
>>>>     driver = user.gw1000
>>>> inTemp = extraTemp2
>>>> inHumidity = extraHumid2
>>>> extraTemp1 = extraTemp1
>>>> extraHumid1 = extraHumid1
>>>> soilMoist1 = soilMoist1
>>>> pressure = ""
>>>>
>>>> I chose these because inTemp is being used by another service. When I 
>>>> tried to use the data in my skin (modified exfoliation), I found that 
>>>> extraTemp2 and extraHumid2 are shown as NA. The other values are 
>>>> displayed. 
>>>> What did I do wrong here? Thanks for any help.
>>>>
>>>

-- 
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/1dc3e7f3-d025-45a7-b3c0-71384eb4f158n%40googlegroups.com.

Reply via email to