Re: [weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-31 Thread 'Andy Hudson-Smith' via weewx-user
Good point on the was it actually working thought - it did not seem to make 
sense that it was not working and then was. It may well have been the 
subscribing part.

Good point on the clutter, i will turn off the logging as i think its 
logging every post!

Thanks for all the help (new here - seems a great group).

Andy

On Thursday, 31 January 2019 04:19:33 UTC, Colin Larsen wrote:
>
> The other thing I did to reduce the "clutter" in the logs is setting these 
> in weewx.conf in the MQTT section;
>
> log_success = False
>
> log_failure = True
>
>
> Unless you really want to see every time it posts successfully of course :)
>
> On Thu, Jan 31, 2019 at 4:48 AM vince > 
> wrote:
>
>> On Wednesday, January 30, 2019 at 12:20:37 AM UTC-8, Andy Hudson-Smith 
>> wrote:
>>
>>> Below is the snip in case it also helps anyone else. Easy when you know 
>>> how :)
>>>
>>>
>>>
>>> topic = downhamweather
>>> binding = loop
>>> unit_system = METRICWX
>>> [[[inputs]]]
>>> windSpeed
>>> name = windSpeed_mph
>>> format = %.1f
>>> units = mile_per_hour
>>>
>>>
>>>
>> Hmmm - this doesn't make sense.  Name is optional.
>>
>> If you look at the docs for the MQTT extension 
>> (https://github.com/weewx/weewx/wiki/mqtt) there are examples of how to 
>> set the units for a particular element.  Read the paragraph under the 
>> examples code snippet carefully.
>>
>>- If you set units, the extension publishes to a MQTT topic with the 
>>default name of windSpeed, just in mph rather than your system 
>>default of metric
>>
>>- If you supersede the name, it publishes to a new MQTT topic ala 
>>windSpeed_mph that you mentioned
>>
>>- the 'name' can be totally bogus - if you set name="xyzzy" then it 
>>would create a MQTT topic windSpeed_xyzzy
>>
>>
>>- if you set units 'and' a name, it publishes to a new topic with 
>>altered units
>>
>> I suspect what was happening all along is weewx was probably working 
>> correctly, unless you actually got errors.  You didn't provide the usual 
>> logfile excerpts so it's hard to say for certain.
>>
>> My guess is you actually 'had' windSpeed publishing in MQTT in mph, but 
>> you were 'subscribing' on the consumer side to a different name for that 
>> MQTT topic.  So your MQTT 'subscriber' side was likely looking for a topic 
>> name that the 'publishing' side - ie, the weewx extension - didn't publish.
>>
>> Note also that Matthew uses weewx-ish syntax on his web page, and the 
>> word 'upload'.   If you think MQTT-centric, the terminology is 
>> publish/subscribe.  The extension publishes data to MQTT topics.  Your 
>> consuming code (Belchertown skin?) subscribes to the topics it want.  You 
>> have to have the MQTT topic name lined up on both sides.
>>
>>
>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "weewx-user" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to weewx-user+...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-30 Thread Colin Larsen
The other thing I did to reduce the "clutter" in the logs is setting these
in weewx.conf in the MQTT section;

log_success = False

log_failure = True


Unless you really want to see every time it posts successfully of course :)

On Thu, Jan 31, 2019 at 4:48 AM vince  wrote:

> On Wednesday, January 30, 2019 at 12:20:37 AM UTC-8, Andy Hudson-Smith
> wrote:
>
>> Below is the snip in case it also helps anyone else. Easy when you know
>> how :)
>>
>>
>>
>> topic = downhamweather
>> binding = loop
>> unit_system = METRICWX
>> [[[inputs]]]
>> windSpeed
>> name = windSpeed_mph
>> format = %.1f
>> units = mile_per_hour
>>
>>
>>
> Hmmm - this doesn't make sense.  Name is optional.
>
> If you look at the docs for the MQTT extension
> (https://github.com/weewx/weewx/wiki/mqtt) there are examples of how to
> set the units for a particular element.  Read the paragraph under the
> examples code snippet carefully.
>
>- If you set units, the extension publishes to a MQTT topic with the
>default name of windSpeed, just in mph rather than your system default
>of metric
>
>- If you supersede the name, it publishes to a new MQTT topic ala
>windSpeed_mph that you mentioned
>
>- the 'name' can be totally bogus - if you set name="xyzzy" then it
>would create a MQTT topic windSpeed_xyzzy
>
>
>- if you set units 'and' a name, it publishes to a new topic with
>altered units
>
> I suspect what was happening all along is weewx was probably working
> correctly, unless you actually got errors.  You didn't provide the usual
> logfile excerpts so it's hard to say for certain.
>
> My guess is you actually 'had' windSpeed publishing in MQTT in mph, but
> you were 'subscribing' on the consumer side to a different name for that
> MQTT topic.  So your MQTT 'subscriber' side was likely looking for a topic
> name that the 'publishing' side - ie, the weewx extension - didn't publish.
>
> Note also that Matthew uses weewx-ish syntax on his web page, and the word
> 'upload'.   If you think MQTT-centric, the terminology is
> publish/subscribe.  The extension publishes data to MQTT topics.  Your
> consuming code (Belchertown skin?) subscribes to the topics it want.  You
> have to have the MQTT topic name lined up on both sides.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "weewx-user" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to weewx-user+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-30 Thread vince
On Wednesday, January 30, 2019 at 12:20:37 AM UTC-8, Andy Hudson-Smith 
wrote:

> Below is the snip in case it also helps anyone else. Easy when you know 
> how :)
>
>
>
> topic = downhamweather
> binding = loop
> unit_system = METRICWX
> [[[inputs]]]
> windSpeed
> name = windSpeed_mph
> format = %.1f
> units = mile_per_hour
>
>
>
Hmmm - this doesn't make sense.  Name is optional.

