martin-ger / esp_mqtt

MQTT Broker/Bridge on the ESP8266
MIT License
293 stars 68 forks source link

Script how to subscribe to # ? #43

Closed j0hncc closed 5 years ago

j0hncc commented 5 years ago

In my script I can subscribe and receive specific events no problem. But if I try to receive all events first I get script error because of # "Error (number of hexdigits must be multiple of 2) at >># on topic local "#... If I put # in double or single quotes it accepts the script but no topics are matched and printed to serial_out. Also tried #.

on init do subscribe local #

on topic local # do serial_out "Received: " | $this_topic | " , " | $this_data

Is there some other trick to subscribe to # ?

Thanks!

martin-ger commented 5 years ago

Have auch look at the bridge sample. Thus should work.

j0hncc commented 5 years ago

Sorry, my mistake. I didn't realize that after reloading a new script, I needed to reset for it to take effect... The proper format is indeed subscribe local "#"