Weatherlink Live driver developpment

612 views
Skip to first unread message

Florentin Prevost

unread,
Jun 21, 2020, 1:18:41 PM6/21/20
to weewx-development
Hi,

I worked with the fork of https://github.com/vinceskahan/weewx-weatherlinklive-json and I would like to ask some questions about driver developpment. 

- How can I passed argument of weewx.conf to my driver ? I work to request lost data from Weewx on Weatherlink.com because WeatherLink Live don't have API to take archive directly and I would like to passed some arguments like archive_interval, sql password & etc 
- How work genArchiveRecords when it call? It run as each report ? Or it is a loop that waiting to have return values ?


Thank you for your answer and support. 

Tom Keffer

unread,
Jun 21, 2020, 2:58:58 PM6/21/20
to weewx-development
Make sure you read the section Porting to new hardware in the Customizing Guide. It answers some of your questions.

1. The full configuration information is available as the first argument to your driver loader() function as a dictionary. However, in general, you should try to keep your driver as modular as possible, and not pick and choose information from all over the dictionary. Best practice is to have your driver depend on information in its private stanza. For example, if your driver is named mywlnk.py, it should have a stanza

[MyWlink]

and look there for all its information. But, there are many exceptions to this best practice.

2. The function genArchiveRecords() is a generator function. If you don't know what that is, see the section Generators in the Python documentation. It takes one argument: a timestamp with the last time in the database. Your function should return all archive records since that time, using a yield statement. It will be called at startup and at the end of each archive interval. However, exactly when should not be your concern --- that's the engine's job.

-tk

--
You received this message because you are subscribed to the Google Groups "weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/d04b1fde-25c3-476d-b885-8d45b682976ao%40googlegroups.com.

Maarten van der Hoeven

unread,
Jun 21, 2020, 5:16:27 PM6/21/20
to weewx-development
I am happy to test your driver in development. I have a Weather Link Live running for test purposes, so I can play with it.

Op zondag 21 juni 2020 19:18:41 UTC+2 schreef Florentin Prevost:

Florentin Prevost

unread,
Jun 21, 2020, 5:21:45 PM6/21/20
to weewx-development
Thank you very well for your answer :) 

For the first question, sorry, I wanted to say that if it possible to pass argument that is not in stanza [myWlink] for example. Because I've set the same parameter for sql database if you know what i mean. 

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-de...@googlegroups.com.

Tom Keffer

unread,
Jun 21, 2020, 6:16:03 PM6/21/20
to Florentin Prevost, weewx-development
Yes, it's possible to access anything in the dictionary. For example, the name of the database used by the binding wx_binding would be given by

config_dict['Databases']['wx_binding']['database']

However, it is rarely necessary to do this. Better to use the functions in manager.py to simply open up the database you need. For example,

db = manager.open_manager_with_config(config_dict, 'wx_binding')

would return a database Manager object for the wx_binding.

See the section Programming interface in the Customizing Guide.

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/d524dd2b-0369-42ee-b5e5-73194a97fce1o%40googlegroups.com.

Florentin Prevost

unread,
Jun 22, 2020, 2:25:43 AM6/22/20
to weewx-development
Hi,

Thank you. I stuck just into passed config_dict.

How can I pass this value into my driver ? 

In documentation, he say that create class like this : 

class MyAlarm(StdService):
    """Service that sends email if an arbitrary expression evaluates true"""

    def __init__(self, engine, config_dict):


Thank's

Tom Keffer

unread,
Jun 22, 2020, 8:08:03 AM6/22/20
to Florentin Prevost, weewx-development
A driver is different from a service. The documentation you quoted is for a service. You want the section Porting to new hardware.

Take a look at Vince's driver that you linked to in the first post of this thread. On line 106, the configuration dictionary (argument config_dict) is passed into the function loader(). It contains everything in weewx.conf. On the next line, 107, just the substructure config_dict['WeatherLinkLiveJSON'], which corresponds to the section [WeatherLinkLiveJSON]in weewx.conf, is passed on to the class WeatherLinkLiveJSONDriver. Nothing else. That's a typical pattern.

-tk

To unsubscribe from this group and stop receiving emails from it, send an email to weewx-developm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/weewx-development/3a68298f-1115-4edf-bac0-b0890b132c7fo%40googlegroups.com.

flor...@pre-vost.fr

unread,
Jun 22, 2020, 1:26:46 PM6/22/20
to weewx-development
Hi,

Yeahh :) It work ahah ^^ Thank you for your answer.

I try to implement genArchiveRecords(self,since_ts): but I've this error : 

  1. INFO weewx.engine: Main loop exiting. Shutting engine down.
  2. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__: Caught unrecoverable exception:
  3. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****  'generator' object has no attribute 'get'
  4. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****  Traceback (most recent call last):
  5. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****    File "/usr/share/weewx/weewxd", line 154, in main
  6. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****      engine.run()
  7. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 158, in run
  8. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****      self.dispatchEvent(weewx.Event(weewx.STARTUP))
  9. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 224, in dispatchEvent
  10. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****      callback(event)
  11. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 530, in startup
  12. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****      self._catchup(self.engine.console.genStartupRecords)
  13. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****    File "/usr/share/weewx/weewx/engine.py", line 639, in _catchup
  14. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****      ts = record.get('dateTime')
  15. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****  AttributeError: 'generator' object has no attribute 'get'
  16. Jun 22 19:19:32 debian weewx[1344] CRITICAL __main__:     ****  Exiting.
  17. Jun 22 19:20:30 debian systemd[1]: session-14.scope: Succeeded.

I don't know why ? I import weewx.engine into my blabla.py

Maybe I losted to implement other value or function ?

flor...@pre-vost.fr

unread,
Jun 22, 2020, 2:35:30 PM6/22/20
to weewx-development
Ok I found the problem, I use request to get json from URL but weewx confuse to internal get. 

How can I pass this error ?

Tom Keffer

unread,
Jun 23, 2020, 9:43:26 AM6/23/20
to flor...@pre-vost.fr, weewx-development
Florentin, you are being very vague about the error. You're showing no code, and you're not showing the error. "weewx confuse to internal get". I don't know what that means.





flor...@pre-vost.fr

unread,
Jun 25, 2020, 9:21:11 AM6/25/20
to weewx-development
Hi Tom,

Sorry, at the moment, I fix this issue.
When you want to make a request by using : requests.get("url") in genLoopPacket(), Weewx is mistaken with this proper get function, I don't know why but I fix this by declare Request = requests.session()

Also, I want to know if it possible to have the daily rain max by using a function in manager.py ? I see _read_metadata() or _get_day_summary() but I don't know how to implement it.

F. Prevost

I see 


Tom Keffer

unread,
Jun 25, 2020, 10:00:20 AM6/25/20
to flor...@pre-vost.fr, weewx-development
Let me give it a try. It's a simple uploader.

-tk

Tom Keffer

unread,
Jun 25, 2020, 10:41:45 AM6/25/20
to flor...@pre-vost.fr, weewx-development
Is there an online repository that holds the code? GitHub? Elsewhere?

flor...@pre-vost.fr

unread,
Jun 25, 2020, 11:34:37 AM6/25/20
to weewx-development

Maarten van der Hoeven

unread,
Jun 26, 2020, 12:17:08 PM6/26/20
to weewx-development
Hello Florentin,

Do you want me to help you with this? A have programming skills, though not Python yet, but am able to test with my WLL. And poke around in the code, if you want me to...

Op donderdag 25 juni 2020 om 17:34:37 UTC+2 schreef flor...@pre-vost.fr:

Bastiaan Meelberg

unread,
Jun 26, 2020, 12:35:45 PM6/26/20
to weewx-development
Hi,

I’m also working on a wll driver, including The 2,5 UDP packages. It is running now for a few days with good results (no rain check yet).
The integration with the online fetch sounds interesting!
This is my git fork:
https://github.com/grebleem/WeatherLinkliveUDP

It is feeding my site: https://meteo-otterlo.nl

Cheers, Bastiaan

flor...@pre-vost.fr

unread,
Jun 26, 2020, 12:56:18 PM6/26/20
to weewx-development
Hi everyone and thank you for your support ! I'm very glade to know that people want to make this driver because there are not a lot.


@Bastiaan it's very nice ! Just, why you use update packet or not simply do a for _packet in blabla(): It's a udp protocol ?

With my driver, you can retrive lost data by using API v2 of Weatherlink. Depend to your subscription.

Glad to work with you, and if you want, it will be more often that split some git to one. 

Regards, -fp 

Maarten van der Hoeven

unread,
Jun 26, 2020, 4:03:58 PM6/26/20
to weewx-development
Hello Florentin,

I am getting retries on my sensors.

I have ISS running on ID2, and an external temp sensor at ID 3. Could this be the reason of not getting the sensors?

Can you test it against my WL-archive? I will send you the api-key and secret in that case

Jun 26 21:57:20 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 1
Jun 26 21:57:20 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 2
Jun 26 21:57:20 ubuntu weewx[3036] DEBUG user.WLLDriver: StartTimeStamp is : 1593115200
Jun 26 21:57:20 ubuntu weewx[3036] INFO user.WLLDriver: Failure to get data https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201439&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=d475287eac8fec7264de64abc1ffb2212bf57902c90e8d623f375209eb5dbe38 - try 1 - ('sensors')
Jun 26 21:57:30 ubuntu weewx[3036] DEBUG user.WLLDriver: Request archive from 1592677980 to 1593201300
Jun 26 21:57:30 ubuntu weewx[3036] DEBUG user.WLLDriver: Impossible to request data > 24H. Request new data to Weatherlink from 1593114900 to 1593201300 ...
Jun 26 21:57:30 ubuntu weewx[3036] DEBUG user.WLLDriver: URL API Weatherlink is https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201450&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=55695588ffc568087c334e124788607a1a24ac091992170cdbea2eec0e4f72e3
Jun 26 21:57:30 ubuntu weewx[3036] DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): api.weatherlink.com:443
Jun 26 21:57:31 ubuntu weewx[3036] DEBUG urllib3.connectionpool: https://api.weatherlink.com:443 "GET /v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201450&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=55695588ffc568087c334e124788607a1a24ac091992170cdbea2eec0e4f72e3 HTTP/1.1" 401 49
Jun 26 21:57:31 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 1
Jun 26 21:57:31 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 2
Jun 26 21:57:31 ubuntu weewx[3036] DEBUG user.WLLDriver: StartTimeStamp is : 1593115200
Jun 26 21:57:31 ubuntu weewx[3036] INFO user.WLLDriver: Failure to get data https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201450&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=55695588ffc568087c334e124788607a1a24ac091992170cdbea2eec0e4f72e3 - try 2 - ('sensors')
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: Request archive from 1592677980 to 1593201300
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: Impossible to request data > 24H. Request new data to Weatherlink from 1593114900 to 1593201300 ...
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: URL API Weatherlink is https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201461&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=cea8b312bb2a06c5409affbd3e8e3c782834065078ea9e0e47e1a78047e1f422
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): api.weatherlink.com:443
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG urllib3.connectionpool: https://api.weatherlink.com:443 "GET /v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201461&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=cea8b312bb2a06c5409affbd3e8e3c782834065078ea9e0e47e1a78047e1f422 HTTP/1.1" 401 49
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 1
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 2
Jun 26 21:57:41 ubuntu weewx[3036] DEBUG user.WLLDriver: StartTimeStamp is : 1593115200
Jun 26 21:57:41 ubuntu weewx[3036] INFO user.WLLDriver: Failure to get data https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201461&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=cea8b312bb2a06c5409affbd3e8e3c782834065078ea9e0e47e1a78047e1f422 - try 3 - ('sensors')
Jun 26 21:57:51 ubuntu weewx[3036] DEBUG user.WLLDriver: Request archive from 1592677980 to 1593201300


Op vrijdag 26 juni 2020 om 18:56:18 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jun 26, 2020, 4:22:59 PM6/26/20
to weewx-development
Can you give me the result of the request usine to weatherlink ?

Maarten van der Hoeven

unread,
Jun 26, 2020, 4:27:17 PM6/26/20
to weewx-development
Dont know what usine means. You're looking for this?

Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Finished loading service user.mqtt.MQTT
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Loading service weewx.engine.StdPrint
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Finished loading service weewx.engine.StdPrint
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Loading service weewx.engine.StdReport
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Finished loading service weewx.engine.StdReport
Jun 26 21:57:09 ubuntu weewx[3036] INFO __main__: Starting up weewx version 4.1.1
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.engine: Station does not support reading the time
Jun 26 21:57:09 ubuntu weewx[3036] INFO weewx.engine: Using binding 'wx_binding' to database 'weewxtest'
Jun 26 21:57:09 ubuntu weewx[3036] INFO weewx.manager: Starting backfill of daily summaries
Jun 26 21:57:09 ubuntu weewx[3036] INFO weewx.engine: Starting main packet loop.
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG user.WLLDriver: Request archive from 1592677980 to 1593201300
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG user.WLLDriver: Impossible to request data > 24H. Request new data to Weatherlink from 1593114900 to 1593201300 ...
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG user.WLLDriver: URL API Weatherlink is https://api.weatherlink.com/v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201429&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=4ec4be2e568748b906bb2467731310c508f3532eacc55a0f8a23d997add0a2d0
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): api.weatherlink.com:443
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG weewx.manager: Daily summary version is 2.0
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG urllib3.connectionpool: https://api.weatherlink.com:443 "GET /v2/historic/91978?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593201429&start-timestamp=1593114900&end-timestamp=1593201300&api-signature=4ec4be2e568748b906bb2467731310c508f3532eacc55a0f8a23d997add0a2d0 HTTP/1.1" 401 49
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 1
Jun 26 21:57:09 ubuntu weewx[3036] DEBUG user.WLLDriver: OK Wl 2