If you look at the docs for the MQTT extension 
(https://github.com/weewx/weewx/wiki/mqtt) there are examples of how to set 
the units for a particular element.  Read the paragraph under the examples 
code snippet carefully.

   - If you set units, the extension publishes to a MQTT topic with the 
   default name of windSpeed, just in mph rather than your system default 
   of metric
   
   - If you supersede the name, it publishes to a new MQTT topic ala 
   windSpeed_mph that you mentioned
   
   - the 'name' can be totally bogus - if you set name="xyzzy" then it 
   would create a MQTT topic windSpeed_xyzzy
   

   - if you set units 'and' a name, it publishes to a new topic with 
   altered units

I suspect what was happening all along is weewx was probably working 
correctly, unless you actually got errors.  You didn't provide the usual 
logfile excerpts so it's hard to say for certain.

My guess is you actually 'had' windSpeed publishing in MQTT in mph, but you 
were 'subscribing' on the consumer side to a different name for that MQTT 
topic.  So your MQTT 'subscriber' side was likely looking for a topic name 
that the 'publishing' side - ie, the weewx extension - didn't publish.

Note also that Matthew uses weewx-ish syntax on his web page, and the word 
'upload'.   If you think MQTT-centric, the terminology is 
publish/subscribe.  The extension publishes data to MQTT topics.  Your 
consuming code (Belchertown skin?) subscribes to the topics it want.  You 
have to have the MQTT topic name lined up on both sides.


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-30 Thread 'Andy Hudson-Smith' via weewx-user
That worked - thanks a lot, i was missing the name!

Below is the snip in case it also helps anyone else. Easy when you know how 
:)


I now have rain in mm and wind in mph, so the norm in the UK.


Thanks again


Andy

   
   
topic = downhamweather
binding = loop
unit_system = METRICWX
[[[inputs]]]
windSpeed
name = windSpeed_mph
format = %.1f
units = mile_per_hour




On Wednesday, 30 January 2019 00:52:03 UTC, Pat wrote:
>
> > Pat - I'm not quite seeing what changes you're suggesting, but that 
> might just be my old eyes and non-cooperating fonts in the browser here.   
> I'm not aware that weewx cares about indentation if that's what you changed 
> (guess I need either more or less coffee, uncertain which:-)
>
> I'm with you. After I clicked Post I had a "oh man I kinda just repeated 
> what was in his question". I also added the "name = windSpeed_mph" 
> Anyways, I didn't want to delete my message in hope that MAYBE it helped 
> out. Here's hoping?
>
>
> On Tuesday, January 29, 2019 at 7:47:31 PM UTC-5, vince wrote:
>>
>> On Tuesday, January 29, 2019 at 4:00:02 PM UTC-8, Pat wrote:
>>>
>>> Try
>>>
>>> [[MQTT]]
>>> unit_system = METRIC
>>> ***snip***
>>> [[[inputs]]]
>>> windSpeed
>>> name = windSpeed_mph
>>> units = mile_per_hour
>>>
>>>
>>> On Tuesday, January 29, 2019 at 5:30:32 PM UTC-5, Andy Hudson-Smith 
>>> wrote:

 Evening,

 Hope its ok to ask - i have MQTT running happily but i am looking to 
 use MPH for wind (UK configertation). I have written the config file as 
 (it 
 does not work - this the commenting out)

  binding = loop

 unit_system = METRICWX

 #   [[[inputs]]]

 #windSpeed

 #   units = mile_per_hour




