Jsonpath is good for plucking specific values on the subscribe/inward side, but 
it doesn’t help with the publish/outward side (or at least i couldn’t think of 
one). i am still using the eval(expr, weewx-packet or json-message) approach in 
my mqtt implementation
⊣GE⊢

> On 7 Mar 2024, at 11:05 am, Rich Bell <[email protected]> wrote:
> 
> Cool. I’ll check it out. 
> Thanks for the link!
> 
> On Wed, Mar 6, 2024 at 6:33 PM 'Ian Millard' via weewx-user 
> <[email protected] <mailto:[email protected]>> wrote:
>> FWIW here you can find a very good online json path finder and validator 
>> which is very useful in helping to work out a parsing scheme which can be 
>> adapted for various computer languages: -
>> 
>> JSONPath Finder and Evaluator
>> site24x7.com
>> <site24x7-fav.ico>
>>  <https://www.site24x7.com/tools/jsonpath-finder-validator.html>JSONPath 
>> Finder and Evaluator 
>> <https://www.site24x7.com/tools/jsonpath-finder-validator.html>
>> site24x7.com <https://www.site24x7.com/tools/jsonpath-finder-validator.html> 
>> <site24x7-fav.ico> 
>> <https://www.site24x7.com/tools/jsonpath-finder-validator.html>
>> 
>>> On 6 Mar 2024, at 21:59, Rich Bell <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>> 
>>> I have not tried parsing this via MQTTSubscribe, but I have my doubts that 
>>> it currently handles it.
>>> rich
>>> 
>>> On Wed, Mar 6, 2024 at 3:33 PM vince <[email protected] 
>>> <mailto:[email protected]>> wrote:
>>>> You have some pretty hideously formatted JSON to parse, but here's what it 
>>>> looks like in a more readable format after piping it through 'jq' and 
>>>> doing a little hand editing for readability....
>>>> 
>>>> {
>>>> 
>>>>   "sensor": [
>>>>     {
>>>>       "title": "Indoor",
>>>>       "list": [
>>>>         [ "Temperature", "68.9", "°F" ],
>>>>         [ "Humidity", "38", "%" ] ]
>>>>     },
>>>>     {
>>>>       "title": "Outdoor",
>>>>       "list": [
>>>>         [ "Temperature", "61.7", "°F" ],
>>>>         [ "Humidity", "29", "%" ] ]
>>>>     },
>>>>     {
>>>>       "title": "Pressure", "list": [
>>>>         [ "Absolute", "26.76", "inhg" ],
>>>>         [ "Relative", "29.84", "inhg" ] ]
>>>>     },
>>>>     {
>>>>       "title": "Wind Speed",
>>>>       "list": [
>>>>         [ "Max Daily Gust", "5.1", "mph" ],
>>>>         [ "Wind", "1.1", "mph" ],
>>>>         [ "Gust", "1.6", "mph" ],
>>>>         [ "Direction", "123", "°" ],
>>>>         [ "Wind Average 2 Minute", "0.4", "mph" ],
>>>>         [ "Direction Average 2 Minute", "111", "°" ],
>>>>         [ "Wind Average 10 Minute", "1.3", "mph" ],
>>>>         [ "Direction Average 10 Minute", "134", "°" ]
>>>>       ]
>>>>     },
>>>>     {
>>>>       "title": "Rainfall",
>>>>       "list": [
>>>>         [ "Rate", "0.0", "inch/hr" ],
>>>>         [ "Hour", "0.0", "inch", "43" ],
>>>>         [ "Day", "0.0", "inch", "44" ],
>>>>         [ "Week", "0.0", "inch", "45" ],
>>>>         [ "Month", "0.0", "inch", "46" ],
>>>>         [ "Year", "5.72", "inch", "47" ],
>>>>         [ "Total", "10.65", "inch", "48" ]
>>>>       ],
>>>>       "range": "Range: 0inch to 393.7inch."
>>>>     },
>>>>     {
>>>>       "title": "Solar",
>>>>       "list": [
>>>>         [ "Light", "261.36", "w/m²" ],
>>>>         [ "UVI", "1.2", "" ]
>>>>       ]
>>>>     }
>>>>   ],
>>>>   "battery": {
>>>>     "title": "Battery",
>>>>     "list": [ "All battery are ok" ]
>>>>   }
>>>> }
>>>> 
>>>> 
>>>> On Wednesday, March 6, 2024 at 11:59:36 AM UTC-8 Michael wrote:
>>>>> I have officially given up on getting interceptor to work in sniffing 
>>>>> mode on Phython3.  
>>>>> 
>>>>> On Wednesday, March 6, 2024 at 11:17:39 AM UTC-7 matthew wall wrote:
>>>>>> it looks like the raddy L7 can upload to wundgerground, so if you are 
>>>>>> using the raddy's wifi, you should be able to use the interceptor driver 
>>>>>> to capture or directly receive the wunderground output.  setting up the 
>>>>>> interceptor is not trivial, but there are many examples.
>>>>>> 
>>>>>> it would be nice if there were a generic json driver, analogous to the 
>>>>>> fileparse driver.  but the json structure varies a lot from one device 
>>>>>> to another, and the mechanism for obtaining that json output also 
>>>>>> varies.  for example, the tempest broadcasts json data, whereas the 
>>>>>> ruddy emits json as a response to http request.  so i understand why no 
>>>>>> one has written one yet.
>>>>>> 
>>>>>> m
>>>> 
>>>> 
>>>> -- 
>>>> You received this message because you are subscribed to the Google Groups 
>>>> "weewx-user" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>>> email to [email protected] 
>>>> <mailto:[email protected]>.
>>>> To view this discussion on the web visit 
>>>> https://groups.google.com/d/msgid/weewx-user/421d1ce1-9dcf-4148-827d-b97c92a4495cn%40googlegroups.com
>>>>  
>>>> <https://groups.google.com/d/msgid/weewx-user/421d1ce1-9dcf-4148-827d-b97c92a4495cn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>>> 
>>> 
>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "weewx-user" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to [email protected] 
>>> <mailto:[email protected]>.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/weewx-user/CAG4CQqyqTkcda9a5EWe6DVbz2oPJtnqf_9Q2kbG%3DWCksxKgsvw%40mail.gmail.com
>>>  
>>> <https://groups.google.com/d/msgid/weewx-user/CAG4CQqyqTkcda9a5EWe6DVbz2oPJtnqf_9Q2kbG%3DWCksxKgsvw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>> 
>> 
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to [email protected] 
>> <mailto:[email protected]>.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/weewx-user/4AC3D106-F4E4-479A-804D-C374DCEB94EA%40btinternet.com
>>  
>> <https://groups.google.com/d/msgid/weewx-user/4AC3D106-F4E4-479A-804D-C374DCEB94EA%40btinternet.com?utm_medium=email&utm_source=footer>.
> 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/weewx-user/CAG4CQqwBvhN-mNq7WhBL20zNK%3Df%3Dt6zBgmKX98Gdj2j5b57m0Q%40mail.gmail.com
>  
> <https://groups.google.com/d/msgid/weewx-user/CAG4CQqwBvhN-mNq7WhBL20zNK%3Df%3Dt6zBgmKX98Gdj2j5b57m0Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-user/42C2FCE3-211F-419B-9C09-953F53FFAF6D%40geddy.au.

Reply via email to