Op vrijdag 26 juni 2020 om 22:22:59 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jun 26, 2020, 4:30:19 PM6/26/20
to weewx-development

Maarten van der Hoeven

unread,
Jun 26, 2020, 4:32:06 PM6/26/20
to weewx-development



code

"401"

message

"API call timestamp parameter \"t\" is stale."


Op vrijdag 26 juni 2020 om 22:30:19 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jun 26, 2020, 4:35:10 PM6/26/20
to weewx-development
Relaunch weewx and use the url on debug. Here, the url is not in the current timestamp. It for this thay you've this error.

Maarten van der Hoeven

unread,
Jun 26, 2020, 4:45:24 PM6/26/20
to weewx-development
I've got weewx already on debug. Or do you mean something else?

# WEEWX CONFIGURATION FILE

##############################################################################

# 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.1.1

Op vrijdag 26 juni 2020 om 22:35:10 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jun 26, 2020, 4:54:19 PM6/26/20
to weewx-development
Or do you mean running weewx standalone?

Parameter name: "api-key" has value "nivwsekqwfbkhqtqwo8nximhl7zgxpcs"
Parameter name: "api-secret" has value "ABC123"
Parameter name: "end-timestamp" has value "1593204600"
Parameter name: "start-timestamp" has value "1593118200"
Parameter name: "station-id" has value "91978"
Parameter name: "t" has value "1593204804"
Parameter name: "api-key" has value "nivwsekqwfbkhqtqwo8nximhl7zgxpcs"
Parameter name: "api-secret" has value "ABC123"
Parameter name: "end-timestamp" has value "1593204600"
Parameter name: "start-timestamp" has value "1593118200"
Parameter name: "station-id" has value "91978"
Parameter name: "t" has value "1593204816"

Op vrijdag 26 juni 2020 om 22:45:24 UTC+2 schreef Maarten van der Hoeven:

flor...@pre-vost.fr

unread,
Jun 26, 2020, 4:58:12 PM6/26/20
to weewx-development
No, I would like just to restart weewx and when debug mode show URL API, request this link on your favorite browser and put on comment the result

Maarten van der Hoeven

unread,
Jun 26, 2020, 5:04:35 PM6/26/20
to weewx-development

flor...@pre-vost.fr

unread,
Jun 26, 2020, 5:07:24 PM6/26/20
to weewx-development
Check your time server. It appear that is not correctly set and the API return a wrong time when you request API

Maarten van der Hoeven

unread,
Jun 26, 2020, 5:09:59 PM6/26/20
to weewx-development
Hmmm, not sure. Looks like time&date is right to me

root@ubuntu:/etc/weewx# date
Fri 26 Jun 2020 11:08:42 PM CEST
root@ubuntu:/etc/weewx#



Op vrijdag 26 juni 2020 om 23:07:24 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jun 26, 2020, 5:12:17 PM6/26/20
to weewx-development
Do you've set the api secret ? 

Maarten van der Hoeven

unread,
Jun 26, 2020, 5:15:11 PM6/26/20
to weewx-development
Here is my driver-config. api-secret is set (although I've changed it a bit in this copy below):

[WLLDriver]
    driver = user.WLLDriver
    max_tries = 5
    retry_wait = 10
    poll_interval = 5
    url = http://192.168.2.33:80/v1/current_conditions
    wl_apikey = nivwsekqwfbkhqtqwo8nximhl7zgxpcs
    wl _apisecret = x6omxelabcdefgbn1ef1msbqfdmiwgys
    wl_stationid = 91978
    wl_archive_interval = 5

Op vrijdag 26 juni 2020 om 23:12:17 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jun 26, 2020, 5:19:01 PM6/26/20
to weewx-development
you've a space :    wl _apisecret = x6omxelabcdefgbn1ef1msbqfdmiwgys 

correct :   wl_apisecret = x6omxelabcdefgbn1ef1msbqfdmiwgys 

Maarten van der Hoeven

unread,
Jun 26, 2020, 5:26:59 PM6/26/20
to weewx-development
Doh!!! That makes a difference. Sigh...

Progress now, but an new failure


URL response. JSON response is very long. What part do you want to see? Small part:


1


bar_absolute

30.002

bar_hi_at

1593120400

bar_sea_level

30.015

arch_int

300

bar_lo

30.011

bar_hi

30.016

bar_lo_at

1593120430

ts

1593120600

Op vrijdag 26 juni 2020 om 23:15:11 UTC+2 schreef Maarten van der Hoeven:

Maarten van der Hoeven

unread,
Jun 26, 2020, 5:52:53 PM6/26/20
to weewx-development
On sensor 1, sensor_type 242 I have:

bar_absolute
29.799

bar_hi_at
1593193506
bar_sea_level
29.812

arch_int
300

bar_lo
29.812

bar_hi
29.818

bar_lo_at
1593193598

ts
1593193800

On sensor 2, sensor_type 242 I have:

temp_in_lo_at
1593193748

arch_int
300
temp_in_hi
95.4

temp_in_hi_at
1593193508

hum_in_hi
38.2

temp_in_last
95

temp_in_lo
94.9

hum_in_lo
37.6

hum_in_last
38.2

dew_point_in
65.6

hum_in_lo_at
1593193508

heat_index_in
98.2

hum_in_hi_at
1593193748

ts
1593193800

On sensor 2, sensor_type 242 I have:

wind_speed_avg
null

dew_point_hi_at
null
supercap_volt_last
null

uv_dose
null

wind_chill_last
null

solar_rad_hi
null

solar_volt_last
null

dew_point_lo_at
null

thsw_index_hi_at
null

dew_point_last
null

rain_size
1

thsw_index_lo
null

uv_index_hi
null

thsw_index_hi
null

thsw_index_lo_at
null

solar_rad_hi_at
1593193800

heat_index_hi
null

arch_int
300

good_packets_streak
33

wind_run
null

rain_rate_hi_at
1593193508

tx_id
3

temp_hi
83.2

temp_lo
82.8

wind_dir_of_prevail
null

thw_index_last
null

rain_rate_hi_clicks
0

et
null

rainfall_in
0

wind_chill_lo_at
null

rainfall_mm
0

wet_bulb_last
null

trans_battery
null

rain_rate_hi_in
0

hum_lo
null

heat_index_last
null

hum_hi
null

heat_index_hi_at
null

rain_rate_hi_mm
0

rainfall_clicks
0

wet_bulb_hi_at
1593180160

solar_rad_volt_last
12

wind_speed_hi
null

temp_last
82.8

temp_avg
82.9

trans_battery_flag
0

hum_last
null

wind_chill_lo
null

wet_bulb_hi
null

wind_speed_hi_at
null

reception
98

wet_bulb_lo_at
null

solar_rad_avg
null

error_packets
0

afc
-2

cooling_degree_days
0.061805565

rssi
-80

wet_bulb_lo
null

wind_speed_hi_dir
null

temp_lo_at
1593193685

dew_point_hi
null

thw_index_lo
null

uv_index_hi_at
null

dew_point_lo
null

solar_energy
null

resynchs
0

temp_hi_at
1593193513

thw_index_hi
null

hum_lo_at
null

thw_index_lo_at
null

thw_index_hi_at
null

thsw_index_last
null

hum_hi_at
null

uv_index_avg
null

uv_volt_last
3

heating_degree_days
0

ts
1593193800


Op vrijdag 26 juni 2020 om 23:26:59 UTC+2 schreef Maarten van der Hoeven:

Bastiaan Meelberg

unread,
Jun 27, 2020, 4:17:55 AM6/27/20
to weewx-development
Python is pretty new to me, I was unaware of the use of the _packet underscore method. I will update my code. Thanks for the tip.

Have a look at the rain calculations, I found out yesterday, during a rain shower, setting  the self.rain_previous_period to zero is not a good idea. If weewx is reloading the diver (and it does) it will add the daily rain as a whole new rainfall. I will update my repo during the day.

Also at midnight WLL will reset the rain_daily, so at that moment the rain_previous must be reset.

I also don't think you need to do all the METRIC and METRICWX conversions. Weewx will do that for you, if you set the 'usUnits': weewx.US  in the _packet. The LOOP will be generated and weewx is adding the record using the set database metrics.

Maarten van der Hoeven

unread,
Jun 27, 2020, 4:40:09 AM6/27/20
to weewx-development
Hello Bastiaan,

The WLL is a wonderful piece of equipment. Now I can run production with WeeWX, and start a test-enviroment in a virtual machine, while talking to the same WLL.

I've installed your driver. I have running my ISS on ID 2 (and have an external temp sensor running on sensor 3).

When ISS set to ID=2, I only seems to see internal sensor data, like:

LOOP:   2020-06-27 10:37:51 CEST (1593247071) altimeter: 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247071, inDewpoint: 17.27777777777778, inHumidity: 55.1, inTemp: 27.055555555555557, maxSolarRad: None, pressure: 1008.5679853403257, rainRate: 0.0, usUnits: 17
{'data': {'broadcast_port': 22222, 'duration': 3600}, 'error': None}
LOOP:   2020-06-27 10:37:51 CEST (1593247071) dateTime: 1593247071, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:53 CEST (1593247073) dateTime: 1593247073, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:56 CEST (1593247076) dateTime: 1593247076, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:37:58 CEST (1593247078) dateTime: 1593247078, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:01 CEST (1593247081) dateTime: 1593247081, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:03 CEST (1593247083) dateTime: 1593247083, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:06 CEST (1593247086) dateTime: 1593247086, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:06 CEST (1593247086) altimeter: 1008.6925672055719, barometer: 1009.04207968256, dateTime: 1593247086, inDewpoint: 17.27777777777778, inHumidity: 55.1, inTemp: 27.055555555555557, maxSolarRad: None, pressure: 1008.6018492219138, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:08 CEST (1593247088) dateTime: 1593247088, maxSolarRad: None, rainRate: 0.0, usUnits: 17



When set ISS to ID=1, I see the same

LOOP:   2020-06-27 10:38:56 CEST (1593247136) altimeter: 1008.7264350305117, barometer: 1009.075943564148, dateTime: 1593247136, inDewpoint: 17.22222222222222, inHumidity: 54.9, inTemp: 27.055555555555557, maxSolarRad: None, pressure: 1008.635713103502, rainRate: 0.0, usUnits: 17
{'data': {'broadcast_port': 22222, 'duration': 3600}, 'error': None}
LOOP:   2020-06-27 10:38:56 CEST (1593247136) dateTime: 1593247136, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:38:58 CEST (1593247138) dateTime: 1593247138, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:01 CEST (1593247141) dateTime: 1593247141, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:03 CEST (1593247143) dateTime: 1593247143, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:06 CEST (1593247146) dateTime: 1593247146, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:08 CEST (1593247148) dateTime: 1593247148, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:11 CEST (1593247151) dateTime: 1593247151, maxSolarRad: None, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:11 CEST (1593247151) altimeter: 1008.6586993806619, barometer: 1009.0082158009718, dateTime: 1593247151, inDewpoint: 17.27777777777778, inHumidity: 55.1, inTemp: 27.055555555555557, maxSolarRad: None, pressure: 1008.5679853403257, rainRate: 0.0, usUnits: 17
LOOP:   2020-06-27 10:39:13 CEST (1593247153) dateTime: 1593247153, maxSolarRad: None, rainRate: 0.0, usUnits: 17

Op zaterdag 27 juni 2020 om 10:17:55 UTC+2 schreef Bastiaan Meelberg:

Maarten van der Hoeven

unread,
Jun 27, 2020, 4:46:45 AM6/27/20
to weewx-development
@Bastiaan, when I change this piece of code (txid=2), it is retrieving live data from ISS:

def DecodeDataWLL(self, data):
            timestamp = data['ts']
            packet = {'dateTime': timestamp, 'usUnits': weewx.US}

            for condition in data['conditions']:
                  if condition["data_structure_type"] == 1 and condition['txid'] == 2:

Op zaterdag 27 juni 2020 om 10:40:09 UTC+2 schreef Maarten van der Hoeven:

Bastiaan Meelberg

unread,
Jun 27, 2020, 4:49:36 AM6/27/20
to weewx-development
Hello Maarten,

Glad you like my driver. I had similar problems, my ISS is on 1 and a wind unit on 4. WLL will produce more ‘conditions’ in the JSON with the same data_structure_type. So simply looking for a structure_type is not sufficient. for example here is my current_condition:

{
  "data": {
    "did": "001D0A7104C8",
    "ts": 1593247405,
    "conditions": [
      {
        "lsid": 242741,
        "data_structure_type": 1,
        "txid": 1,
        "temp": 73.6,
        "hum": 81.3,
        "dew_point": 67.5,
        "wet_bulb": 69.1,
        "heat_index": 75.6,
        "wind_chill": 73.6,
        "thw_index": 75.6,
        "thsw_index": 85,
        "wind_speed_last": 2,
        "wind_dir_last": 198,
        "wind_speed_avg_last_1_min": 2.37,
        "wind_dir_scalar_avg_last_1_min": 174,
        "wind_speed_avg_last_2_min": 2.37,
        "wind_dir_scalar_avg_last_2_min": 170,
        "wind_speed_hi_last_2_min": 4,
        "wind_dir_at_hi_speed_last_2_min": 110,
        "wind_speed_avg_last_10_min": 1.68,
        "wind_dir_scalar_avg_last_10_min": 187,
        "wind_speed_hi_last_10_min": 5,
        "wind_dir_at_hi_speed_last_10_min": 190,
        "rain_size": 2,
        "rain_rate_last": 0,
        "rain_rate_hi": 0,
        "rainfall_last_15_min": 0,
        "rain_rate_hi_last_15_min": 0,
        "rainfall_last_60_min": 0,
        "rainfall_last_24_hr": 25,
        "rain_storm": 25,
        "rain_storm_start_at": 1593206161,
        "solar_rad": 496,
        "uv_index": 3.4,
        "rx_state": 0,
        "trans_battery_flag": 0,
        "rainfall_daily": 20,
        "rainfall_monthly": 325,
        "rainfall_year": 1694,
        "rain_storm_last": 46,
        "rain_storm_last_start_at": 1592308741,
        "rain_storm_last_end_at": 1592553661
      },
      {
        "lsid": 242760,
        "data_structure_type": 1,
        "txid": 4,
        "temp": null,
        "hum": null,
        "dew_point": null,
        "wet_bulb": null,
        "heat_index": null,
        "wind_chill": null,
        "thw_index": null,
        "thsw_index": null,
        "wind_speed_last": 2,
        "wind_dir_last": 198,
        "wind_speed_avg_last_1_min": 2.37,
        "wind_dir_scalar_avg_last_1_min": 174,
        "wind_speed_avg_last_2_min": 2.37,
        "wind_dir_scalar_avg_last_2_min": 170,
        "wind_speed_hi_last_2_min": 4,
        "wind_dir_at_hi_speed_last_2_min": 110,
        "wind_speed_avg_last_10_min": 1.68,
        "wind_dir_scalar_avg_last_10_min": 187,
        "wind_speed_hi_last_10_min": 5,
        "wind_dir_at_hi_speed_last_10_min": 190,
        "rain_size": 1,
        "rain_rate_last": 0,
        "rain_rate_hi": 0,
        "rainfall_last_15_min": 0,
        "rain_rate_hi_last_15_min": 0,
        "rainfall_last_60_min": 0,
        "rainfall_last_24_hr": 0,
        "rain_storm": null,
        "rain_storm_start_at": null,
        "solar_rad": null,
        "uv_index": null,
        "rx_state": 0,
        "trans_battery_flag": 0,
        "rainfall_daily": 0,
        "rainfall_monthly": 0,
        "rainfall_year": 0,
        "rain_storm_last": null,
        "rain_storm_last_start_at": null,
        "rain_storm_last_end_at": null
      },
      {
        "lsid": 242740,
        "data_structure_type": 4,
        "temp_in": 76.7,
        "hum_in": 55.3,
        "dew_point_in": 59.5,
        "heat_index_in": 77.2
      },
      {
        "lsid": 242739,
        "data_structure_type": 3,
        "bar_sea_level": 29.809,
        "bar_trend": -0.007,
        "bar_absolute": 29.707
      }
    ]
  },
  "error": null
}


A fully customisable tx_id configurator is on my to_do list. Can you post you're current_condtition JSON, so I can have a look.  

Bastiaan Meelberg

unread,
Jun 27, 2020, 4:52:13 AM6/27/20
to weewx-development
Yes! That will do the trick for now.

Keep in mind that the rain count in the current repo is Wrong! I will post an updated one soon.

flor...@pre-vost.fr

unread,
Jun 27, 2020, 4:53:21 AM6/27/20
to weewx-development
Hi,

Baastian, yes of course, I think it a good idea to make a request using weewx object to read the daily rain to the database and make a comparison with the rainfall daily by the WLL but I need the help of @Tom Keffer for this.

For UnitUS, I know that if it possible but for readability, I decided to make a conversion before yield the packet to the genlooppackets(). Also, when i need to add record manual by using the method addRecords, I need to put on the packet the right unit set in weewx.conf. If you've another suggest, let me know :) 

Maarten, I will fix this issue in few days, I know how can I do this by search any key in each sensor :) 