>>
>> Pat - I'm not quite seeing what changes you're suggesting, but that might 
>> just be my old eyes and non-cooperating fonts in the browser here.   I'm 
>> not aware that weewx cares about indentation if that's what you changed 
>> (guess I need either more or less coffee, uncertain which:-)
>>
>> Andy - can you post again and this time mark your code snippet with the 
>> 'highlight code syntax' format using the { } on the right side above the 
>> input window if you're posting via a browser, so it appears as a code 
>> snippet with easy to read fonts like Pat's post did ?   Basically we need 
>> to see your whole [[MQTT]] block.
>>
>> The MQTT extension readme doesn't have a full-up example of how to 
>> override units individually, but 
>> https://github.com/weewx/weewx/wiki/emoncms has a nice example of the 
>> same thing.
>>
>>
>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-30 Thread 'Andy Hudson-Smith' via weewx-user

That worked - thanks a lot, i was missing the name! Below is the snip in case 
it also helps anyone else. Easy when you know how :)

Thanks again

Andy


server_url = mqtt://username:passw...@mqttserver.ddns.net:1883/
topic = downhamweather
binding = loop
unit_system = METRICWX
[[[inputs]]]
windSpeed
name = windSpeed_mph
format = %.1f
units = mile_per_hour


-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-29 Thread Pat
> Pat - I'm not quite seeing what changes you're suggesting, but that might 
just be my old eyes and non-cooperating fonts in the browser here.   I'm 
not aware that weewx cares about indentation if that's what you changed 
(guess I need either more or less coffee, uncertain which:-)

I'm with you. After I clicked Post I had a "oh man I kinda just repeated 
what was in his question". I also added the "name = windSpeed_mph" 
Anyways, I didn't want to delete my message in hope that MAYBE it helped 
out. Here's hoping?


On Tuesday, January 29, 2019 at 7:47:31 PM UTC-5, vince wrote:
>
> On Tuesday, January 29, 2019 at 4:00:02 PM UTC-8, Pat wrote:
>>
>> Try
>>
>> [[MQTT]]
>> unit_system = METRIC
>> ***snip***
>> [[[inputs]]]
>> windSpeed
>> name = windSpeed_mph
>> units = mile_per_hour
>>
>>
>> On Tuesday, January 29, 2019 at 5:30:32 PM UTC-5, Andy Hudson-Smith wrote:
>>>
>>> Evening,
>>>
>>> Hope its ok to ask - i have MQTT running happily but i am looking to use 
>>> MPH for wind (UK configertation). I have written the config file as (it 
>>> does not work - this the commenting out)
>>>
>>>  binding = loop
>>>
>>> unit_system = METRICWX
>>>
>>> #   [[[inputs]]]
>>>
>>> #windSpeed
>>>
>>> #   units = mile_per_hour
>>>
>>>
>>>
>>>
>
> Pat - I'm not quite seeing what changes you're suggesting, but that might 
> just be my old eyes and non-cooperating fonts in the browser here.   I'm 
> not aware that weewx cares about indentation if that's what you changed 
> (guess I need either more or less coffee, uncertain which:-)
>
> Andy - can you post again and this time mark your code snippet with the 
> 'highlight code syntax' format using the { } on the right side above the 
> input window if you're posting via a browser, so it appears as a code 
> snippet with easy to read fonts like Pat's post did ?   Basically we need 
> to see your whole [[MQTT]] block.
>
> The MQTT extension readme doesn't have a full-up example of how to 
> override units individually, but 
> https://github.com/weewx/weewx/wiki/emoncms has a nice example of the 
> same thing.
>
>
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[weewx-user] Re: MQTT - wind miles per hour - stops MQTT running

2019-01-29 Thread vince
On Tuesday, January 29, 2019 at 4:00:02 PM UTC-8, Pat wrote:
>
> Try
>
> [[MQTT]]
> unit_system = METRIC
> ***snip***
> [[[inputs]]]
> windSpeed
> name = windSpeed_mph
> units = mile_per_hour
>
>
> On Tuesday, January 29, 2019 at 5:30:32 PM UTC-5, Andy Hudson-Smith wrote:
>>
>> Evening,
>>
>> Hope its ok to ask - i have MQTT running happily but i am looking to use 
>> MPH for wind (UK configertation). I have written the config file as (it 
>> does not work - this the commenting out)
>>
>>  binding = loop
>>
>> unit_system = METRICWX
>>
>> #   [[[inputs]]]
>>
>> #windSpeed
>>
>> #   units = mile_per_hour
>>
>>
>>
>>

Pat - I'm not quite seeing what changes you're suggesting, but that might 
just be my old eyes and non-cooperating fonts in the browser here.   I'm 
not aware that weewx cares about indentation if that's what you changed 
(guess I need either more or less coffee, uncertain which:-)

Andy - can you post again and this time mark your code snippet with the 
'highlight code syntax' format using the { } on the right side above the 
input window if you're posting via a browser, so it appears as a code 
snippet with easy to read fonts like Pat's post did ?   Basically we need 
to see your whole [[MQTT]] block.

The MQTT extension readme doesn't have a full-up example of how to override 
units individually, but https://github.com/weewx/weewx/wiki/emoncms has a 
nice example of the same thing.




-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to weewx-user+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.