cloudy cloudy

Author Topic: MQTT message without {}  (Read 208 times)

0 Members and 1 Guest are viewing this topic.

Offline Quart

  • Posts: 71
  • Goteborg Sweden
  • OS/Browser:
  • Win NT 10.0
  • Chrome 75.0.3770.142
    • Hindås Sundshult
MQTT message without {}
« on: July 19, 2019, 09:03:09 AM »
I am using some ESP8266 running EasyESP.
I want to use some messages posted by WD in these machines.
But the can only read messages without { }
I have edited my MQTTin.txt and got it nice in MQTTout.txt but its not been sent to my Mosquitto server.
Is there any "rules" in WD that said that the message must be in between { } ?

Offline Andrew Hudson-Smith

  • Posts: 160
  • OS/Browser:
  • Mac OS X 10.14.5
  • Chrome 76.0.3809.87
Re: MQTT message without {}
« Reply #1 on: August 14, 2019, 07:56:07 PM »
Just asking the same question - i have mqtt coming in from another bit of software (weewx) and it comes in simply as the numbers. I am trying to move back to WD as been using it for years and a loyal user but needed MQTT - now WD has MQTT i should be good to go but all my data comes in surrounded by {} - i just need the number so save me writing additional code to each script to clean it up.

Is that possible? Attached shows my mqtt feed, clearly with the WD data surrounded by {} compared to the other data.

Andy

« Last Edit: August 14, 2019, 07:58:39 PM by Andrew Hudson-Smith »

Offline Weather Display

  • Posts: 87,244
  • Davis VP2
  • New Zealand
  • OS/Browser:
  • Win NT 10.0
  • Chrome 76.0.3809.100
    • Weather Display
Re: MQTT message without {}
« Reply #2 on: August 16, 2019, 06:59:58 AM »
I don't have any code to add in { and }
it might be added by the component

Offline Andrew Hudson-Smith

  • Posts: 160
  • OS/Browser:
  • Mac OS X 10.14.5
  • Chrome 76.0.3809.87
Re: MQTT message without {}
« Reply #3 on: August 16, 2019, 03:18:17 PM »
I assumed it was picking it up from the text file? ie my wd/winddir:{%avdir10minute%}  results in (for example) {198} and i really need 198 without the brackets...

Andy