-fp

Message has been deleted
Message has been deleted

flor...@pre-vost.fr

unread,
Jun 28, 2020, 6:13:08 AM6/28/20
to weewx-development
Hi Maarten,

To help Bastiaan and me to WLL Driver, can you share the answer of your request of http://1.2.3.4/v1/current_conditions (change 1.2.3.4 by your internal IP) ?
You've another sensor with other ID and it will be helpfull to have this data to implement it on driver,

Thank you ! 

Maarten van der Hoeven

unread,
Jun 28, 2020, 6:15:37 AM6/28/20
to weewx-development
Sure!

{"data":{"did":"001D0A71154A","ts":1593339301,"conditions":[{"lsid":321275,"data_structure_type":1,"txid":2,"temp": 67.6,"hum":59.0,"dew_point": 52.8,"wet_bulb": 57.3,"heat_index": 67.3,"wind_chill": 64.1,"thw_index": 63.8,"thsw_index": 71.5,"wind_speed_last":11.00,"wind_dir_last":203,"wind_speed_avg_last_1_min":11.56,"wind_dir_scalar_avg_last_1_min":215,"wind_speed_avg_last_2_min":11.81,"wind_dir_scalar_avg_last_2_min":217,"wind_speed_hi_last_2_min":18.00,"wind_dir_at_hi_speed_last_2_min":225,"wind_speed_avg_last_10_min":12.75,"wind_dir_scalar_avg_last_10_min":219,"wind_speed_hi_last_10_min":20.00,"wind_dir_at_hi_speed_last_10_min":225,"rain_size":2,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":20,"rain_storm":24,"rain_storm_start_at":1593210300,"solar_rad":207,"uv_index":2.1,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":175,"rainfall_year":175,"rain_storm_last":6,"rain_storm_last_start_at":1592760421,"rain_storm_last_end_at":1592866861},{"lsid":321279,"data_structure_type":1,"txid":3,"temp": 72.0,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":321271,"data_structure_type":4,"temp_in": 76.4,"hum_in":47.0,"dew_point_in": 54.7,"heat_index_in": 76.1},{"lsid":321270,"data_structure_type":3,"bar_sea_level":29.889,"bar_trend": 0.031,"bar_absolute":29.876}]},"error":null}

ISS on ID=2, extra temp sensor on ID=3



Op zondag 28 juni 2020 12:13:08 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jun 30, 2020, 2:11:10 AM6/30/20
to weewx-development
Thank you ! 

I fix the issue for extra sensor when you request directly on your wll module.

Can you share right now the answer of API v2 of Weatherlink.com like this :  https://weatherlink.github.io/v2-api/authentication#walkthrough-examples 

It help me full because I think that the structure is not the same that the wll module :)  

-fp

Maarten van der Hoeven

unread,
Jun 30, 2020, 3:20:16 AM6/30/20
to weewx-development
I'd love to do that, need littile help.

How do I retrieve my station_id? I can use the V2 api tho retrieve it, but I need a api-signature to get that information. And to calculate the api-signuature, I need my station-id.

Chicken and egg

This is the string (example) to calculate the api-signature (SHA256). You see there's the station-id in it, which I do not know.

api-key987654321station-id1052t1558729481

Op dinsdag 30 juni 2020 om 08:11:10 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jun 30, 2020, 3:33:37 AM6/30/20
to weewx-development
Current:

{"data":{"did":"001D0A71154A","ts":1593501864,"conditions":[{"lsid":325304,"data_structure_type":1,"txid":2,"temp": 58.1,"hum":82.8,"dew_point": 52.9,"wet_bulb": 54.8,"heat_index": 58.1,"wind_chill": 54.8,"thw_index": 54.8,"thsw_index": 55.2,"wind_speed_last":6.00,"wind_dir_last":215,"wind_speed_avg_last_1_min":6.37,"wind_dir_scalar_avg_last_1_min":218,"wind_speed_avg_last_2_min":7.50,"wind_dir_scalar_avg_last_2_min":219,"wind_speed_hi_last_2_min":14.00,"wind_dir_at_hi_speed_last_2_min":167,"wind_speed_avg_last_10_min":9.87,"wind_dir_scalar_avg_last_10_min":220,"wind_speed_hi_last_10_min":20.00,"wind_dir_at_hi_speed_last_10_min":234,"rain_size":2,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":95,"uv_index":0.0,"rx_state":1,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":325305,"data_structure_type":1,"txid":3,"temp": 58.7,"hum":null,"dew_point":null,"wet_bulb":null,"heat_index":null,"wind_chill":null,"thw_index":null,"thsw_index":null,"wind_speed_last":null,"wind_dir_last":null,"wind_speed_avg_last_1_min":null,"wind_dir_scalar_avg_last_1_min":null,"wind_speed_avg_last_2_min":null,"wind_dir_scalar_avg_last_2_min":null,"wind_speed_hi_last_2_min":null,"wind_dir_at_hi_speed_last_2_min":null,"wind_speed_avg_last_10_min":null,"wind_dir_scalar_avg_last_10_min":null,"wind_speed_hi_last_10_min":null,"wind_dir_at_hi_speed_last_10_min":null,"rain_size":1,"rain_rate_last":0,"rain_rate_hi":0,"rainfall_last_15_min":0,"rain_rate_hi_last_15_min":0,"rainfall_last_60_min":0,"rainfall_last_24_hr":0,"rain_storm":null,"rain_storm_start_at":null,"solar_rad":null,"uv_index":null,"rx_state":0,"trans_battery_flag":0,"rainfall_daily":0,"rainfall_monthly":0,"rainfall_year":0,"rain_storm_last":null,"rain_storm_last_start_at":null,"rain_storm_last_end_at":null},{"lsid":325296,"data_structure_type":4,"temp_in": 68.3,"hum_in":54.3,"dew_point_in": 51.2,"heat_index_in": 67.6},{"lsid":325295,"data_structure_type":3,"bar_sea_level":29.769,"bar_trend": 0.018,"bar_absolute":29.757}]},"error":null}



Op dinsdag 30 juni 2020 om 09:20:16 UTC+2 schreef Maarten van der Hoeven:

Florentin Prevost

unread,
Jun 30, 2020, 3:40:09 AM6/30/20
to weewx-development
Thank you !
Can you do it with archive on weatherlink.

Start my driver on Github and take the url on syslog of API v2 when the driver search lost data and put it on your favorite Web browser and share me the result.

Maarten van der Hoeven

unread,
Jun 30, 2020, 3:57:36 AM6/30/20
to weewx-development
Done. This is the URL I grabbed from syslog:

JSON-result is:
{}


Error in the syslog (sensors):
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG user.WLLDriver: Request archive from 1593502980 to 1593503400
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG user.WLLDriver: URL API Weatherlink is https://api.weatherlink.com/v2/historic/22514?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593503708&start-timestamp=1593502800&end-timestamp=1593503400&api-signature=100545991c40d123e4d4a29724a24176fa33407e585be3b211f91b1fa2589c38
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG urllib3.connectionpool: Starting new HTTPS connection (1): api.weatherlink.com:443
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG urllib3.connectionpool: https://api.weatherlink.com:443 "GET /v2/historic/22514?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593503708&start-timestamp=1593502800&end-timestamp=1593503400&api-signature=100545991c40d123e4d4a29724a24176fa33407e585be3b211f91b1fa2589c38 HTTP/1.1" 200 2
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG user.WLLDriver: OK Wl 1
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG user.WLLDriver: OK Wl 2
Jun 30 09:55:08 ubuntu weewx[6232] DEBUG user.WLLDriver: StartTimeStamp is : 1593503100
Jun 30 09:55:08 ubuntu weewx[6232] INFO user.WLLDriver: Failure to get data https://api.weatherlink.com/v2/historic/22514?api-key=nivwsekqwfbkhqtqwo8nximhl7zgxpcs&t=1593503708&start-timestamp=1593502800&end-timestamp=1593503400&api-signature=100545991c40d123e4d4a29724a24176fa33407e585be3b211f91b1fa2589c38 - try 3 - ('sensors')


Op dinsdag 30 juni 2020 om 09:40:09 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jun 30, 2020, 4:07:39 AM6/30/20
to weewx-development
No data available. Please stop weewx and wait more thant 10min before restart

Maarten van der Hoeven

unread,
Jun 30, 2020, 4:47:59 AM6/30/20
to weewx-development
I've stopped WeeWX for 30 minutes, and restarted. Same response: {}

I checked the Weatherlink website: data is archived every 5 minutes. Running a Pro-subscription



Op dinsdag 30 juni 2020 om 10:07:39 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jun 30, 2020, 4:54:23 AM6/30/20
to weewx-development
Latest data in the database:

mysql> select from_unixtime(datetime),datetime from archive;
+-------------------------+------------+
| from_unixtime(datetime) | datetime   |
+-------------------------+------------+
| 2020-06-30 10:25:00     | 1593505500 |
| 2020-06-30 10:26:00     | 1593505560 |
| 2020-06-30 10:27:00     | 1593505620 |
+-------------------------+------------+
3 rows in set (0.00 sec)


Started weewx again at 10:54. samen response: {}

URL:

Op dinsdag 30 juni 2020 om 10:47:59 UTC+2 schreef Maarten van der Hoeven:

flor...@pre-vost.fr

unread,
Jun 30, 2020, 5:25:10 AM6/30/20
to weewx-development
Can you provid me your config of my driver in weewx.conf please ?

Thank you,

Maarten van der Hoeven

unread,
Jun 30, 2020, 5:25:11 AM6/30/20
to weewx-development
Found the problem. Turned out my device ID was not correct.


JSON output of historic, see attachment





Op dinsdag 30 juni 2020 om 10:54:23 UTC+2 schreef Maarten van der Hoeven:
json_historic.txt

Maarten van der Hoeven

unread,
Jun 30, 2020, 5:28:15 AM6/30/20
to weewx-development
[WLLDriver]
    driver = user.WLLDriver
    max_tries = 5
    retry_wait = 10
    poll_interval = 5
    url = http://192.168.2.33:80/v1/current_conditions
    wl_apikey = nivwsekqwfbkhqtqwo8nximhl7zgxpcs
    wl_apisecret = [thats a secret]
    wl_stationid = 92818 (this one is the correct one!)
    wl_archive_interval = 5


Op dinsdag 30 juni 2020 om 11:25:10 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jun 30, 2020, 5:39:53 AM6/30/20
to weewx-development
Thank's a lot ! 

Seem to be the same structure that the Wll module, just ajust somethings like data_structure_type and code will be adapted to extra sensor and deported sensor

Keep an eyes to this thread, I will update code soon :) 

Maarten van der Hoeven

unread,
Jun 30, 2020, 9:31:15 AM6/30/20
to weewx-development
Thx, cant wait :)

Meanwhile, I am importing all history data from my weatherstation into the new Weatherlink-account (created when I started to use WLL). Data range starting from August 2012. A lot of data to use for testing :)

