HI Bastiaan,

If you want to check all values on JSON data for all sensor, you can make a 
while function with the lenght of sensors like this : length_json = 
len(data_wl['sensors'])

Le mercredi 8 juillet 2020 à 22:26:40 UTC+2, hoev...@gmail.com a écrit :

> fetched the latest from github, and changed the datasets to 2,4,3. Valid 
> data downloaded. Output on screen:
> Fetching 1594116000 - 1594117800
> The following sensors are found:
> Product name: WeatherLink LIVE Health
>         category:    Health
>         sensor type: 504
> Product name: Sensor Suite
>         category:    Other
>         sensor type: 55
> Product name: Barometer
>         category:    Barometer
>         sensor type: 242
> Product name: Inside Temp/Hum
>         category:    Inside Temp/Hum
>         sensor type: 243
> Product name: Vantage Pro2 Plus with 24-hr-Fan-Aspirated Radiation shield, 
> includes UV & Solar Radiation Sensors
>         category:    ISS
>         sensor type: 46
>
>
> Op woensdag 8 juli 2020 om 22:09:30 UTC+2 schreef Bastiaan Meelberg:
>
>> Interesting. I made a small change so the program will show the sensors 
>> found. 
>> It looks like the extra temp is dataset 0 (lets skip that for now), 
>> barometer is set 2, inside is set 3 and the remaining data is set 4. So 
>> like you figured out, this should give the correct data:
>>
>> baro_data = weather_data['sensors'][2]['data'
>>>
>>> ]
>>> iss_data = weather_data['sensors'][4]['data']
>>> indoor_data = weather_data['sensors'][3]['data']
>>>
>>>
>> On Wednesday, July 8, 2020 at 9:53:38 PM UTC+2, Maarten van der Hoeven 
>> wrote:
>>>
>>> maarten@ubuntu:~/weatherlink$ python3 weewx_weatherlink -s 
>>> 2020-07-07T12:00 -e 2020-07-07T12:30
>>> Use dates: 2020-07-07 12:00:00 - 2020-07-07 12:30:00
>>> 1 [1594116000] - [1594117800]: 2020-07-07 12:00:00 - 2020-07-07 12:30:00
>>> Finding stations:
>>>
>>>
>>>
>>> Op woensdag 8 juli 2020 om 21:22:33 UTC+2 schreef Bastiaan Meelberg:
>>>
>>>> Thanks for testing.
>>>>
>>>> The 'problem' with api v2 is that it delivers a HUGE amount of data. 
>>>> With my setup it works perfect, I can import months at the time.
>>>>
>>>> I think indeed of you different setup it is not working. Maybe a 
>>>> question/answer that the program is showing bit of the data and asks if it 
>>>> is the data the user wants to import.
>>>>
>>>> I added a 'print url' to the latest build, if you can try an import of 
>>>> a short period, lets say 30 min and use the link to download the JSON data 
>>>> in a web-browser. (The link is valid for a few minutes, due to the 
>>>> timestamp in the signature) and post it.
>>>>
>>>>
>>>>
>>>>
>>>> On Wednesday, July 8, 2020 at 9:10:36 PM UTC+2, Maarten van der Hoeven 
>>>> wrote:
>>>>>
>>>>> If I change the code to (#2, #0 and #3 are the values in your code), 
>>>>> the data is imported okay (except extratemp1). I guess it has something 
>>>>> to 
>>>>> do with my ISS not having ID=1, but ID=2. An my external temp sensor 
>>>>> running on ID=3
>>>>>
>>>>> Find attached the resulting csv file
>>>>>
>>>>>         baro_data = weather_data['sensors'][2]['data'] #2
>>>>>         iss_data = weather_data['sensors'][1]['data'] #0
>>>>>         indoor_data = weather_data['sensors'][3]['data'] #3
>>>>>
>>>>>
>>>>> Op dinsdag 7 juli 2020 om 21:33:57 UTC+2 schreef Bastiaan Meelberg:
>>>>>
>>>>>> Hi Maarten,
>>>>>>
>>>>>> If you want you can give the importer a try:
>>>>>>
>>>>>> https://github.com/grebleem/weewx_wl_import
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>>
>>>>>> On Tuesday, July 7, 2020 at 1:09:34 PM UTC+2, Maarten van der Hoeven 
>>>>>> wrote:
>>>>>>>
>>>>>>> Hi Bastiaan,
>>>>>>>
>>>>>>> something I can test?
>>>>>>>
>>>>>>> Op zondag 5 juli 2020 14:02:38 UTC+2 schreef flor...@pre-vost.fr:
>>>>>>>>
>>>>>>>> Sorry for that. 
>>>>>>>>
>>>>>>>> There was a  misunderstandings . Let's forget this conversation;)  
>>>>>>>>
>>>>>>>> -fp 
>>>>>>>>
>>>>>>>> Le samedi 4 juillet 2020 à 13:36:23 UTC+2, hoev...@gmail.com a 
>>>>>>>> écrit :
>>>>>>>>
>>>>>>>>> Yes, agree. I like the weather, I like programming, I like to 
>>>>>>>>> cooperate. It's my current lack of python-knowledge that I want to 
>>>>>>>>> contribute the best I can do right now, and that is testing both of 
>>>>>>>>> your 
>>>>>>>>> drivers. I dont see it as competition, and may the best win. Far from 
>>>>>>>>> that. 
>>>>>>>>> In the end, it's my small contribution to the community in testing 
>>>>>>>>> two 
>>>>>>>>> drivers, and make them both better working. In hoping that the user 
>>>>>>>>> pick 
>>>>>>>>> the driver it feels most comfortably with, or not. 
>>>>>>>>>
>>>>>>>>> Op zaterdag 4 juli 2020 12:52:09 UTC+2 schreef Bastiaan Meelberg:
>>>>>>>>>
>>>>>>>>>> I just program what I need, because I like programming.
>>>>>>>>>>  
>>>>>>>>>> Use my program (you all-ready did I see in you're driver ;-), or 
>>>>>>>>>> don't use it. That is the good think of open source. 
>>>>>>>>>>
>>>>>>>>>> Your importer is doing the calculation e.g. Fahrenheit to Celsius 
>>>>>>>>>> I don't like that, weewx is way better in making the conversions. 
>>>>>>>>>> Also I just want to import a date range and not have to figure 
>>>>>>>>>> out my station_id. So I decided to make my own.
>>>>>>>>>>
>>>>>>>>>> But feel free to make a better driver/importer. 
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> On Saturday, July 4, 2020 at 12:38:54 PM UTC+2, Florentin Prevost 
>>>>>>>>>> wrote:
>>>>>>>>>>>
>>>>>>>>>>> Like we work on the same functions for Wll driver. Why not to 
>>>>>>>>>>> work together to developp the driver ? Each one developp the same 
>>>>>>>>>>> code and 
>>>>>>>>>>> it would a shame to work 2 times for the same code ...
>>>>>>>>>>
>>>>>>>>>>

-- 
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-development+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/da336715-912e-471e-b75b-471e5e6b372cn%40googlegroups.com.

Reply via email to