Thank for answer and your will to help me! 
Im new on Netatmo and its more advanced to code haha. 
Sorry for late answere i think the county time differens between us. Clock 
is early in the morning now in sweden 05:40 AM

I know battery_vp is from old firmware and battery_percent is the newer 
firmware.
The work with formatting its something i havent learn yet and its take time 
because my dyslexia and concentration because adhd. 
But thanks to you because you describe in the way i understand very well.

I have thinking on what i want in the reading and i wanted to have just the 
percentage. 
So as example from your tex above i want the readings to  "Anemometer 
Battery 95%" 



About the Belchertown i will try fix that on my own. 
I have learn a little about sensor readings thanks to you! Its just the 
formatting now :) 





fredag 15 januari 2021 kl. 13:54:51 UTC+1 skrev gjr80:

> You’ve done well, that is all of the hard work done! The rest is just 
> formatting.
>
> I am no netatmo expert but reading through the driver and from what info I 
> could find on the internet, it does appear that there are two distinct 
> battery state fields for each sensor; battery_vp which (according to 
> netatmo) is a large number that appears to equate to a descriptive battery 
> state (that is where the max/fulll/low is derived from) and battery_percent 
> (which the netatmo driver maps to xxxxxBatteryStatus). One of those may 
> well be from the old firmware but your station emits both field types for 
> each sensor. When I put together the new sensors.inc I wanted to format the 
> battery state entries as ‘descriptive word (battery %)’, eg:
>
> Anemometer Battery       full(95%)
>
> The 95.000000 is just a formatting/unit issue that is easily fixed. I 
> guess the question for you is what do you want to display? Just the 
> descriptive word, just the percentage or both?
>
> Similar arrangement with the wifi/RF status, there is the actual signal 
> level (ie the number) and descriptive text that netatmo lists for different 
> RF signal levels. Do you want just the descriptive text or the number or 
> both?
>
> Let me know and we can adjust sensors.inc accordingly.
>
> For info if you haven’t already found it the ranges of battery_vp and the 
> corresponding descriptive text for each sensor is shown in a number of 
> tables on this page (https://dev.netatmo.com/apidocumentation/weather) . 
> Likewise for Wifi status, not sure where Infound the descriptive text for 
> RF status though.
>
> Afraid I can’t help with integrating the battery states and RF signal 
> levels into Belchertown, you will need someone who is familiar with the 
> Belchertown skin. Though you now have the relevant database in your 
> database so I am sure that will get you part way there.
>
> Gary
>
> On Friday, 15 January 2021 at 22:18:12 UTC+10 johansso...@outlook.com 
> wrote:
>
>>
>> Thanks
>> I did as you writed.
>> Seasons skin does the reading like this now but with many extra numbers 
>> of 0.
>>
>> Like i writed in first post i orginally use Belchertown skins and use 
>> seasons to fix whats reading and how to code!
>>
>>
>>
>>
>> Connectivity
>>
>> WiFi Signal
>> good(56,000000)
>> Outdoor Module Signal
>> high(66,000000)
>> Anemometer Signal
>> high(61,000000)
>> Rain Gauge Signal
>> *high(61,000000)*
>>
>> Battery Status
>> Anemometer Battery
>> full(95,000000)
>> Rain Gauge Battery
>> max(100,000000)
>> Outdoor Module Battery
>> full(93,000000)
>>
>>
>> What i read in netatmo.py file i saw that battery_vp is for old firmware 
>> and used for the older Wveiw.py
>> In the Netatmo.py file it is writed like this now.
>>
>>
>> class NetatmoDriver(weewx.drivers.AbstractDevice):
>>     DEFAULT_PORT = 80
>>     DEFAULT_HOST = ""
>>     # map from netatmo names to database schema names
>>     # apparently battery_vp is in older firmware, whereas battery_percent 
>> is
>>     # in newer firmware.
>>     DEFAULT_SENSOR_MAP = {
>>         'pressure':                              
>>  '*.NAMain.AbsolutePressure',
>>         'inTemp':                                 '*.NAMain.Temperature',
>>         'inHumidity':                           '*.NAMain.Humidity',
>>         'co2':                                       '*.NAMain.CO2',
>>         'noise':                                    '*.NAMain.Noise',
>>         'wifi_status':                          '*.NAMain.wifi_status',
>>         'outTemp':                             '*.NAModule1.Temperature',
>>         'outHumidity':                       '*.NAModule1.Humidity',
>>         'out_rf_status':                      '*.NAModule1.rf_status',
>>         'out_battery_vp':                   '*.NAModule1.battery_vp', 
>> *(**Older 
>> firmware)*
>>         'outTempBatteryStatus':     '*.NAModule1.battery_percent',
>>         'windSpeed':                         '*.NAModule2.WindStrength',
>>         'windDir':                               '*.NAModule2.WindAngle',
>>         'windGust':                            '*.NAModule2.GustStrength',
>>         'windGustDir':                       '*.NAModule2.GustAngle',
>>         'wind_rf_status':                  '*.NAModule2.rf_status',
>>         'wind_battery_vp':                '*.NAModule2.battery_vp', 
>> *(**Older 
>> firmware)*
>>         'windBatteryStatus':            '*.NAModule2.battery_percent', 
>>         'rain':                                       '*.NAModule3.Rain',
>>         'rain_total':                              
>> '*.NAModule3.sum_rain_24',
>>         'rain_rf_status':                      '*.NAModule3.rf_status',
>>         'rain_battery_vp':                    '*.NAModule3.battery_vp', 
>> *(**Older firmware)*
>>         'rainBatteryStatus':                '*.NAModule3.battery_percent'}
>>
>>
>> I also send my REC / LOOP
>> REC:    2021-01-15 12:50:00 CET (1610711400) altimeter: 
>> 1024.4038696830132, appTemp: -7.884807942435174, barometer: 
>> 1024.4032036270912, batteryStatus1: 5872.0, batteryStatus2: 5898.0, 
>> batteryStatus3: 6036.0, cloudbase: 551.6903180909593, co2: 700.0, dateTime: 
>> 1610711400, dewpoint: -9.143009058869266, ET: None, heatindex: -4.7, 
>> humidex: -4.7, inDewpoint: 9.238783201935856, inHumidity: 38.0, inTemp: 
>> 24.5, interval: 5.0, maxSolarRad: None, noise: 43.0, outHumidity: 71.0, 
>> outTemp: -4.7, outTempBatteryStatus: 93.0, pressure: 1023.1, rain: 0.0, 
>> rainBatteryStatus: 100.0, rainRate: 0.0, rain_total: 0.0, signal1: 57.0, 
>> signal2: 67.0, signal3: 62.0, signal4: 62.0, usUnits: 16, 
>> windBatteryStatus: 95.0, windchill: -4.7, windDir: 210.0, windGust: 2, 
>> windGustDir: 210, windrun: 0.08333333333333333, windSpeed: 1.0
>> LOOP:   2021-01-15 12:59:12 CET (1610711952) altimeter: 
>> 1024.4038696830132, appTemp: -7.777147909039572, barometer: 
>> 1024.4027180441597, batteryStatus1: 5872, batteryStatus2: 5900, 
>> batteryStatus3: 6036, cloudbase: 552.1509511394135, co2: 703, dateTime: 
>> 1610711952, dewpoint: -9.046787226465668, heatindex: -4.6000000000000005, 
>> humidex: -4.6, inDewpoint: 9.238783201935856, inHumidity: 38, inTemp: 24.5, 
>> maxSolarRad: None, noise: 43, outHumidity: 71, outTemp: -4.6, 
>> outTempBatteryStatus: 93, pressure: 1023.1, rain: 0.0, rainBatteryStatus: 
>> 100, rainRate: 0.0, rain_total: 0.0, signal1: 56, signal2: 66, signal3: 61, 
>> signal4: 61, usUnits: 16, windBatteryStatus: 95, windchill: 
>> -4.6000000000000005, windDir: 211, windGust: 3, windGustDir: 220, 
>> windSpeed: 1
>>
>> I see i have two kind of battery status 
>> batteryStatus1: 5872.0
>> batteryStatus2: 5898.0
>> batteryStatus3: 6036.0
>>
>> outTempBatteryStatus: 93.0
>> windBatteryStatus: 95.0
>> rainBatteryStatus: 100.0
>>
>>
>> *Here is my debug log (I deleted personal id and passwords)*
>>
>>
>> System info
>>   Platform:       Linux-5.4.83-v7l+-armv7l-with-debian-10.7
>>   Python Version: 3.7.3
>>
>> Load Information
>>   1 minute load average:  0.30
>>   5 minute load average:  0.60
>>   15 minute load average: 0.77
>>
>> General Weewx info
>>   Weewx version 4.3.0 detected.
>>
>> Station info
>>   Station type: netatmo
>>   Driver:       user.netatmo
>>
>> Driver info
>> [netatmo]
>>     
>>     # This section is for the netatmo station.
>>     
>>     # The mode specifies how driver should obtain data.  The 'cloud' mode 
>> will
>>     # retrieve data from the netatmo.com servers.  The 'sniff' mode will 
>> parse
>>     # packets from the netatmo station on the local network.
>>     mode = cloud
>>     
>>     # The cloud mode requires credentials:
>>     username = johansso...@outlook.com
>>     password = password
>>     client_id = id
>>     client_secret = secret
>>     
>>     # The driver itself
>>     driver = user.netatmo
>>     
>>     
>>     [[sensor_map]]
>>         
>>         pressure = *.NAMain.AbsolutePressure
>>         inTemp = *.NAMain.Temperature
>>         inHumidity = *.NAMain.Humidity
>>         co2 = *.NAMain.CO2
>>         noise = *.NAMain.Noise
>>         
>>         outTemp = *.NAModule1.Temperature
>>         outHumidity = *.NAModule1.Humidity
>>         
>>         windSpeed = *.NAModule2.WindStrength
>>         windDir = *.NAModule2.WindAngle
>>         windGust = *.NAModule2.GustStrength
>>         windGustDir = *.NAModule2.GustAngle
>>         
>>         rain = *.NAModule3.Rain
>>         rain_total = *.NAModule3.sum_rain_24
>>         
>>         
>>         
>>         wifi_status = ""
>>         # map wifi status to field signal1
>>         signal1 = *.NAMain.wifi_status
>>         out_rf_status = ""
>>         # map out rf status status to field signal2
>>         signal2 = *.NAModule1.rf_status
>>         wind_rf_status = ""
>>         # map wind rf status to field signal3
>>         signal3 = *.NAModule2.rf_status
>>         rain_rf_status = ""
>>         # map rain rf status to field signal4
>>         signal4 = *.NAModule3.rf_status
>>         out_battery_vp = ""
>>         # map out battery vp to field batteryStatus1
>>         batteryStatus1 = *.NAModule1.battery_vp
>>         wind_battery_vp = ""
>>         # map wind battery vp to field batteryStatus2
>>         batteryStatus2 = *.NAModule2.battery_vp
>>         rain_battery_vp = ""
>>         # map rain battery vp to field batteryStatus3
>>         batteryStatus3 = *.NAModule3.battery_vp
>>
>> Currently installed extensions
>> Extension Name    Version   Description
>> Belchertown       1.2       A clean modern skin with real time streaming 
>> updates and interactive charts. Modeled after BelchertownWeather.com
>> netatmo           0.14      Driver for netatmo weather stations.
>> mqtt              0.23      Upload weather data to MQTT server.
>>
>> Archive info
>>   Database name:        weewx.sdb
>>   Table name:           archive
>>   Version               3.0
>>   Unit system:          16 (METRIC)
>>   First good timestamp: 2021-01-10 09:55:00 CET (1610268900)
>>   Last good timestamp:  2021-01-15 13:05:00 CET (1610712300)
>>   Number of records:    1357
>>   weewx (weewx.conf) is set to use an archive interval of 300 seconds.
>>   The station hardware was not interrogated in determining archive 
>> interval.
>>
>> Databases configured in weewx.conf
>>   Database name:        weewx.sdb
>>   Database driver:      weedb.sqlite
>>
>>   Database name:        weewx
>>   Database driver:      weedb.mysql
>>   Database host:        localhost
>>
>>
>> Parsed and obfuscated weewx.conf
>> # WEEWX CONFIGURATION FILE
>> #
>> # Copyright (c) 2009-2021 Tom Keffer <>
>> # 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
>>
>> # Root directory of the weewx data file hierarchy for this station
>> WEEWX_ROOT = /
>>
>> # Whether to log successful operations
>> log_success = True
>>
>> # Whether to log unsuccessful operations
>> log_failure = True
>>
>> # How long to wait before timing out a socket (FTP, HTTP) connection
>> socket_timeout = 20
>>
>> # Do not modify this. It is used when installing and updating weewx.
>> version = 4.3.0
>>
>>
>> ##############################################################################
>>
>> #   This section is for information about the station.
>>
>> [Station]
>>     
>>     # Description of the station location
>>     location = Kristianstad - Sweden
>>     
>>     # Latitude in decimal degrees. Negative for southern hemisphere
>>     latitude = 56.033
>>     # Longitude in decimal degrees. Negative for western hemisphere.
>>     longitude = 14.1547
>>     
>>     # Altitude of the station, with unit it is in. This is downloaded from
>>     # from the station if the hardware supports it.
>>     altitude = 10, meter
>>     
>>     # Set to type of station hardware. There must be a corresponding 
>> stanza
>>     # in this file with a 'driver' parameter indicating the driver to be 
>> used.
>>     station_type = netatmo
>>     
>>     # If you have a website, you may specify an URL
>>     station_url = XXX obfuscated by wee_debug XXX
>>     
>>     # The start of the rain year (1=January; 10=October, etc.). This is
>>     # downloaded from the station if the hardware supports it.
>>     rain_year_start = 1
>>     
>>     # Start of week (0=Monday, 6=Sunday)
>>     week_start = 0
>>
>>
>> ##############################################################################
>>
>> [netatmo]
>>     
>>     # This section is for the netatmo station.
>>     
>>     # The mode specifies how driver should obtain data.  The 'cloud' mode 
>> will
>>     # retrieve data from the netatmo.com servers.  The 'sniff' mode will 
>> parse
>>     # packets from the netatmo station on the local network.
>>     mode = cloud
>>     
>>     # The cloud mode requires credentials:
>>     username = XXX obfuscated by wee_debug XXX
>>     password = XXX obfuscated by wee_debug XXX
>>     client_id = id
>>     client_secret = secret
>>     
>>     # The driver itself
>>     driver = user.netatmo
>>     
>>     
>>     [[sensor_map]]
>>         
>>         pressure = *.NAMain.AbsolutePressure
>>         inTemp = *.NAMain.Temperature
>>         inHumidity = *.NAMain.Humidity
>>         co2 = *.NAMain.CO2
>>         noise = *.NAMain.Noise
>>         
>>         outTemp = *.NAModule1.Temperature
>>         outHumidity = *.NAModule1.Humidity
>>         
>>         windSpeed = *.NAModule2.WindStrength
>>         windDir = *.NAModule2.WindAngle
>>         windGust = *.NAModule2.GustStrength
>>         windGustDir = *.NAModule2.GustAngle
>>         
>>         rain = *.NAModule3.Rain
>>         rain_total = *.NAModule3.sum_rain_24
>>         
>>         
>>         
>>         wifi_status = ""
>>         # map wifi status to field signal1
>>         signal1 = *.NAMain.wifi_status
>>         out_rf_status = ""
>>         # map out rf status status to field signal2
>>         signal2 = *.NAModule1.rf_status
>>         wind_rf_status = ""
>>         # map wind rf status to field signal3
>>         signal3 = *.NAModule2.rf_status
>>         rain_rf_status = ""
>>         # map rain rf status to field signal4
>>         signal4 = *.NAModule3.rf_status
>>         out_battery_vp = ""
>>         # map out battery vp to field batteryStatus1
>>         batteryStatus1 = *.NAModule1.battery_vp
>>         wind_battery_vp = ""
>>         # map wind battery vp to field batteryStatus2
>>         batteryStatus2 = *.NAModule2.battery_vp
>>         rain_battery_vp = ""
>>         # map rain battery vp to field batteryStatus3
>>         batteryStatus3 = *.NAModule3.battery_vp
>>
>>
>>
>> # Smart anemometer battery status
>> # Description
>>
>> #  6000 = max
>> #  5590 = full
>> #  5180 = high
>> #  4770 = medium
>> #  4360 = low
>> # <4360 = very low
>>
>>
>> # Outdoor Module and RainGauge battery status
>> # Description
>>
>> #  6000 = max
>> #  5500 = full
>> #  5000 = high
>> #  4500 = medium
>> #  4000 = low
>> # <4000 = very low
>>
>>
>> # Wifi status
>> # Signal quality
>>
>> # 86 = Bad
>> # 71 = Average
>> # 56 = Good
>>
>>
>>
>> ##############################################################################
>>
>> [Simulator]
>>     # This section is for the weewx weather station simulator
>>     
>>     # The time (in seconds) between LOOP packets.
>>     loop_interval = 2.5
>>     
>>     # The simulator mode can be either 'simulator' or 'generator'.
>>     # Real-time simulator. Sleep between each LOOP packet.
>>     mode = simulator
>>     # Generator.  Emit LOOP packets as fast as possible (useful for 
>> testing).
>>     #mode = generator
>>     
>>     # The start time. Format is YYYY-mm-ddTHH:MM. If not specified, the 
>> default 
>>     # is to use the present time.
>>     #start = 2011-01-01T00:00
>>     
>>     # The driver to use:
>>     driver = weewx.drivers.simulator
>>
>>
>> ##############################################################################
>>
>> #   This section is for uploading data to Internet sites
>>
>> [StdRESTful]
>>     
>>     [[StationRegistry]]
>>         # To register this weather station with weewx, set this to true
>>         register_this_station = true
>>     
>>     [[AWEKAS]]
>>         # This section is for configuring posts to AWEKAS.
>>         
>>         # If you wish to do this, set the option 'enable' to true,
>>         # and specify a username and password.
>>         # To guard against parsing errors, put the password in quotes.
>>         enable = false
>>         username = XXX obfuscated by wee_debug XXX
>>         password = XXX obfuscated by wee_debug XXX
>>     
>>     [[CWOP]]
>>         # This section is for configuring posts to CWOP.
>>         
>>         # If you wish to do this, set the option 'enable' to true,
>>         # and specify the station ID (e.g., CW1234).
>>         enable = false
>>         station = XXX obfuscated by wee_debug XXX
>>     
>>     # If this is an APRS (radio amateur) station, uncomment
>>     # the following and replace with a passcode (e.g., 12345).
>>     #passcode = replace_me (APRS stations only)
>>     
>>     [[PWSweather]]
>>         # This section is for configuring posts to PWSweather.com.
>>         
>>         # If you wish to do this, set the option 'enable' to true,
>>         # and specify a station and password.
>>         # To guard against parsing errors, put the password in quotes.
>>         enable = true
>>         station = XXX obfuscated by wee_debug XXX
>>         password = XXX obfuscated by wee_debug XXX
>>     
>>     [[WOW]]
>>         # This section is for configuring posts to WOW.
>>         
>>         # If you wish to do this, set the option 'enable' to true,
>>         # and specify a station and password.
>>         # To guard against parsing errors, put the password in quotes.
>>         enable = false
>>         station = XXX obfuscated by wee_debug XXX
>>         password = XXX obfuscated by wee_debug XXX
>>     
>>     [[Wunderground]]
>>         # This section is for configuring posts to the Weather 
>> Underground.
>>         
>>         # If you wish to do this, set the option 'enable' to true,
>>         # and specify a station (e.g., 'KORHOODR3') and password.
>>         # To guard against parsing errors, put the password in quotes.
>>         enable = true
>>         station = XXX obfuscated by wee_debug XXX
>>         password = XXX obfuscated by wee_debug XXX
>>         
>>         # If you plan on using wunderfixer, set the following
>>         # to your API key:
>>         api_key = XXX obfuscated by wee_debug XXX
>>         
>>         # Set the following to True to have weewx use the WU "Rapidfire"
>>         # protocol. Not all hardware can support it. See the User's Guide.
>>         rapidfire = False
>>     
>>     [[MQTT]]
>>         server_url = XXX obfuscated by wee_debug XXX
>>         topic = weather
>>         unit_system = METRIC
>>         binding = archive, loop
>>         aggregation = aggregate
>>
>>
>>
>> ##############################################################################
>>
>> #   This section specifies what reports, using which skins, to generate.
>>
>> [StdReport]
>>     
>>     # Where the skins reside, relative to WEEWX_ROOT
>>     SKIN_ROOT = /etc/weewx/skins
>>     
>>     # Where the generated reports should go, relative to WEEWX_ROOT
>>     HTML_ROOT = /var/www/html/weewx
>>     
>>     # The database binding indicates which data should be used in reports.
>>     data_binding = wx_binding
>>     
>>     # Whether to log a successful operation
>>     log_success = True
>>     
>>     # Whether to log an unsuccessful operation
>>     log_failure = True
>>     
>>     # Each of the following subsections defines a report that will be run.
>>     # See the customizing guide to change the units, plot types and line
>>     # colors, modify the fonts, display additional sensor data, and other
>>     # customizations. Many of those changes can be made here by overriding
>>     # parameters, or by modifying templates within the skin itself.
>>     
>>     [[SeasonsReport]]
>>         # The SeasonsReport uses the 'Seasons' skin, which contains the
>>         # images, templates and plots for the report.
>>         skin = Seasons
>>         enable = true
>>     
>>     [[SmartphoneReport]]
>>         # The SmartphoneReport uses the 'Smartphone' skin, and the images 
>> and
>>         # files are placed in a dedicated subdirectory.
>>         skin = Smartphone
>>         enable = false
>>         HTML_ROOT = /var/www/html/weewx/smartphone
>>     
>>     [[MobileReport]]
>>         # The MobileReport uses the 'Mobile' skin, and the images and 
>> files
>>         # are placed in a dedicated subdirectory.
>>         skin = Mobile
>>         enable = false
>>         HTML_ROOT = /var/www/html/weewx/mobile
>>     
>>     [[StandardReport]]
>>         # This is the old "Standard" skin. By default, it is not enabled.
>>         skin = Standard
>>         enable = false
>>     
>>     
>>     [[Belchertown]]
>>         skin = Belchertown
>>         HTML_ROOT = /var/www/html
>>     
>>     [[FTP]]
>>         # FTP'ing the results to a webserver is treated as just another 
>> report,
>>         # albeit one with an unusual report generator!
>>         skin = Ftp
>>         
>>         # If you wish to use FTP, set "enable" to "true", then
>>         # fill out the next four lines.
>>         # Use quotes around passwords to guard against parsing errors.
>>         enable = false
>>         user = XXX obfuscated by wee_debug XXX
>>         password = XXX obfuscated by wee_debug XXX
>>         server = replace_me    # The ftp server name, e.g, 
>> www.myserver.org
>>         path = replace_me    # The destination directory, e.g., /weather
>>         
>>         # Set to True for an FTP over TLS (FTPS) connection. Not all 
>> servers
>>         # support this.
>>         secure_ftp = False
>>         
>>         # To upload files from something other than what HTML_ROOT is set
>>         # to above, specify a different HTML_ROOT here.
>>         #HTML_ROOT = /var/www/html/weewx
>>         
>>         # Most FTP servers use port 21
>>         port = 21
>>         
>>         # Set to 1 to use passive mode, zero for active mode
>>         passive = 1
>>     
>>     [[RSYNC]]
>>         # rsync'ing to a webserver is treated as just another report
>>         skin = Rsync
>>         
>>         # If you wish to use rsync, you must configure passwordless ssh 
>> using
>>         # public/private key authentication from the user account that 
>> weewx
>>         # runs to the user account on the remote machine where the files
>>         # will be copied.
>>         #
>>         # If you wish to use rsync, set "enable" to "true", then
>>         # fill out server, user, and path.
>>         # The server should appear in your .ssh/config file.
>>         # The user is the username used in the identity file.
>>         # The path is the destination directory, such as 
>> /var/www/html/weather.
>>         # Be sure that the user has write permissions on the destination!
>>         enable = false
>>         server = replace_me
>>         user = XXX obfuscated by wee_debug XXX
>>         path = replace_me
>>         
>>         # To upload files from something other than what HTML_ROOT is set
>>         # to above, specify a different HTML_ROOT here.
>>         #HTML_ROOT = /var/www/html/weewx
>>         
>>         # Rsync can be configured to remove files from the remote server 
>> if
>>         # they don't exist under HTML_ROOT locally. USE WITH CAUTION: if 
>> you
>>         # make a mistake in the remote path, you could could 
>> unintentionally
>>         # cause unrelated files to be deleted. Set to 1 to enable remote 
>> file
>>         # deletion, zero to allow files to accumulate remotely.
>>         delete = 0
>>     
>>     ####
>>     
>>     # Various options for customizing your reports.
>>     
>>     [[Defaults]]
>>         
>>         [[[Units]]]
>>             
>>             # The following section sets what unit to use for each unit 
>> group.
>>             # NB: The unit is always in the singular. I.e., 
>> 'mile_per_hour',
>>             # NOT 'miles_per_hour'
>>             [[[[Groups]]]]
>>                 
>>                 group_pressure = mbar
>>                 group_altitude = meter
>>                 group_degree_day = degree_C_day
>>                 group_distance = km
>>                 group_rain = mm
>>                 group_rainrate = mm_per_hour
>>                 group_speed = meter_per_second
>>                 group_speed2 = meter_per_second2
>>                 group_temperature = degree_C
>>                 group_concentration = microgram_per_meter_cubed
>>                 group_db = dB
>>                 group_fraction = ppm
>>                 group_interval = minute
>>                 group_percent = percent
>>                 group_radiation = watt_per_meter_squared
>>                 group_time = unix_epoch
>>                 group_volt = volt
>>             
>>             
>>             # The following section sets the formatting for each type of 
>> unit.
>>             [[[[StringFormats]]]]
>>                 
>>                 centibar = %.0f
>>                 cm = %.2f
>>                 cm_per_hour = %.2f
>>                 degree_C = %.1f
>>                 degree_F = %.1f
>>                 degree_compass = %.0f
>>                 foot = %.0f
>>                 hPa = %.1f
>>                 hour = %.1f
>>                 inHg = %.3f
>>                 inch = %.2f
>>                 inch_per_hour = %.2f
>>                 km = %.1f
>>                 km_per_hour = %.0f
>>                 km_per_hour2 = %.1f
>>                 knot = %.0f
>>                 knot2 = %.1f
>>                 kPa = %.2f
>>                 mbar = %.1f
>>                 meter = %.0f
>>                 meter_per_second = %.1f
>>                 meter_per_second2 = %.1f
>>                 mile = %.1f
>>                 mile_per_hour = %.0f
>>                 mile_per_hour2 = %.1f
>>                 mm = %.1f
>>                 mmHg = %.1f
>>                 mm_per_hour = %.1f
>>                 percent = %.0f
>>                 second = %.0f
>>                 uv_index = %.1f
>>                 volt = %.1f
>>                 watt_per_meter_squared = %.0f
>>                 NONE = "   N/A"
>>             
>>             # The following section overrides the label used for each 
>> type of unit
>>             [[[[Labels]]]]
>>                 
>>                 meter = " meter", " meters"    # You may prefer "metre".
>>                 day = " day", " days"
>>                 hour = " hour", " hours"
>>                 minute = " minute", " minutes"
>>                 second = " second", " seconds"
>>                 NONE = ""
>>             
>>             # The following section sets the format for each time scale.
>>             # The values below will work in every locale, but they may 
>> not look
>>             # particularly attractive.
>>             [[[[TimeFormats]]]]
>>                 
>>                 day = %H:%M
>>                 week = %H:%M on %A
>>                 month = %d-%b-%Y %H:%M
>>                 year = %d-%b-%Y %H:%M
>>                 rainyear = %d-%b-%Y %H:%M
>>                 current = %d-%b-%Y %H:%M
>>                 ephem_day = %H:%M
>>                 ephem_year = %d-%b-%Y %H:%M
>>             
>>             [[[[Ordinates]]]]
>>                 
>>                 # Ordinal directions. The last one is for no wind 
>> direction
>>                 directions = N, NNE, NE, ENE, E, ESE, SE, SSE, S, SSW, 
>> SW, WSW, W, WNW, NW, NNW, N/A
>>             
>>             # The following section sets the base temperatures used for 
>> the
>>             #  calculation of heating, cooling, and growing degree-days.
>>             [[[[DegreeDays]]]]
>>                 
>>                 # Base temperature for heating days, with unit:
>>                 heating_base = 65, degree_F
>>                 # Base temperature for cooling days, with unit:
>>                 cooling_base = 65, degree_F
>>                 # Base temperature for growing days, with unit:
>>                 growing_base = 50, degree_F
>>             
>>             # A trend takes a difference across a time period. The 
>> following
>>             # section sets the time period, and how big an error is 
>> allowed to
>>             # still be counted as the start or end of a period.
>>             [[[[Trend]]]]
>>                 
>>                 time_delta = 10800    # 3 hours
>>                 time_grace = 300    # 5 minutes
>>         
>>         # The labels to be used for each observation type
>>         [[[Labels]]]
>>             
>>             # Set to hemisphere abbreviations suitable for your location:
>>             hemispheres = N, S, E, W
>>             
>>             # Formats to be used for latitude whole degrees, longitude 
>> whole
>>             # degrees, and minutes:
>>             latlon_formats = %02d, %03d, %05.2f
>>             
>>             # Generic labels, keyed by an observation type.
>>             [[[[Generic]]]]
>>                 pressure = Pressure
>>                 barometer = Barometer
>>                 dewpoint = Dew Point
>>                 humidex = Humidex
>>                 heatindex = Heat Index
>>                 inHumidity = In Humidity
>>                 inTemp = In Temp
>>                 noise = dB
>>                 co2 = CO2
>>                 o3 = AIQ
>>                 outHumidity = Humidity
>>                 outTemp = Out Temperature
>>                 maxSolarRad = Max Solar
>>                 rain = Rain
>>                 rainRate = Rain Rate
>>                 windDir = Wind Direction
>>                 windGust = Gust Speed
>>                 windGustDir = Gust Direction
>>                 windSpeed = Wind Speed
>>                 windchill = Wind Chill
>>                 windgustvec = Gust Vector
>>                 windvec = Wind Vector
>>                 
>>                 
>>                 # Sensor status indicators
>>                 
>>                 txBatteryStatus = Transmitter
>>                 windBatteryStatus = Anemometer Battery
>>                 rainBatteryStatus = Rain Gauge Battery
>>                 outTempBatteryStatus = Outdoor Module Battery
>>                 inTempBatteryStatus = Inside Temperature
>>                 consBatteryVoltage = Console
>>                 heatingVoltage = Heating
>>                 supplyVoltage = Supply
>>                 referenceVoltage = Reference
>>                 signal1 = WiFi Signal
>>                 signal2 = Outdoor Module Signal
>>                 signal3 = Anemometer Signal
>>                 signal4 = Rain Gauge Signal
>>         
>>         
>>         
>>         
>>         [[[Almanac]]]
>>             
>>             # The labels to be used for the phases of the moon:
>>             moon_phases = New, Waxing crescent, First quarter, Waxing 
>> gibbous, Full, Waning gibbous, Last quarter, Waning crescent
>>
>>
>> ##############################################################################
>>
>> #   This service acts as a filter, converting the unit system coming from
>> #   the hardware to a unit system in the database.
>>
>> [StdConvert]
>>     
>>     # The target_unit affects only the unit system in the database. Once
>>     # chosen it cannot be changed without converting the entire database.
>>     # Modification of target_unit after starting weewx will result in
>>     # corrupt data - the database will contain a mix of US and METRIC 
>> data.
>>     #
>>     # The value of target_unit does not affect the unit system for
>>     # reporting - reports can display US, Metric, or any combination of 
>> units.
>>     #
>>     # In most cases, target_unit should be left as the default: US
>>     #
>>     # In particular, those migrating from a standard wview installation
>>     # should use US since that is what the wview database contains.
>>     
>>     # DO NOT MODIFY THIS VALUE UNLESS YOU KNOW WHAT YOU ARE DOING!
>>     target_unit = METRIC    # Options are 'US', 'METRICWX', or 'METRIC'
>>
>>
>> ##############################################################################
>>
>> #   This section can adjust data using calibration expressions.
>>
>> [StdCalibrate]
>>     
>>     [[Corrections]]
>>         # For each type, an arbitrary calibration expression can be given.
>>         # It should be in the units defined in the StdConvert section.
>>         # Example:
>>         foo = foo - 1.5
>>
>>
>> ##############################################################################
>>
>> #   This section is for quality control checks. If units are not 
>> specified,
>> #   values must be in the units defined in the StdConvert section.
>>
>> [StdQC]
>>     
>>     [[MinMax]]
>>         pressure = 260, 1160, mbar
>>         outTemp = -40, 65, degree_C
>>         inTemp = 0, 50, degree_C
>>         outHumidity = 0, 100
>>         inHumidity = 0, 100
>>         windSpeed = 0, 50, meter_per_second
>>         rain = 0, 150, mm
>>         co2 = 0, 5000, ppm
>>         noise = 35, 110, dB
>>
>>
>> ##############################################################################
>>
>> #   This section controls the origin of derived values.
>>
>> [StdWXCalculate]
>>     
>>     [[Calculations]]
>>         # How to calculate derived quantities.  Possible values are:
>>         #  hardware        - use the value provided by hardware
>>         #  software        - use the value calculated by weewx
>>         #  prefer_hardware - use value provide by hardware if available,
>>         #                      otherwise use value calculated by weewx
>>         
>>         pressure = prefer_hardware
>>         altimeter = prefer_hardware
>>         appTemp = prefer_hardware
>>         barometer = prefer_hardware
>>         cloudbase = prefer_hardware
>>         dewpoint = prefer_hardware
>>         ET = prefer_hardware
>>         heatindex = prefer_hardware
>>         humidex = prefer_hardware
>>         inDewpoint = prefer_hardware
>>         maxSolarRad = prefer_hardware
>>         rainRate = prefer_hardware
>>         windchill = prefer_hardware
>>         windrun = prefer_hardware
>>
>>
>> ##############################################################################
>>
>> #   For hardware that supports it, this section controls how often the
>> #   onboard clock gets updated.
>>
>> [StdTimeSynch]
>>     
>>     # How often to check the weather station clock for drift (in seconds)
>>     clock_check = 14400
>>     
>>     # How much it can drift before we will correct it (in seconds)
>>     max_drift = 5
>>
>>
>> ##############################################################################
>>
>> #   This section is for configuring the archive service.
>>
>> [StdArchive]
>>     
>>     # If the station hardware supports data logging then the archive 
>> interval
>>     # will be downloaded from the station. Otherwise, specify it (in 
>> seconds).
>>     archive_interval = 300
>>     
>>     # If possible, new archive records are downloaded from the station
>>     # hardware. If the hardware does not support this, then new archive
>>     # records will be generated in software.
>>     # Set the following to "software" to force software record generation.
>>     record_generation = hardware
>>     
>>     # Whether to include LOOP data in hi/low statistics
>>     loop_hilo = True
>>     
>>     # The data binding used to save archive records
>>     data_binding = wx_binding
>>
>>
>> ##############################################################################
>>
>> #   This section binds a data store to a database.
>>
>> [DataBindings]
>>     
>>     [[wx_binding]]
>>         # The database must match one of the sections in [Databases].
>>         # This is likely to be the only option you would want to change.
>>         database = archive_sqlite
>>         # The name of the table within the database
>>         table_name = archive
>>         # The manager handles aggregation of data for historical summaries
>>         manager = weewx.manager.DaySummaryManager
>>         # The schema defines the structure of the database.
>>         # It is *only* used when the database is created.
>>         schema = schemas.wview_extended.schema
>>
>>
>> ##############################################################################
>>
>> #   This section defines various databases.
>>
>> [Databases]
>>     
>>     # A SQLite database is simply a single file
>>     [[archive_sqlite]]
>>         database_name = weewx.sdb
>>         database_type = SQLite
>>     
>>     # MySQL
>>     [[archive_mysql]]
>>         database_name = weewx
>>         database_type = MySQL
>>
>>
>> ##############################################################################
>>
>> #   This section defines defaults for the different types of databases.
>>
>> [DatabaseTypes]
>>     
>>     # Defaults for SQLite databases
>>     [[SQLite]]
>>         driver = weedb.sqlite
>>         # Directory in which the database files are located
>>         SQLITE_ROOT = /var/lib/weewx
>>     
>>     # Defaults for MySQL databases
>>     [[MySQL]]
>>         driver = weedb.mysql
>>         # The host where the database is located
>>         host = localhost
>>         # The user name for logging in to the host
>>         user = XXX obfuscated by wee_debug XXX
>>         # The password for the user name (quotes guard against parsing 
>> errors)
>>         password = XXX obfuscated by wee_debug XXX
>>
>>
>> ##############################################################################
>>
>> #   This section configures the internal weewx engine.
>>
>> [Engine]
>>     
>>     # The following section specifies which services should be run and in 
>> what order.
>>     [[Services]]
>>         prep_services = weewx.engine.StdTimeSynch
>>         data_services = ,
>>         process_services = weewx.engine.StdConvert, 
>> weewx.engine.StdCalibrate, weewx.engine.StdQC, 
>> weewx.wxservices.StdWXCalculate
>>         xtype_services = weewx.wxxtypes.StdWXXTypes, 
>> weewx.wxxtypes.StdPressureCooker, weewx.wxxtypes.StdRainRater, 
>> weewx.wxxtypes.StdDelta
>>         archive_services = weewx.engine.StdArchive
>>         restful_services = weewx.restx.StdStationRegistry, 
>> weewx.restx.StdWunderground, weewx.restx.StdPWSweather, 
>> weewx.restx.StdCWOP, weewx.restx.StdWOW, weewx.restx.StdAWEKAS, 
>> user.mqtt.MQTT
>>         report_services = weewx.engine.StdPrint, weewx.engine.StdReport
>>
>> wee_debug report successfully generated
>>
>>
>> torsdag 14 januari 2021 kl. 14:54:01 UTC+1 skrev gjr80:
>>
>>> Hi,
>>>
>>> If I read your post correctly the problem you have is that you can't 
>>> display wifi status, various sensor rf status and various sensors battery 
>>> status on your Seasons page? Your netatmo driver is picking up the data and 
>>> passing it to WeeWX, there's just a few things you need to do to make the 
>>> data available to the Seasons skin. First up you need to get WeeWX to save 
>>> the sensor status data to database. Then you need to modify the Seasons 
>>> skin to display the sensor status fields concerned.
>>>
>>> According to the log extract everything is running without error and we 
>>> can see the fields the netatmo driver is emitting in loop packets from this 
>>> line:
>>>
>>> Jan 12 11:37:57 Raspi /weewxd: netatmo: MainThread: packet: {'dateTime': 
>>> 1610447878 , 'usUnits': 16, 'pressure': 994.5, 'inTemp': 23.1, 
>>> 'inHumidity': 40, 'co2': 672, ' noise': 44, 'wifi_status': 57, 
>>> 'outTemp': 3, 'outHumidity': 75, 'out_rf_status': 60 , 'out_battery_vp': 
>>> 5874, 'outTempBatteryStatus': 93, 'windSpeed': 2, 'windDir': 23 7, 
>>> 'windGust': 5, 'windGustDir': 237, 'wind_rf_status': 86, 'wind_battery_vp': 
>>> 5907 , 'windBatteryStatus': 95, 'rain': 0.0, 'rain_total': 0.06, 
>>> 'rain_rf_status': 
>>> 63, ' rain_battery_vp': 6046, 'rainBatteryStatus': 100} 
>>>
>>> WeeWX will accumulate the data in these loop packets and every archive 
>>> period WeeWX will emit an archive record consisting of the accumulated loop 
>>> packet fields. Try running WeeWX directly, 
>>> <http://weewx.com/docs/usersguide.htm#Running_directly> you will see 
>>> the loop packets (lines starting with LOOP:) and archive records (lines 
>>> starting with REC:) on your console. The reason the archive records are 
>>> important is that it is those fields and their data that are saved to 
>>> database. If a field in an archive record exists in your database schema 
>>> then the data from that field is saved to database, if the field does not 
>>> exist in the database schema then the data is not saved to database. The 
>>> legacy wview schema does not have very many sensor status fields, the 
>>> wview_extended schema has significantly more fields which covers a few 
>>> of your netatmo fields (outTempBatteryStatus, windBatteryStatus and 
>>> rainBatterystatus) but a number are not included (wifi_status, 
>>> out_rf_status, out_battery_vp, wind_rf_status, wind_battery_vp, 
>>> rain_rf_status and rain_battery_vp). We have a couple of choices here, 
>>> we can modify your database schema and add the extra fields or we can 
>>> repurpose some of the unused fields in your database. If you use the 
>>> wview_extended schema it comes with a number of generic battery and 
>>> signal level fields so I would suggest we use those rather than modify your 
>>> schema.
>>>
>>> To repurpose the fields:
>>>
>>> 1. You need to be using the wview_extended schema, you indicated you 
>>> have tried that. If you are still using that schema then that is fine, if 
>>> not change back to it.
>>>
>>> 2. We need to get the data from the xxx_status and xxx_battery_vp 
>>> fields into the fields were are going to use in the wview_extended 
>>> schema, there are a number of ways we can do this, I suggest we use the 
>>> netatmo driver sensor map to do this in the driver. We do this using a 
>>> [[sensor_map]] stanza in the netatmo driver config stanza in weewx.conf. 
>>> Edit /etc/weewx/weewx.conf, locate the [netatmo] stanza and add the 
>>> [[sensor_map]] stanza as follows:
>>>
>>> [netatmo]
>>>     ....
>>>     [[sensor_map]]
>>>         wifi_status = ''
>>>         # map wifi status to field signal1
>>>         signal1 = *.NAMain.wifi_status
>>>         out_rf_status = 
>>>         # map out rf status status to field signal2
>>>         signal2 = *.NAModule1.rf_status
>>>         wind_rf_status = 
>>>         # map wind rf status to field signal3
>>>         signal3 = *.NAModule2.rf_status
>>>         rain_rf_status = 
>>>         # map rain rf status to field signal4
>>>         signal4 = *.NAModule4.rf_status
>>>         out_battery_vp = 
>>>         # map out battery vp to field batteryStatus1
>>>         batteryStatus1 = *.NAModule1.battery_vp
>>>         wind_battery_vp = 
>>>         # map wind battery vp to field batteryStatus2
>>>         batteryStatus2 = *.NAModule2.battery_vp
>>>         rain_battery_vp = 
>>>         # map rain battery vp to field batteryStatus3
>>>         batteryStatus3 = *.NAModule3.battery_vp
>>>
>>> 3. Save weewx.conf and run WeeWX directly again. You should now see 
>>> loop packets and archive records that contain fields signal1, signal2, 
>>> signal3. signal4, batteryStatus1, batteryStatus2 and batteryStatus3. 
>>> These fields should have the wifi status, rf status and battery vp status 
>>> data you saw previously. If not or nothing happens check the WeeWX log for 
>>> errors and post a log extract back here.
>>>
>>> You now have all of the status fields being saved to database, now we 
>>> need to configure the Seasons skin to display them. There are a couple of 
>>> things to do here; first we need to make some changes to the file 
>>> /etc/weewx/skins/Seasons/sensors.inc to include the new fields we are 
>>> using. Secondly, we need to add a few entries to the Seasons skin config 
>>> file  /etc/weewx/skins/Seasons/skin.conf. The changes to sensors.inc 
>>> are quite substantial so I have attached a modified sensors.inc 
>>> (actually named sensors.txt due to Google Groups limitations). To 
>>> install rename your existing sensors.inc to say sensors_orig.inc and 
>>> download the attached sensors.txt in its place and rename to sensors.inc. 
>>> To make the changes to skin.conf edit /etc/weewx/skins/Seasons/skin.conf 
>>> and locate the [Labels] stanza, make the necessary changes/additions so 
>>> that it looks like the following (changes/additions highlighted in yellow):
>>>
>>> [Labels]
>>>
>>>     # Override some labels. No need to identify these as a "Battery"
>>>     # or "Voltage", because that is included in the template.
>>>     [[Generic]]
>>>         txBatteryStatus      = Transmitter
>>>         windBatteryStatus    = Anemometer Battery
>>>         rainBatteryStatus    = Rain Gauge Battery
>>>         outTempBatteryStatus = Outdoor Module Battery
>>>         inTempBatteryStatus  = Inside Temperature
>>>         consBatteryVoltage   = Console
>>>         heatingVoltage       = Heating
>>>         supplyVoltage        = Supply
>>>         referenceVoltage     = Reference
>>>         signal1              = WiFi
>>>         signal2              = Outdoor Module Signal
>>>         signal3              = Anemometer Signal
>>>         signal4              = Rain Gauge Signal
>>>
>>>         # Some specialized labels
>>>         rain_today           = Rain Today
>>>         wind                 = Wind
>>>
>>> Save skin.conf and on the next report cycle check your Seasons page, 
>>> hopefully it will have WiFi status, rf status and battery level data in the 
>>> Sensor Status panel. If not, check the WeeWX log for any errors and if 
>>> there are any post them here. I expect there will be a little fine tuning 
>>> needed, but let's see how the above goes first. If your Seasons page is 
>>> publicly accessible a link would be handy.
>>>
>>> If you need to revert to the old sensors.inc, just delete sensors.inc 
>>> and rename sensors_orig.inc to sensors.inc.
>>>
>>> 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/4e522d77-c8a4-41a1-8869-2c6d7bfd4995n%40googlegroups.com.

Reply via email to