Op dinsdag 30 juni 2020 om 11:39:53 UTC+2 schreef flor...@pre-vost.fr:

Bastiaan Meelberg

unread,
Jun 30, 2020, 1:05:43 PM6/30/20
to weewx-development
Ik like the idea of getting missing data from Weatherlink to weewx. But isn't it better to make it a separate program (say like a 'reverse' wunderfixer)? 
This way the driver is the most clean, getting and filling de database with old data can be very time consuming and slow the current collection down.



On Sunday, June 21, 2020 at 7:18:41 PM UTC+2, Florentin Prevost wrote:
Hi,

I worked with the fork of https://github.com/vinceskahan/weewx-weatherlinklive-json and I would like to ask some questions about driver developpment. 

- How can I passed argument of weewx.conf to my driver ? I work to request lost data from Weewx on Weatherlink.com because WeatherLink Live don't have API to take archive directly and I would like to passed some arguments like archive_interval, sql password & etc 
- How work genArchiveRecords when it call? It run as each report ? Or it is a loop that waiting to have return values ?


Thank you for your answer and support. 

Maarten van der Hoeven

unread,
Jun 30, 2020, 4:10:05 PM6/30/20
to weewx-development
Yes, I like the idea. A seperate program that pulls data from Weatherlink and stores the data in sqlite or mysql (whatever is configured in weewx.conf). And let weewx do the aggreate and daily summaries

Op dinsdag 30 juni 2020 19:05:43 UTC+2 schreef Bastiaan Meelberg:

flor...@pre-vost.fr

unread,
Jun 30, 2020, 6:03:03 PM6/30/20
to weewx-development
Hi,

Yes is on the way, I finished to implement lost data as a service on Weewx 

Also, added extra sensor will come. I check just if it's not fail when check a key in json that not exist.

I will implement also the udp for real time like MQTT with the berlchertown skin, is more stable thant request by /current_conditions but it's sames values and json format.  

Maarten van der Hoeven

unread,
Jul 4, 2020, 5:54:49 AM7/4/20
to weewx-development
Hi, not sure it the driver is ready to go. But I saw a commit on github 12 hours ago, so I thought, lets give it a try :)

weewx.conf:
[WLLDriver]
    driver = user.WLLDriver
    max_tries = 5
    retry_wait = 5
    poll_interval = 5
    udp_enable = 1
    hostname = 192.168.2.33
    wl_apikey = nivwsekqwfbkhqtqwo8nximhl7zgxpcs
    wl_apisecret = [not telling you, it's a secret :)]
    wl_stationid = 92844
    time_out = 10
    device_id = 2



syslog:
Jul  4 11:51:21 ubuntu weewx[14191] INFO weewx.engine: Loading station type WLLDriver (user.WLLDriver)
Jul  4 11:51:21 ubuntu weewx[14191] ERROR weewx.engine: Import of driver failed: not enough values to unpack (expected 2, got 1) (<class 'ValueError'>)
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****  Traceback (most recent call last):
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/weewx/engine.py", line 103, in setupStation
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****      self.console = loader_function(config_dict, self)
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/user/WLLDriver.py", line 58, in loader
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****      return WLLDriver(**config_dict[DRIVER_NAME], **config_dict)
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/user/WLLDriver.py", line 93, in __init__
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****      self.dict_device_id = dict((int(k), v) for k, v in (e.split(':') for e in device_id.split('-')))
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****    File "/usr/share/weewx/user/WLLDriver.py", line 93, in <genexpr>
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****      self.dict_device_id = dict((int(k), v) for k, v in (e.split(':') for e in device_id.split('-')))
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL weewx.engine:     ****  ValueError: not enough values to unpack (expected 2, got 1)
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL __main__: Unable to load driver: not enough values to unpack (expected 2, got 1)
Jul  4 11:51:21 ubuntu weewx[14191] CRITICAL __main__:     ****  Exiting...


Op woensdag 1 juli 2020 om 00:03:03 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jul 4, 2020, 6:35:04 AM7/4/20
to weewx-development
Hi,

Like in Readme on Github, you've to set device id like this 1:iss. Or if you have iss on id 2, set this : 2:iss.

I make this to implement extra sensor in future.

Maarten van der Hoeven

unread,
Jul 4, 2020, 7:28:16 AM7/4/20
to weewx-development
Yes, apologies. Working now. I had the 'old'  config of WLL still in place. Did only change WLLArchive according to the readme...

It is getting archive records, will test it today!


Op zaterdag 4 juli 2020 om 12:35:04 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jul 4, 2020, 7:44:15 AM7/4/20
to weewx-development
Some findings

I cannot stop the weewx process by ' /etc/init.d/weewx stop', it keeps running for several minutes (and keeps on going). I need to find the process ID, and kill it by

root@ubuntu:/etc/weewx# ps -ef | grep weewx
root       17394       1 17 13:27 ?        00:01:59 python3 /usr/share/weewx/weewxd --daemon --pidfile=/var/run/weewx.pid /etc/weewx/weewx.conf
root       17899       1  0 13:37 ?        00:00:00 /bin/sh /etc/init.d/weewx stop
root       18084   13623  0 13:38 pts/0    00:00:00 grep --color=auto weewx
root@ubuntu:/etc/weewx# kill -9 17394


Question: why do you have the WLLArchive placed into StdReport-services? And not in StdArchive-service? Reading the Weewx-architecture (see http://www.weewx.com/docs/customizing.htm#The_WeeWX_service_architecture), it should have its place as an archive_service, dont you agree? Quote: "weewx.engine.StdArchive Archive any new data to the SQL databases."

[Engine]
    [[Services]]
        # This section specifies the services that should be run. They are
        # grouped by type, and the order of services within each group
        # determines the order in which the services will be run.
        prep_services = weewx.engine.StdTimeSynch
        data_services = ,
        process_services = weewx.engine.StdConvert, weewx.engine.StdCalibrate, weewx.engine.StdQC, weewx.wxservices.StdWXCalculate, user.calcdrought.CalcDrought
        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, user.WLLArchive.WLLArchive



Op zaterdag 4 juli 2020 13:28:16 UTC+2 schreef Maarten van der Hoeven:

Maarten van der Hoeven

unread,
Jul 4, 2020, 8:06:43 AM7/4/20
to weewx-development
Windspeed/windgust (UDP) seems not okay. radiation, uv, et, extratemp are NULL (but I think thats because you still need to implement that, right)?

With WLLDriver, I got:
mysql> select datetime,from_unixtime(datetime),outtemp,windspeed,windgust,radiation,uv,et,rain,extratemp1 from archive order by datetime desc limit 5;
+------------+-------------------------+---------+--------------------+----------+-----------+------+------+------+------------+
| datetime   | from_unixtime(datetime) | outtemp | windspeed          | windgust | radiation | uv   | et   | rain | extratemp1 |
+------------+-------------------------+---------+--------------------+----------+-----------+------+------+------+------------+
| 1593864000 | 2020-07-04 14:00:00     |    16.5 | 5.6156250000000005 |       16 |      NULL | NULL | NULL |    0 |       NULL |
| 1593863940 | 2020-07-04 13:59:00     |    16.5 |             6.9475 |       16 |      NULL | NULL | NULL |    0 |       NULL |
| 1593863880 | 2020-07-04 13:58:00     |    16.5 |          6.0440625 |       16 |      NULL | NULL | NULL |    0 |       NULL |
| 1593863820 | 2020-07-04 13:57:00     |    16.5 |  7.158125000000002 |       17 |      NULL | NULL | NULL |    0 |       NULL |
| 1593863760 | 2020-07-04 13:56:00     |    16.5 |  5.956874999999999 |       17 |      NULL | NULL | NULL |    0 |       NULL |
+------------+-------------------------+---------+--------------------+----------+-----------+------+------+------+------------+
5 rows in set (0.00 sec)




In my other virtual machine (hooked with a WeatherLink IP, my production environment), I got for the same datetime.
mysql> select datetime,from_unixtime(datetime),outtemp,windspeed,windgust,radiation,uv,et,rain,extratemp1 from weewx.archive order by datetime desc limit 5;
+------------+-------------------------+--------------------+-----------+----------+-----------+------+--------+------+--------------------+
| datetime   | from_unixtime(datetime) | outtemp            | windspeed | windgust | radiation | uv   | et     | rain | extratemp1         |
+------------+-------------------------+--------------------+-----------+----------+-----------+------+--------+------+--------------------+
| 1593864000 | 2020-07-04 14:00:00     | 16.555555555555557 |    4.4704 |  5.81152 |       123 |  1.1 | 0.0762 |    0 | 16.666666666666668 |
| 1593863940 | 2020-07-04 13:59:00     | 16.555555555555557 |   5.36448 |   6.7056 |       138 |  1.1 |      0 |    0 | 16.666666666666668 |
| 1593863880 | 2020-07-04 13:58:00     | 16.555555555555557 |    4.4704 |  7.15264 |       127 |    1 |      0 |    0 | 16.666666666666668 |
| 1593863820 | 2020-07-04 13:57:00     | 16.555555555555557 |   5.36448 |  7.15264 |       116 |  0.9 |      0 |    0 | 16.666666666666668 |
| 1593863760 | 2020-07-04 13:56:00     | 16.555555555555557 |    4.4704 |  6.25856 |       107 |  0.9 |      0 |    0 | 16.666666666666668 |
+------------+-------------------------+--------------------+-----------+----------+-----------+------+--------+------+--------------------+
5 rows in set (0.01 sec)




I've got my wanted units set in weewx.conf:
        [[[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_altitude = meter    # Options are 'foot' or 'meter'
                group_degree_day = degree_C_day    # Options are 'degree_F_day' or 'degree_C_day'
                group_distance = km    # Options are 'mile' or 'km'
                group_pressure = mbar    # Options are 'inHg', 'mmHg', 'mbar', or 'hPa'
                group_rain = mm    # Options are 'inch', 'cm', or 'mm'
                group_rainrate = mm_per_hour    # Options are 'inch_per_hour', 'cm_per_hour', or 'mm_per_hour'
                group_speed = meter_per_second    # Options are 'mile_per_hour', 'km_per_hour', 'knot', or 'meter_per_second'
                group_speed2 = meter_per_second2    # Options are 'mile_per_hour2', 'km_per_hour2', 'knot2', or 'meter_per_second2'
                group_temperature = degree_C    # Options are 'degree_F' or 'degree_C'





Op zaterdag 4 juli 2020 13:44:15 UTC+2 schreef Maarten van der Hoeven:

Florentin Prevost

unread,
Jul 4, 2020, 8:23:19 AM7/4/20
to weewx-development
Thank you for you report !

Yes, I also the same problem. Maybe the driver not check if Weew raise a stop service.

For StdArchive, you've totaly reason. I will implement it this week end. But, I don't know if it possible to yield packet in service and not use a _addrecord function that not implement the StdConvert. Now I need to calculate each value from the Weewx database unit. If you have info for this ^^

Florentin Prevost

unread,
Jul 4, 2020, 8:24:08 AM7/4/20
to weewx-development
On /syslog, can you share the log when the driver received udp data and when it request from /current_conditions.

Thank you :)

Maarten van der Hoeven

unread,
Jul 4, 2020, 8:30:30 AM7/4/20
to weewx-development
I think this one is the UDP packet:
Jul  4 14:25:44 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593865543, 'usUnits': 17, 'windSpeed': 3.58, 'windDir': 219, 'windGust': 10.28, 'windGustDir': 228, 'rain': 0.0, 'rainRate': 0.0}:

JSON-output of current, find attached






Op zaterdag 4 juli 2020 om 14:24:08 UTC+2 schreef flor...@pre-vost.fr:
current_conditions.json

Florentin Prevost

unread,
Jul 4, 2020, 9:40:52 AM7/4/20
to weewx-development
Hm it's strange because you show that the packet including value for Wind and Rain....

On syslog, can you share packet where all sensor are display.

Thank you

Maarten van der Hoeven

unread,
Jul 4, 2020, 11:41:33 AM7/4/20
to weewx-development
Jul  4 17:39:37 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593877175, 'usUnits': 17, 'windSpeed': 5.36, 'windDir': 210, 'windGust': 8.05, 'windGustDir': 211, 'rain': 0.0, 'rainRate': 0.0}:
Jul  4 17:39:37 ubuntu weewx[20924] INFO weewx.restx: MQTT: Published record 2020-07-04 17:39:35 CEST (1593877175)
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Set Previous period rain to: 0
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593877178, 'usUnits': 17, 'windSpeed': 4.47, 'windDir': 217, 'windGust': 8.05, 'windGustDir': 211, 'rain': 0.0, 'rainRate': 0.0}:
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul  4 17:39:40 ubuntu weewx[20924] INFO weewx.restx: MQTT: Published record 2020-07-04 17:39:38 CEST (1593877178)
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Set Previous period rain to: 0
Jul  4 17:39:40 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593877178, 'usUnits': 17, 'outTemp': 17.33, 'outHumidity': 93.3, 'dewpoint': 16.22, 'heatindex': 18.06, 'windchill': 15.72, 'windSpeed': 10.0, 'windDir': 217, 'windGust': 14.0, 'windGustDir': 213, 'barometer': 1012.67, 'pressure': 1012.26, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 22.61, 'inHumidity': 63.2, 'inDewpoint': 15.28}:
Jul  4 17:39:40 ubuntu weewx[20924] INFO weewx.restx: MQTT: Published record 2020-07-04 17:39:38 CEST (1593877178)
Jul  4 17:39:42 ubuntu weewx[20924] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  4 17:39:42 ubuntu weewx[20924] DEBUG user.WLLDriver: Set Previous period rain to: 0
Jul  4 17:39:42 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593877180, 'usUnits': 17, 'windSpeed': 4.47, 'windDir': 204, 'windGust': 8.05, 'windGustDir': 211, 'rain': 0.0, 'rainRate': 0.0}:
Jul  4 17:39:42 ubuntu weewx[20924] INFO weewx.restx: MQTT: Published record 2020-07-04 17:39:40 CEST (1593877180)
Jul  4 17:39:45 ubuntu weewx[20924] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  4 17:39:45 ubuntu weewx[20924] DEBUG user.WLLDriver: Set Previous period rain to: 0
Jul  4 17:39:45 ubuntu weewx[20924] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593877183, 'usUnits': 17, 'windSpeed': 3.58, 'windDir': 214, 'windGust': 8.05, 'windGustDir': 211, 'rain': 0.0, 'rainRate': 0.0}:
Jul  4 17:39:45 ubuntu weewx[20924] INFO weewx.restx: MQTT: Published record 2020-07-04 17:39:43 CEST (1593877183)

MySQL-output latest 5 records
mysql> select datetime,from_unixtime(datetime),outtemp,windspeed,windgust,radiation,uv,et,rain,extratemp1 from archive order by datetime desc limit 5;
+------------+-------------------------+-------------------+-------------------+----------+-----------+------+------+------+------------+

| datetime   | from_unixtime(datetime) | outtemp           | windspeed         | windgust | radiation | uv   | et   | rain | extratemp1 |
+------------+-------------------------+-------------------+-------------------+----------+-----------+------+------+------+------------+
| 1593877200 | 2020-07-04 17:40:00     |             17.33 | 5.195454545454546 |       14 |      NULL | NULL | NULL |    0 |       NULL |
| 1593877140 | 2020-07-04 17:39:00     | 17.30857142857143 | 4.514193548387096 |       15 |      NULL | NULL | NULL |    0 |       NULL |
| 1593877080 | 2020-07-04 17:38:00     |             17.33 | 6.058125000000001 |       15 |      NULL | NULL | NULL |    0 |       NULL |
| 1593877020 | 2020-07-04 17:37:00     |             17.33 |         6.1765625 |       17 |      NULL | NULL | NULL |    0 |       NULL |
| 1593876960 | 2020-07-04 17:36:00     |             17.33 |         6.4096875 |       18 |      NULL | NULL | NULL |    0 |       NULL |
+------------+-------------------------+-------------------+-------------------+----------+-----------+------+------+------+------------+

5 rows in set (0.00 sec)



Op zaterdag 4 juli 2020 om 15:40:52 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jul 4, 2020, 12:09:42 PM7/4/20
to weewx-development
Thank you ! 

I'm very stupid ahah, this is an error that I put on code ! I push to my git a fix to windSpeed and windGust. 

For others sensors, I make this change this we. 

Maarten van der Hoeven

unread,
Jul 4, 2020, 7:17:44 PM7/4/20
to weewx-development
Updated the driver, thanks for that. Windspeed/-gust is much better now. However, I see some differences in the windgust, when it is within a UDP-packet and when it's within a current-condition-packet. Some piece of syslog, where I highlighted the difference in values. For what I understand, windgust is the max speed that occured in the last 2 minutes. So I expect it to be the same when it's getting reported by UDP and current-conditions, at least within a timespan of two minutes...

Jul  5 01:10:23 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904223, 'usUnits': 17, 'outTemp': 18.11, 'outHumidity': 97.0, 'dewpoint': 17.61, 'heatindex': 19.06, 'windchill': 17.17, 'windSpeed': 3.58, 'windDir': 229, 'windGust': 6.71, 'windGustDir': 224, 'barometer': 1009.89, 'pressure': 1009.49, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 21.5, 'inHumidity': 71.1, 'inDewpoint': 16.06}:
Jul  5 01:10:23 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:23 CEST (1593904223)
Jul  5 01:10:26 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:26 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:26 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904225, 'usUnits': 17, 'windSpeed': 4.02, 'windDir': 229, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:26 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:25 CEST (1593904225)
Jul  5 01:10:28 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:28 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:28 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904228, 'usUnits': 17, 'windSpeed': 5.36, 'windDir': 217, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:28 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:28 CEST (1593904228)
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904230, 'usUnits': 17, 'windSpeed': 5.81, 'windDir': 232, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul  5 01:10:31 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:30 CEST (1593904230)
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:31 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904230, 'usUnits': 17, 'outTemp': 18.11, 'outHumidity': 97.0, 'dewpoint': 17.61, 'heatindex': 19.06, 'windchill': 17.17, 'windSpeed': 5.81, 'windDir': 232, 'windGust': 6.71, 'windGustDir': 224, 'barometer': 1009.89, 'pressure': 1009.49, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 21.5, 'inHumidity': 71.1, 'inDewpoint': 16.06}:
Jul  5 01:10:31 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:30 CEST (1593904230)
Jul  5 01:10:33 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:33 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:33 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904233, 'usUnits': 17, 'windSpeed': 5.36, 'windDir': 225, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:33 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:33 CEST (1593904233)
Jul  5 01:10:36 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:36 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:36 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904235, 'usUnits': 17, 'windSpeed': 4.02, 'windDir': 225, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:36 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:35 CEST (1593904235)
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904238, 'usUnits': 17, 'windSpeed': 3.58, 'windDir': 227, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul  5 01:10:38 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:38 CEST (1593904238)
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:38 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904238, 'usUnits': 17, 'outTemp': 18.11, 'outHumidity': 96.9, 'dewpoint': 17.61, 'heatindex': 19.06, 'windchill': 17.17, 'windSpeed': 3.58, 'windDir': 227, 'windGust': 6.71, 'windGustDir': 224, 'barometer': 1009.89, 'pressure': 1009.49, 'rain': 0.0, 'rainRate': 0.0, 'inTemp': 21.5, 'inHumidity': 71.1, 'inDewpoint': 16.06}:
Jul  5 01:10:38 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:38 CEST (1593904238)
Jul  5 01:10:41 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:41 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:41 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904240, 'usUnits': 17, 'windSpeed': 3.58, 'windDir': 227, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:41 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:40 CEST (1593904240)
Jul  5 01:10:43 ubuntu weewx[4508] DEBUG user.WLLDriver: Rain this period: 0.0
Jul  5 01:10:43 ubuntu weewx[4508] DEBUG user.WLLDriver: Set Previous period rain to: 3
Jul  5 01:10:43 ubuntu weewx[4508] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1593904243, 'usUnits': 17, 'windSpeed': 3.58, 'windDir': 213, 'windGust': 7.15, 'windGustDir': 249, 'rain': 0.0, 'rainRate': 0.0}:
Jul  5 01:10:43 ubuntu weewx[4508] INFO weewx.restx: MQTT: Published record 2020-07-05 01:10:43 CEST (1593904243)


Op zaterdag 4 juli 2020 om 18:09:42 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jul 5, 2020, 6:06:24 AM7/5/20
to weewx-development
Hi,

Yes I see. I put speed 2min on current_conditions, and UDP packet, it's speed 10min.

I fix it. 
Thank's a lot. 

Maarten van der Hoeven

unread,
Jul 7, 2020, 6:10:45 AM7/7/20
to weewx-development
Did testing with WLLArchive.

WLLArchive is picking up archived records, just from the point where records are missing.Thats good. I've stopped weewx for two days (weewxtest in my case, not production), and Weatherlink.com is queried to get the missing records.

I see in mysql there's a mismatch in rounding, or perhaps typecasting between float and double. The first column (outtemp, windspeed) is from my production database (which I consider as correct, as this driver is live for several years now), the second column (outtemp, windspeed) is from my test-enviroment. Records shown are coming from WLLArchive. Maybe, not sure, this rounding-mismatched is cause by calculating temp (F->C) and windspeed (mph->m/s) within the driver itself (float? double?), instead of letting weewx doing the conversion. Whatever the case, I would prefer to skip the conversion withing the driver, and make use of the weewx-tooling thats available for unit-conversions. That makes is more stable, like, for example, I decided in the future to report my windspeed in km/h in stead of m/s. Now it's fixed in the driver to m/s, when using metricwx

mysql> select from_unixtime(weewx.archive.datetime),weewx.archive.outtemp,weewxtest.archive.outtemp,weewx.archive.windspeed,weewxtest.archive.windspeed from weewx.archive,weewxtest.archive where weewx.archive.datetime=weewxtest.archive.datetime and from_unixtime(weewx.archive.datetime) like '2020-07-07%' and weewxtest.archive.outtemp > -100 limit 10;
+---------------------------------------+--------------------+---------+-----------+-----------+
| from_unixtime(weewx.archive.datetime) | outtemp            | outtemp | windspeed | windspeed |
+---------------------------------------+--------------------+---------+-----------+-----------+
| 2020-07-07 00:00:00                   |  11.38888888888889 |   11.33 |   1.34112 |      1.39 |
| 2020-07-07 00:05:00                   |  11.38888888888889 |   11.33 |   1.34112 |       1.2 |
| 2020-07-07 00:10:00                   |  11.38888888888889 |   11.33 |   1.34112 |      1.53 |
| 2020-07-07 00:15:00                   | 11.333333333333334 |   11.28 |   1.34112 |      1.62 |
| 2020-07-07 00:20:00                   | 11.333333333333334 |   11.28 |   1.34112 |      1.26 |
| 2020-07-07 00:25:00                   | 11.277777777777777 |   11.22 |   0.89408 |      0.92 |
| 2020-07-07 00:30:00                   | 11.222222222222223 |   11.17 |   0.89408 |      1.09 |
| 2020-07-07 00:35:00                   | 11.166666666666666 |   11.11 |   1.34112 |      1.26 |
| 2020-07-07 00:40:00                   |  11.11111111111111 |   11.06 |   1.34112 |      1.23 |
| 2020-07-07 00:45:00                   |  11.11111111111111 |   11.06 |   1.34112 |      1.28 |
+---------------------------------------+--------------------+---------+-----------+-----------+
10 rows in set (0.88 sec)



Op zondag 5 juli 2020 12:06:24 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jul 7, 2020, 6:12:57 AM7/7/20
to weewx-development
Same goes when records come from WLLDriver, same mismatch in rounding/conversion

mysql> select from_unixtime(weewx.archive.datetime),weewx.archive.outtemp,weewxtest.archive.outtemp,weewx.archive.windspeed,weewxtest.archive.windspeed from weewx.archive,weewxtest.archive where weewx.archive.datetime=weewxtest.archive.datetime and from_unixtime(weewx.archive.datetime) like '2020-07-07 12%' and weewxtest.archive.outtemp > -100 limit 10;
+---------------------------------------+--------------------+--------------------+-----------+--------------------+

| from_unixtime(weewx.archive.datetime) | outtemp            | outtemp            | windspeed | windspeed          |
+---------------------------------------+--------------------+--------------------+-----------+--------------------+
| 2020-07-07 12:00:00                   |  16.77777777777778 |              16.72 |    4.4704 |  4.729354838709677 |
| 2020-07-07 12:01:00                   |  16.72222222222222 | 16.714444444444446 |   4.02336 |  4.171818181818182 |
| 2020-07-07 12:02:00                   |  16.72222222222222 |  16.69142857142857 |   4.02336 |  4.038064516129032 |
| 2020-07-07 12:03:00                   |  16.72222222222222 |              16.67 |    4.4704 |  4.577878787878787 |
| 2020-07-07 12:04:00                   |  16.72222222222222 |              16.67 |   3.57632 |  3.422812499999999 |
| 2020-07-07 12:05:00                   | 16.666666666666668 |             16.655 |   3.57632 | 3.7718749999999988 |
| 2020-07-07 12:06:00                   |  16.72222222222222 | 16.661428571428573 |   4.02336 |  3.648064516129032 |
| 2020-07-07 12:07:00                   |  16.77777777777778 |  16.69222222222222 |    4.4704 |  4.321515151515152 |
| 2020-07-07 12:08:00                   |  16.88888888888889 |            16.7975 |   4.02336 |           4.036875 |
| 2020-07-07 12:09:00                   |                 17 |               16.9 |   4.91744 |  4.638125000000001 |
+---------------------------------------+--------------------+--------------------+-----------+--------------------+
10 rows in set (1.92 sec)


Op dinsdag 7 juli 2020 12:10:45 UTC+2 schreef Maarten van der Hoeven:

Maarten van der Hoeven

unread,
Jul 7, 2020, 7:52:34 AM7/7/20
to weewx-development
Rain and rainrate goes askew. First column (rain, rainrate) coming from production (weewx with Weatherlink IP,  running for years), second column (rain,rainrate) coming from weewxtest (WLLArchive).

mysql> select from_unixtime(weewx.archive.datetime),weewx.archive.rain,weewxtest.archive.rain,weewx.archive.rainrate,weewxtest.archive.rainrate from weewx.archive,weewxtest.archive where weewx.archive.datetime=weewxtest.archive.datetime
and from_unixtime(weewx.archive.datetime) like '2020-07-06%' and weewx.archive.rainrate > 0 and weewxtest.archive.rainrate >= 0 limit 100;
+---------------------------------------+---------------+------+--------------------+----------+
| from_unixtime(weewx.archive.datetime) | rain          | rain | rainrate           | rainrate |
+---------------------------------------+---------------+------+--------------------+----------+
| 2020-07-06 09:25:00                   | 0.19999999878 |  0.6 | 5.7999999646200004 |       11 |
| 2020-07-06 09:30:00                   |             0 |    0 |       1.9999999878 |      5.6 |
| 2020-07-06 09:35:00                   |             0 |    0 |       0.9999999939 |        2 |
| 2020-07-06 09:40:00                   |             0 |    0 |      0.79999999512 |        1 |
| 2020-07-06 11:30:00                   | 0.19999999878 |  0.8 |      9.59999994144 |     12.4 |
| 2020-07-06 11:35:00                   |             0 |  0.6 |      5.19999996828 |     27.8 |
| 2020-07-06 11:40:00                   |             0 |    0 |      1.79999998902 |      5.2 |
| 2020-07-06 11:45:00                   |             0 |    0 |       0.9999999939 |      1.6 |
| 2020-07-06 11:50:00                   |             0 |    0 |      0.79999999512 |        1 |
| 2020-07-06 12:45:00                   |             0 |  0.4 |      4.79999997072 |      4.8 |
| 2020-07-06 12:50:00                   |             0 |    0 |      1.59999999024 |      4.8 |
| 2020-07-06 12:55:00                   |             0 |    0 |       0.9999999939 |      1.6 |
| 2020-07-06 13:30:00                   | 0.19999999878 |  0.8 |     24.39999985116 |     24.4 |
| 2020-07-06 13:35:00                   | 0.19999999878 |  2.8 |      16.9999998963 |      128 |
| 2020-07-06 13:40:00                   |             0 |  0.4 |       3.9999999756 |       16 |
| 2020-07-06 13:45:00                   |             0 |    0 |      1.39999999146 |      3.6 |
| 2020-07-06 13:50:00                   |             0 |    0 |       0.9999999939 |      1.4 |
| 2020-07-06 15:00:00                   | 0.19999999878 |  0.6 |     16.39999989996 |     16.4 |
| 2020-07-06 15:05:00                   |             0 |  0.6 | 3.3999999792600004 |     30.8 |
| 2020-07-06 15:10:00                   |             0 |    0 |      1.39999999146 |      3.2 |
| 2020-07-06 15:15:00                   |             0 |    0 |      0.79999999512 |      1.4 |
+---------------------------------------+---------------+------+--------------------+----------+
21 rows in set (0.86 sec)


Op dinsdag 7 juli 2020 om 12:12:57 UTC+2 schreef Maarten van der Hoeven:

flor...@pre-vost.fr

unread,
Jul 8, 2020, 6:52:19 AM7/8/20
to weewx-development
Hi,

Thank for your feadback.

I pushed the v0.2 in my github. You can install it by using wee_extension :  https://github.com/Drealine/WLLDriver/releases/tag/0.2

Maarten van der Hoeven

unread,
Jul 8, 2020, 9:57:34 AM7/8/20
to weewx-development
Okay, got v0.2 running now. My weewx.conf stanza shows (ISS on ID=2, extratemp1 on ID=3).
[WLLDriver]
    driver = user.WLLDriver
    max_tries = 5
    retry_wait = 5
    poll_interval = 5
    udp_enable = 1
    hostname = 192.168.2.33
    wl_apikey = nivwsekqwfbkhqtqwo8nximhl7zgxpcs
    wl_apisecret = *secret*
    wl_stationid = 92884
    time_out = 10
    device_id = 2:iss-3:extraTemp1


Output MySQL:
mysql> select datetime,from_unixtime(datetime),outtemp,windspeed,windgust,radiation,uv,et,rain,rainrate,extratemp1 from weewxtest.archive order by datetime des
c limit 5;
+------------+-------------------------+--------------------+-----------+----------+-----------+------+------+------+----------+------------+
| datetime   | from_unixtime(datetime) | outtemp            | windspeed | windgust | radiation | uv   | et   | rain | rainrate | extratemp1 |
+------------+-------------------------+--------------------+-----------+----------+-----------+------+------+------+----------+------------+
| 1594216440 | 2020-07-08 15:54:00     |  16.11111111111111 |      NULL |     NULL |      NULL | NULL | NULL |    0 |        0 |       NULL |
| 1594216380 | 2020-07-08 15:53:00     | 16.180555555555557 |      NULL |     NULL |      NULL | NULL | NULL |    0 |        0 |       NULL |
| 1594216320 | 2020-07-08 15:52:00     |  16.11111111111111 |      NULL |     NULL |      NULL | NULL | NULL |    0 |        0 |       NULL |
| 1594216260 | 2020-07-08 15:51:00     | 16.097222222222225 |      NULL |     NULL |      NULL | NULL | NULL |    0 |        0 |       NULL |
| 1594216200 | 2020-07-08 15:50:00     | 16.055555555555557 |      NULL |     NULL |      NULL | NULL | NULL |    0 |        0 |       NULL |
+------------+-------------------------+--------------------+-----------+----------+-----------+------+------+------+----------+------------+

5 rows in set (0.00 sec)


Console output (syslog):
Jul  8 15:49:31 ubuntu weewx[3696] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594216170, 'usUnits': 1, 'outTemp': 60.9, 'outHumidity': 94.4, 'dewpoint': 57.7, 'heatindex': 59.7, 'windchill': 59.3, 'windSpeed': None, 'windDir': None, 'windGust': None, 'windGustDir': None, 'barometer': 29.998, 'pressure': 29.986, 'inTemp': 70.4, 'inHumidity': 60.9, 'inDewpoint': 56.3}:
Jul  8 15:49:31 ubuntu weewx[3696] INFO weewx.restx: MQTT: Published record 2020-07-08 15:49:30 CEST (1594216170)
Jul  8 15:49:33 ubuntu weewx[3696] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul  8 15:49:33 ubuntu weewx[3696] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul  8 15:49:33 ubuntu weewx[3696] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594216173, 'usUnits': 1, 'windSpeed': None, 'windDir': None, 'windGust': None, 'windGustDir': None, 'rain': 0.0, 'rainRate': 0.0}:
Jul  8 15:49:33 ubuntu weewx[3696] INFO weewx.restx: MQTT: Published record 2020-07-08 15:49:33 CEST (1594216173)
Jul  8 15:49:36 ubuntu weewx[3696] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul  8 15:49:36 ubuntu weewx[3696] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul  8 15:49:36 ubuntu weewx[3696] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594216175, 'usUnits': 1, 'windSpeed': None, 'windDir': None, 'windGust': None, 'windGustDir': None, 'rain': 0.0, 'rainRate': 0.0}:

Findings:
Windspeed, windgust, UV, radiation, et, extratemp1 remain NULL

JSON output of current conditions attached



Op woensdag 8 juli 2020 om 12:52:19 UTC+2 schreef flor...@pre-vost.fr:
current_conditions.json

Maarten van der Hoeven

unread,
Jul 8, 2020, 1:15:41 PM7/8/20
to weewx-development
We got some sustained rain this afternoon; rain&rainrate seems to be missed. First column (rain and rainrate) from my production server, second column (rain, rainrate) from WLLDriver v0.2. All rain&rainrate are zero, although it did rain (first columns)

mysql> select weewx.archive.datetime,from_unixtime(weewx.archive.datetime),weewx.archive.rain,weewxtest.archive.rain,weewx.archive.rainrate,weewxtest.archive.rainrate from weewx.archive,weewxtest.archive where weewx.archive.datetime=weewxtest.archive.datetime order by weewx.archive.datetime desc limit 100;
+------------+---------------------------------------+---------------+------+--------------------+----------+
| datetime   | from_unixtime(weewx.archive.datetime) | rain          | rain | rainrate           | rainrate |
+------------+---------------------------------------+---------------+------+--------------------+----------+
| 1594228320 | 2020-07-08 19:12:00                   | 0.19999999878 |    0 |      1.19999999268 |        0 |
| 1594228260 | 2020-07-08 19:11:00                   |             0 |    0 |      1.19999999268 |        0 |
| 1594228200 | 2020-07-08 19:10:00                   |             0 |    0 |      1.19999999268 |        0 |
| 1594228140 | 2020-07-08 19:09:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594228080 | 2020-07-08 19:08:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594228020 | 2020-07-08 19:07:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227960 | 2020-07-08 19:06:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227900 | 2020-07-08 19:05:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227840 | 2020-07-08 19:04:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227780 | 2020-07-08 19:03:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227720 | 2020-07-08 19:02:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227660 | 2020-07-08 19:01:00                   | 0.19999999878 |    0 |      1.79999998902 |        0 |
| 1594227600 | 2020-07-08 19:00:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594227540 | 2020-07-08 18:59:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594227480 | 2020-07-08 18:58:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594227420 | 2020-07-08 18:57:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594227360 | 2020-07-08 18:56:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594227300 | 2020-07-08 18:55:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594227240 | 2020-07-08 18:54:00                   | 0.19999999878 |    0 |       1.9999999878 |        0 |
| 1594227180 | 2020-07-08 18:53:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594227120 | 2020-07-08 18:52:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594227060 | 2020-07-08 18:51:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594227000 | 2020-07-08 18:50:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594226940 | 2020-07-08 18:49:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594226880 | 2020-07-08 18:48:00                   | 0.19999999878 |    0 |      1.39999999146 |        0 |
| 1594226820 | 2020-07-08 18:47:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594226760 | 2020-07-08 18:46:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226700 | 2020-07-08 18:45:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226640 | 2020-07-08 18:44:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226580 | 2020-07-08 18:43:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226520 | 2020-07-08 18:42:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226460 | 2020-07-08 18:41:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226400 | 2020-07-08 18:40:00                   | 0.19999999878 |    0 |      1.59999999024 |        0 |
| 1594226340 | 2020-07-08 18:39:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594226280 | 2020-07-08 18:38:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594226220 | 2020-07-08 18:37:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594226160 | 2020-07-08 18:36:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594226100 | 2020-07-08 18:35:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594226040 | 2020-07-08 18:34:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594225980 | 2020-07-08 18:33:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594225920 | 2020-07-08 18:32:00                   | 0.19999999878 |    0 |      2.19999998658 |        0 |
| 1594225860 | 2020-07-08 18:31:00                   |             0 |    0 |      2.19999998658 |        0 |
| 1594225800 | 2020-07-08 18:30:00                   |             0 |    0 |      2.59999998414 |        0 |
| 1594225740 | 2020-07-08 18:29:00                   |             0 |    0 |      2.59999998414 |        0 |
| 1594225680 | 2020-07-08 18:28:00                   |             0 |    0 |      2.59999998414 |        0 |
| 1594225620 | 2020-07-08 18:27:00                   |             0 |    0 |      2.59999998414 |        0 |
| 1594225560 | 2020-07-08 18:26:00                   | 0.19999999878 |    0 |      2.59999998414 |        0 |
| 1594225500 | 2020-07-08 18:25:00                   |             0 |    0 |       0.9999999939 |        0 |
| 1594225440 | 2020-07-08 18:24:00                   |             0 |    0 |       0.9999999939 |        0 |
| 1594225380 | 2020-07-08 18:23:00                   |             0 |    0 |       0.9999999939 |        0 |
| 1594225320 | 2020-07-08 18:22:00                   | 0.19999999878 |    0 |       0.9999999939 |        0 |
| 1594225260 | 2020-07-08 18:21:00                   |             0 |    0 |       0.9999999939 |        0 |
| 1594225200 | 2020-07-08 18:20:00                   |             0 |    0 |       0.9999999939 |        0 |
| 1594225140 | 2020-07-08 18:19:00                   |             0 |    0 |      1.19999999268 |        0 |
| 1594225080 | 2020-07-08 18:18:00                   |             0 |    0 |      1.19999999268 |        0 |
| 1594225020 | 2020-07-08 18:17:00                   |             0 |    0 |      1.39999999146 |        0 |
| 1594224960 | 2020-07-08 18:16:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594224900 | 2020-07-08 18:15:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594224840 | 2020-07-08 18:14:00                   |             0 |    0 |      2.19999998658 |        0 |
| 1594224780 | 2020-07-08 18:13:00                   |             0 |    0 |      2.79999998292 |        0 |
| 1594224720 | 2020-07-08 18:12:00                   |             0 |    0 |      2.79999998292 |        0 |
| 1594224660 | 2020-07-08 18:11:00                   |             0 |    0 |      2.79999998292 |        0 |
| 1594224600 | 2020-07-08 18:10:00                   |             0 |    0 |      2.79999998292 |        0 |
| 1594224540 | 2020-07-08 18:09:00                   | 0.19999999878 |    0 |      3.19999998048 |        0 |
| 1594224480 | 2020-07-08 18:08:00                   |             0 |    0 |      3.19999998048 |        0 |
| 1594224420 | 2020-07-08 18:07:00                   |             0 |    0 |      4.39999997316 |        0 |
| 1594224360 | 2020-07-08 18:06:00                   |             0 |    0 |      4.59999997194 |        0 |
| 1594224300 | 2020-07-08 18:05:00                   | 0.19999999878 |    0 |      4.59999997194 |        0 |
| 1594224240 | 2020-07-08 18:04:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594224180 | 2020-07-08 18:03:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594224120 | 2020-07-08 18:02:00                   | 0.19999999878 |    0 |      2.19999998658 |        0 |
| 1594224060 | 2020-07-08 18:01:00                   |             0 |    0 |      2.19999998658 |        0 |
| 1594224000 | 2020-07-08 18:00:00                   |             0 |    0 |      2.79999998292 |        0 |
| 1594223940 | 2020-07-08 17:59:00                   |             0 |    0 | 3.7999999768199997 |        0 |
| 1594223880 | 2020-07-08 17:58:00                   |             0 |    0 |      4.39999997316 |        0 |
| 1594223820 | 2020-07-08 17:57:00                   | 0.19999999878 |    0 |      4.39999997316 |        0 |
| 1594223760 | 2020-07-08 17:56:00                   |             0 |    0 |      4.39999997316 |        0 |
| 1594223700 | 2020-07-08 17:55:00                   |             0 |    0 |      3.19999998048 |        0 |
| 1594223640 | 2020-07-08 17:54:00                   | 0.19999999878 |    0 |      3.19999998048 |        0 |
| 1594223580 | 2020-07-08 17:53:00                   |             0 |    0 |      3.19999998048 |        0 |
| 1594223520 | 2020-07-08 17:52:00                   |             0 |    0 |      3.19999998048 |        0 |
| 1594223460 | 2020-07-08 17:51:00                   |             0 |    0 |      3.19999998048 |        0 |
| 1594223400 | 2020-07-08 17:50:00                   | 0.19999999878 |    0 |      3.19999998048 |        0 |
| 1594223340 | 2020-07-08 17:49:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594223280 | 2020-07-08 17:48:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594223220 | 2020-07-08 17:47:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594223160 | 2020-07-08 17:46:00                   | 0.19999999878 |    0 |      1.79999998902 |        0 |
| 1594223100 | 2020-07-08 17:45:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594223040 | 2020-07-08 17:44:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594222980 | 2020-07-08 17:43:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594222920 | 2020-07-08 17:42:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594222860 | 2020-07-08 17:41:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594222800 | 2020-07-08 17:40:00                   | 0.19999999878 |    0 |      1.59999999024 |        0 |
| 1594222740 | 2020-07-08 17:39:00                   |             0 |    0 |      1.59999999024 |        0 |
| 1594222680 | 2020-07-08 17:38:00                   |             0 |    0 |      1.79999998902 |        0 |
| 1594222620 | 2020-07-08 17:37:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594222560 | 2020-07-08 17:36:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594222500 | 2020-07-08 17:35:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594222440 | 2020-07-08 17:34:00                   |             0 |    0 |       1.9999999878 |        0 |
| 1594222380 | 2020-07-08 17:33:00                   |             0 |    0 |       1.9999999878 |        0 |
+------------+---------------------------------------+---------------+------+--------------------+----------+
100 rows in set (0.01 sec)


Op woensdag 8 juli 2020 om 15:57:34 UTC+2 schreef Maarten van der Hoeven:

flor...@pre-vost.fr

unread,
Jul 8, 2020, 2:52:54 PM7/8/20
to weewx-development
Hi,

Thank you for testing my driver.


Just download the WLLDriver.py in my repo and put on your user folder.

Let me know if it's ok with modulate sensor in WLLDriver conf.

Thank you :) 

Maarten van der Hoeven

unread,
Jul 8, 2020, 3:36:48 PM7/8/20
to weewx-development
I'm happy to help! Some progress :)

Outtemp, extratemp1, windspeed and windgust seem okay. Radiation, UV, ET still NULL.

Rain and rainrate are weird. It is currently not raining, yet rain > 0. Rainrate goes through the roof (and increasing)

mysql> select datetime,from_unixtime(datetime),round(outtemp,1),round(windspeed,1),round(windgust,1),radiation,uv,et,round(rain,1),round(rainrate,1),round(extratemp1,1) from weewxtest.archive order by datetime desc limit 10;
+------------+-------------------------+------------------+--------------------+-------------------+-----------+------+------+---------------+-------------------+---------------------+
| datetime   | from_unixtime(datetime) | round(outtemp,1) | round(windspeed,1) | round(windgust,1) | radiation | uv   | et   | round(rain,1) | round(rainrate,1) | round(extratemp1,1) |
+------------+-------------------------+------------------+--------------------+-------------------+-----------+------+------+---------------+-------------------+---------------------+
| 1594236660 | 2020-07-08 21:31:00     |             14.6 |                1.1 |               2.7 |      NULL | NULL | NULL |          59.2 |             321.9 |                14.4 |
| 1594236600 | 2020-07-08 21:30:00     |             14.6 |                1.3 |               2.7 |      NULL | NULL | NULL |          59.2 |             262.7 |                14.4 |
| 1594236540 | 2020-07-08 21:29:00     |             14.6 |                0.9 |               2.7 |      NULL | NULL | NULL |          59.2 |             203.5 |                14.4 |
| 1594236480 | 2020-07-08 21:28:00     |             14.6 |                1.1 |               2.7 |      NULL | NULL | NULL |          59.2 |             144.3 |                14.4 |
| 1594236420 | 2020-07-08 21:27:00     |             14.6 |                1.4 |               2.7 |      NULL | NULL | NULL |          59.2 |              88.8 |                14.4 |
| 1594236360 | 2020-07-08 21:26:00     |             14.6 |                1.3 |               2.7 |      NULL | NULL | NULL |          51.8 |              23.9 |                14.4 |
+------------+-------------------------+------------------+--------------------+-------------------+-----------+------+------+---------------+-------------------+---------------------+
6 rows in set (0.00 sec)

Console output:
Jul  8 21:34:09 ubuntu weewx[19395] DEBUG user.WLLDriver: Rain rightnow is :-0.37
Jul  8 21:34:09 ubuntu weewx[19395] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul  8 21:34:09 ubuntu weewx[19395] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594236848, 'usUnits': 1, 'outTemp': 58.2, 'outHumidity': 97.2, 'dewpoint': 57.4, 'heatindex': 58.9, 'windchill': 58.2, 'windSpeed': 3.0, 'windDir': 43, 'windGust': 6.0, 'windGustDir': 36, 'barometer': 29.972, 'pressure': 29.96, 'inTemp': 68.8, 'inHumidity': 64.1, 'inDewpoint': 56.2, 'extraTemp1': 58.0}:
Jul  8 21:34:09 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:08 CEST (1594236848)
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:11 ubuntu weewx[19395] message repeated 2 times: [ DEBUG user.WLLDriver: extraTemp1]
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: Rain rightnow is :0.2913385826771654
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: Set previous period rain to: 37
Jul  8 21:34:11 ubuntu weewx[19395] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594236850, 'usUnits': 1, 'windSpeed': 4.0, 'windDir': 42, 'windGust': 6.0, 'windGustDir': 37, 'rain': 0.2913385826771654, 'rainRate': 0.0}:
Jul  8 21:34:11 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:10 CEST (1594236850)
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:14 ubuntu weewx[19395] message repeated 2 times: [ DEBUG user.WLLDriver: extraTemp1]
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: Set previous period rain to: 37
Jul  8 21:34:14 ubuntu weewx[19395] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594236853, 'usUnits': 1, 'windSpeed': 4.0, 'windDir': 61, 'windGust': 6.0, 'windGustDir': 37, 'rain': 0.0, 'rainRate': 0.0}:
Jul  8 21:34:14 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:13 CEST (1594236853)
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:16 ubuntu weewx[19395] message repeated 2 times: [ DEBUG user.WLLDriver: extraTemp1]
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: Set previous period rain to: 37
Jul  8 21:34:16 ubuntu weewx[19395] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594236855, 'usUnits': 1, 'windSpeed': 4.0, 'windDir': 61, 'windGust': 6.0, 'windGustDir': 37, 'rain': 0.0, 'rainRate': 0.0}:
Jul  8 21:34:16 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:15 CEST (1594236855)
Jul  8 21:34:17 ubuntu weewx[19395] INFO weewx.manager: Added record 2020-07-08 21:34:00 CEST (1594236840) to database 'weewxtest'
Jul  8 21:34:17 ubuntu weewx[19395] INFO weewx.manager: Added record 2020-07-08 21:34:00 CEST (1594236840) to daily summary in 'weewxtest'
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG weewx.reportengine: Running reports for latest time in the database.
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG weewx.reportengine: Running report 'SeasonsReport'
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul  8 21:34:17 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:00 CEST (1594236840)
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG weewx.reportengine: Found configuration file /etc/weewx/skins/Seasons/skin.conf for report 'SeasonsReport'
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG weewx.cheetahgenerator: Using search list ['weewx.cheetahgenerator.Almanac', 'weewx.cheetahgenerator.Station', 'weewx.cheetahgenerator.Current', 'weewx.cheetahgenerator.Stats', 'weewx.cheetahgenerator.UnitInfo', 'weewx.cheetahgenerator.Extras']
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: iss
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp1
Jul  8 21:34:17 ubuntu weewx[19395] message repeated 2 times: [ DEBUG user.WLLDriver: extraTemp1]
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: extraTemp2
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: Rain rightnow is :-0.37
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594236856, 'usUnits': 1, 'outTemp': 58.2, 'outHumidity': 97.2, 'dewpoint': 57.4, 'heatindex': 58.9, 'windchill': 58.2, 'windSpeed': 4.0, 'windDir': 61, 'windGust': 6.0, 'windGustDir': 36, 'barometer': 29.97, 'pressure': 29.958, 'inTemp': 68.8, 'inHumidity': 64.1, 'inDewpoint': 56.2, 'extraTemp1': 57.8}:
Jul  8 21:34:17 ubuntu weewx[19395] INFO weewx.restx: MQTT: Published record 2020-07-08 21:34:16 CEST (1594236856)
Jul  8 21:34:17 ubuntu weewx[19395] DEBUG weewx.manager: Daily summary version is 2.0



Op woensdag 8 juli 2020 om 20:52:54 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jul 8, 2020, 4:12:44 PM7/8/20
to weewx-development
Hi :)

Can you try my fix on the repo ?

Seems that I calculate 0 / 25.4 or 2.54. I fixed it.

flor...@pre-vost.fr

unread,
Jul 12, 2020, 2:37:04 PM7/12/20
to weewx-development
Hi,

See new git for more visibility :  https://github.com/Drealine/weatherlinklive-driver-weewx  

Maarten van der Hoeven

unread,
Jul 12, 2020, 3:10:37 PM7/12/20
to weewx-development
Okay. Any new stuff to test? To take special attention to?

Op zondag 12 juli 2020 om 20:37:04 UTC+2 schreef flor...@pre-vost.fr:

Florentin Prevost

unread,
Jul 13, 2020, 4:34:12 PM7/13/20
to weewx-development
Can you try my latest version ?

It seems that tomorrow rain ^^

Maarten van der Hoeven

unread,
Jul 14, 2020, 2:22:39 AM7/14/20
to weewx-development
Yup, started your driver this morning. Will watch it.

Op maandag 13 juli 2020 om 22:34:12 UTC+2 schreef flor...@pre-vost.fr:

Maarten van der Hoeven

unread,
Jul 14, 2020, 4:19:23 AM7/14/20
to weewx-development
Okay, got the first to rain ticks (of 0.2 mm each). First rain tick at about 09:50 and second rain tick at about 10:08 (verified with my other weewx-environment, my live-environment). Not looking good, see below. Also, radiation, UV and ET are NULL, although I have data for these variables.

MariaDB [weewx_import]> select from_unixtime(dateTime), rain, rainrate, radiation, uv, et from archive order by datetime desc limit 30;
+-------------------------+---------------------+---------------------+-----------+------+------+
| from_unixtime(dateTime) | rain                | rainrate            | radiation | uv   | et   |
+-------------------------+---------------------+---------------------+-----------+------+------+
| 2020-07-14 10:13:00     |                 3.2 |  33.649999999999935 |      NULL | NULL | NULL |
| 2020-07-14 10:12:00     |                 3.2 |   32.04999999999993 |      NULL | NULL | NULL |
| 2020-07-14 10:11:00     |                 3.2 |   30.44999999999994 |      NULL | NULL | NULL |
| 2020-07-14 10:10:00     |                 3.2 |  28.849999999999945 |      NULL | NULL | NULL |
| 2020-07-14 10:09:00     |                 3.2 |   27.24999999999995 |      NULL | NULL | NULL |
| 2020-07-14 10:08:00     |                 3.2 |   25.64999999999995 |      NULL | NULL | NULL |
| 2020-07-14 10:07:00     |                 2.2 |  24.212499999999956 |      NULL | NULL | NULL |
| 2020-07-14 10:06:00     |                 1.6 |   24.13124999999995 |      NULL | NULL | NULL |
| 2020-07-14 10:05:00     |                 1.6 |  24.149999999999956 |      NULL | NULL | NULL |
| 2020-07-14 10:04:00     |                 1.6 |  23.624999999999954 |      NULL | NULL | NULL |
| 2020-07-14 10:03:00     |                 1.6 |   22.04999999999996 |      NULL | NULL | NULL |
| 2020-07-14 10:02:00     |                 1.6 |  20.449999999999964 |      NULL | NULL | NULL |
| 2020-07-14 10:01:00     |                 1.6 |   18.84999999999997 |      NULL | NULL | NULL |
| 2020-07-14 10:00:00     |                 1.6 |  17.249999999999968 |      NULL | NULL | NULL |
| 2020-07-14 09:59:00     |                 1.6 |  15.649999999999974 |      NULL | NULL | NULL |
| 2020-07-14 09:58:00     |                 1.6 |   14.04999999999998 |      NULL | NULL | NULL |
| 2020-07-14 09:57:00     |                 1.6 |  12.449999999999985 |      NULL | NULL | NULL |
| 2020-07-14 09:56:00     |                 1.6 |  10.849999999999993 |      NULL | NULL | NULL |
| 2020-07-14 09:55:00     |                 1.6 |   9.249999999999998 |      NULL | NULL | NULL |
| 2020-07-14 09:54:00     |                 1.6 |   7.650000000000002 |      NULL | NULL | NULL |
| 2020-07-14 09:53:00     |                 1.6 |  6.0500000000000025 |      NULL | NULL | NULL |
| 2020-07-14 09:52:00     |                 1.6 |   4.450000000000003 |      NULL | NULL | NULL |
| 2020-07-14 09:51:00     |                 1.6 |  2.8500000000000014 |      NULL | NULL | NULL |
| 2020-07-14 09:50:00     |                 1.6 |  1.2500000000000002 |      NULL | NULL | NULL |
| 2020-07-14 09:49:00     | 0.20000000000000004 | 0.06250000000000001 |      NULL | NULL | NULL |
| 2020-07-14 09:48:00     |                   0 |                   0 |      NULL | NULL | NULL |
| 2020-07-14 09:47:00     |                   0 |                   0 |      NULL | NULL | NULL |
| 2020-07-14 09:46:00     |                   0 |                   0 |      NULL | NULL | NULL |
| 2020-07-14 09:45:00     |                   0 |                   0 |      NULL | NULL | NULL |
| 2020-07-14 09:44:00     |                   0 |                   0 |      NULL | NULL | NULL |
+-------------------------+---------------------+---------------------+-----------+------+------+
30 rows in set (0.001 sec)


Console output:
maarten@weewximport:~$ tail -f /var/log/syslog
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714658, 'usUnits': 1, 'windSpeed': 2.0, 'windDir': 234, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.0, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:40 weewximport weewx[881] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul 14 10:17:40 weewximport weewx[881] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul 14 10:17:40 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:38 CEST (1594714658)
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :-0.02
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul 14 10:17:40 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714658, 'usUnits': 1, 'outTemp': 62.3, 'outHumidity': 89.2, 'dewpoint': 59.1, 'heatindex': 63.2, 'windchill': 62.3, 'windSpeed': 2.0, 'windDir': 234, 'windGust': 5.0, 'windGustDir': 226, 'barometer': 29.981, 'pressure': 29.969, 'inTemp': 72.1, 'inHumidity': 62.9, 'inDewpoint': 58.8, 'extraTemp1': 63.1}:
Jul 14 10:17:40 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:38 CEST (1594714658)
Jul 14 10:17:43 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.015748031496062995
Jul 14 10:17:43 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:43 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:43 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714660, 'usUnits': 1, 'windSpeed': 3.0, 'windDir': 234, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.015748031496062995, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:43 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:40 CEST (1594714660)
Jul 14 10:17:45 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul 14 10:17:45 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:45 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:45 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714663, 'usUnits': 1, 'windSpeed': 3.0, 'windDir': 223, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.0, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:45 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:43 CEST (1594714663)
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714665, 'usUnits': 1, 'windSpeed': 4.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.0, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:48 weewximport weewx[881] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul 14 10:17:48 weewximport weewx[881] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul 14 10:17:48 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:45 CEST (1594714665)
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :-0.02
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul 14 10:17:48 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714665, 'usUnits': 1, 'outTemp': 62.2, 'outHumidity': 89.2, 'dewpoint': 59.0, 'heatindex': 63.1, 'windchill': 62.2, 'windSpeed': 4.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 226, 'barometer': 29.984, 'pressure': 29.972, 'inTemp': 72.0, 'inHumidity': 62.7, 'inDewpoint': 58.6, 'extraTemp1': 63.1}:
Jul 14 10:17:48 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:45 CEST (1594714665)
Jul 14 10:17:50 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.015748031496062995
Jul 14 10:17:50 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:50 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:50 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714668, 'usUnits': 1, 'windSpeed': 3.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.015748031496062995, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:50 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:48 CEST (1594714668)
Jul 14 10:17:53 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul 14 10:17:53 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:53 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:53 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714670, 'usUnits': 1, 'windSpeed': 3.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.0, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:53 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:50 CEST (1594714670)
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :0.0
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 2
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: rainRate rightnow is : 0.007874015748031498
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714673, 'usUnits': 1, 'windSpeed': 3.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 227, 'rain': 0.0, 'rainRate': 0.007874015748031498}:
Jul 14 10:17:55 weewximport weewx[881] DEBUG urllib3.connectionpool: Starting new HTTP connection (1): 192.168.2.33:80
Jul 14 10:17:55 weewximport weewx[881] DEBUG urllib3.connectionpool: http://192.168.2.33:80 "GET /v1/current_conditions HTTP/1.1" 200 None
Jul 14 10:17:55 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:53 CEST (1594714673)
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Rain rightnow is :-0.02
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Set previous period rain to: 0
Jul 14 10:17:55 weewximport weewx[881] DEBUG user.WLLDriver: Packet received from WLL module {'dateTime': 1594714673, 'usUnits': 1, 'outTemp': 62.2, 'outHumidity': 89.2, 'dewpoint': 59.0, 'heatindex': 63.1, 'windchill': 62.2, 'windSpeed': 3.0, 'windDir': 213, 'windGust': 5.0, 'windGustDir': 226, 'barometer': 29.984, 'pressure': 29.972, 'inTemp': 72.0, 'inHumidity': 62.7, 'inDewpoint': 58.6, 'extraTemp1': 63.1}:
Jul 14 10:17:55 weewximport weewx[881] INFO weewx.restx: MQTT: Published record 2020-07-14 10:17:53 CEST (1594714673)


Op dinsdag 14 juli 2020 om 08:22:39 UTC+2 schreef Maarten van der Hoeven:
current_conditions.json

Maarten van der Hoeven

unread,
Jul 14, 2020, 5:05:08 AM7/14/20
to weewx-development
Screen shot of weatherlink, two rainticks



Op dinsdag 14 juli 2020 om 10:19:23 UTC+2 schreef Maarten van der Hoeven:
2020-07-14.png

flor...@pre-vost.fr

unread,
Jul 14, 2020, 5:09:03 AM7/14/20
to weewx-development
Can you share syslog between 09:44 and 10:13 please,

With this syslog, I can't see the problem. I don't have this problem but I not enable udp so I think the problem is in udp function. 
 
Thank you :) 

Maarten van der Hoeven

unread,
Jul 14, 2020, 5:17:31 AM7/14/20
to weewx-development
Find attached

Op dinsdag 14 juli 2020 om 11:09:03 UTC+2 schreef flor...@pre-vost.fr:
syslogtmp.zip

Maarten van der Hoeven

unread,
Jul 14, 2020, 5:58:18 AM7/14/20
to weewx-development
You might be right, to look for the problem in UDP. I've switched off UDP at 11:53, and the rainticks came back to zero, as well as rainrate

MariaDB [weewx_import]> select from_unixtime(datetime),rain,rainrate from archive order by datetime desc limit 10;
+-------------------------+------+-------------------+
| from_unixtime(datetime) | rain | rainrate          |
+-------------------------+------+-------------------+
| 2020-07-14 11:55:00     |    0 |                 0 |
| 2020-07-14 11:54:00     |    0 |                 0 |
| 2020-07-14 11:53:00     |    0 |                 0 |
| 2020-07-14 11:52:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:51:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:50:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:49:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:48:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:47:00     |  3.2 | 48.39999999999991 |
| 2020-07-14 11:46:00     |  3.6 | 52.70303030303021 |
+-------------------------+------+-------------------+
10 rows in set (0.001 sec)


Op dinsdag 14 juli 2020 om 11:09:03 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jul 14, 2020, 6:18:04 AM7/14/20
to weewx-development
Yes, it's this problem. I try to fix it. Can you try my lastest fix on Github and enable udp ?

Thank you :)

Maarten van der Hoeven

unread,
Jul 14, 2020, 6:24:30 AM7/14/20
to weewx-development
New fresh code coming straight from the factory. It's still wet. Running it now. Deleted all archived records, and dropped the daily archives. More rain coming up this way this afternoon

Op dinsdag 14 juli 2020 om 12:18:04 UTC+2 schreef flor...@pre-vost.fr:

flor...@pre-vost.fr

unread,
Jul 14, 2020, 6:27:39 AM7/14/20
to weewx-development
Yes ahah ^^ 

I think udp problem appear when rainfaill_daily is more than > 0. So if you enable udp now, you've the problem ?

In my home in France, not rain at the moment ... ^^ 

Maarten van der Hoeven

unread,
Jul 14, 2020, 6:31:57 AM7/14/20
to weewx-development
Hmm, not good. UDP enabled. Not raining at the moment. Syslog added from the start

MariaDB [weewx_import]> select from_unixtime(datetime),rain,rainrate from archiv                                                                                                                                                             e order by datetime desc limit 10;
+-------------------------+--------------------+---------------------+
| from_unixtime(datetime) | rain               | rainrate            |
+-------------------------+--------------------+---------------------+
| 2020-07-14 12:26:00     |                3.2 |   9.400000000000006 |
| 2020-07-14 12:25:00     |                3.2 |   6.200000000000002 |
| 2020-07-14 12:24:00     |                3.2 |                   3 |
| 2020-07-14 12:23:00     | 1.2000000000000002 | 0.43636363636363645 |
+-------------------------+--------------------+---------------------+
4 rows in set (0.001 sec)


Op dinsdag 14 juli 2020 om 12:24:30 UTC+2 schreef Maarten van der Hoeven:
syslogtmp.zip

flor...@pre-vost.fr

unread,
Jul 14, 2020, 7:08:43 AM7/14/20
to weewx-development
Adding debug syslog and move function, can you try rightnow with my latest repo

Thank you

Maarten van der Hoeven

unread,
Jul 14, 2020, 8:46:08 AM7/14/20
to weewx-development
Now it's looking much better. I emptied the archive table, as well as the daily archive tables, and started weewx.

First record (I started weewx at 13:30) is the exact amount of current daily rainfall. It was not raining then, so this amount at 13:31 should be zero. One raintick at 13:33, which is correct.

Also attached the syslog, first 30 minutes after starting weewx (13:30).

MariaDB [weewx_import]> select from_unixtime(datetime),rain,rainrate from archive order by datetime desc limit 100;
+-------------------------+---------------------+--------------------+
| from_unixtime(datetime) | rain                | rainrate           |
+-------------------------+---------------------+--------------------+

| 2020-07-14 14:35:00     |                   0 |                  0 |
| 2020-07-14 14:34:00     |                   0 |                  0 |
| 2020-07-14 14:33:00     |                   0 |                  0 |
| 2020-07-14 14:32:00     |                   0 |                  0 |
<cut>
| 2020-07-14 13:53:00     |                   0 |                  0 |
| 2020-07-14 13:52:00     |                   0 |                  0 |
| 2020-07-14 13:51:00     |                   0 |                  0 |
| 2020-07-14 13:50:00     |                   0 |               0.25 |
| 2020-07-14 13:49:00     |                   0 | 0.6000000000000003 |
| 2020-07-14 13:48:00     |                   0 | 0.6750000000000004 |
| 2020-07-14 13:47:00     |                   0 | 0.8000000000000005 |
| 2020-07-14 13:46:00     |                   0 |  1.556249999999999 |
| 2020-07-14 13:45:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:44:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:43:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:42:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:41:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:40:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:39:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:38:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:37:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:36:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:35:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:34:00     |                   0 | 3.5500000000000007 |
| 2020-07-14 13:33:00     | 0.20000000000000004 |              3.475 |
| 2020-07-14 13:32:00     |                   0 | 3.3500000000000005 |
| 2020-07-14 13:31:00     |                 2.6 | 2.8571428571428577 |
+-------------------------+---------------------+--------------------+
65 rows in set (0.001 sec)



Op dinsdag 14 juli 2020 om 13:08:43 UTC+2 schreef flor...@pre-vost.fr:
syslogtmp.zip

flor...@pre-vost.fr

unread,
Jul 14, 2020, 9:25:40 AM7/14/20
to weewx-development
Thank's a lot ! 

Can you remove extraTemp1 in setting WLLDriver in weewx.conf for testing. I think that when extra is setting, the program recuperate rainfall_daily = 0 set in extra sensor

Attach syslog when the program is launch 5minutes ago

flor...@pre-vost.fr

unread,
Jul 14, 2020, 9:40:36 AM7/14/20
to weewx-development

Stupid that i am,  the problem is an if loop that not check value in dict ... 

I fix it. Can you try ?

:)  

Maarten van der Hoeven

unread,
Jul 14, 2020, 11:30:36 AM7/14/20
to weewx-development
Running the latest version, emptied the archive table, dropped daily_archive tables. I kept extraTemp1 alive in the config. These are the results. It was not raining, first record (started weewx at 17:19) contains zero rain, which is correct. Attached the first 5 minutes of syslog, after starting weewx



MariaDB [weewx_import]> select from_unixtime(datetime),rain,rainrate,radiation,uv,et,extratemp1 from archive order by datetime desc limit 100;
+-------------------------+------+----------+-----------+------+------+--------------------+
| from_unixtime(datetime) | rain | rainrate | radiation | uv   | et   | extratemp1         |
+-------------------------+------+----------+-----------+------+------+--------------------+
| 2020-07-14 17:22:00     |    0 |        0 |      NULL | NULL | NULL |               17.5 |
| 2020-07-14 17:21:00     |    0 |        0 |      NULL | NULL | NULL | 17.479166666666664 |
| 2020-07-14 17:20:00     |    0 |        0 |      NULL | NULL | NULL | 17.444444444444443 |
+-------------------------+------+----------+-----------+------+------+--------------------+
3 rows in set (0.001 sec)


Op dinsdag 14 juli 2020 om 15:40:36 UTC+2 schreef flor...@pre-vost.fr:
syslogtmp.zip
It is loading more messages.
0 new messages