haimgel / node_rgb

Software for ESP8266 WiFi SOC to control an RGB led strip via a MQTT-compatible home automation controller
Mozilla Public License 2.0
9 stars 4 forks source link

PANIC: unprotected error in call to Lua API (main.lua:89: attempt to concatenate global 'param' (a nil value)) #3

Open vsefer opened 6 years ago

vsefer commented 6 years ago

Hi, I tried to run code on ESP8266, but I'm having issue.

NodeMCU info:

NodeMCU custom build by frightanic.com
    branch: master
    commit: c8ac5cfb912ff206b03dd7c60ffbb2dafb83fe5e
    SSL: false
    modules: file,gpio,mqtt,net,node,pwm,tmr,uart,wifi
 build  built on: 2017-07-14 04:05
 powered by Lua 5.1.4 on SDK 2.1.0(116b762)
> Press ENTER to abort startup ...
In startup

Testing mqtt

pi@rpi3:~ $ mosquitto_pub -d -t livingroom/livingroom-rgb/rgb/set -m 255,255,255 -h 10.20.30.228 Client mosqpub/19964-rpi3 sending CONNECT
Client mosqpub/19964-rpi3 received CONNACK
Client mosqpub/19964-rpi3 sending PUBLISH (d0, q0, r0, m1, 'livingroom/livingroom-rgb/rgb/set', ... (11 bytes))
Client mosqpub/19964-rpi3 sending DISCONNECT

Error output from NodeMCU:

***** NodeRGB v1.0 startup *****
Warning, deprecated API! Argument style station configuration is replaced by table style station configuration. It will be removed in the next version. See documentation for details.
Wi-Fi: disconnected.
Wi-Fi: got IP 10.20.30.225
Warning, deprecated API! autoreconnect == 1 is deprecated. It will be removed in the next version. See documentation for details.
MQTT: connected to 10.20.30.228
LEDs: Set target=0,0,0, current=0,0,0
MQTT: published: livingroom/livingroom-rgb/light/status:OFF (1,1)
MQTT: published: livingroom/livingroom-rgb/brightness/status:100 (1,1)
MQTT: published: livingroom/livingroom-rgb/rgb/status:255,255,255 (1,1)
MQTT: published: livingroom/livingroom-rgb/fadetime/status:2000 (1,1)
MQTT: published: livingroom/livingroom-rgb/status:connected (1,1)
MQTT: subscribed to livingroom/livingroom-rgb
MQTT: message recieved: livingroom/livingroom-rgb/rgb/set:255,255,255
PANIC: unprotected error in call to Lua API (main.lua:89: attempt to concatenate global 'param' (a nil value))

Thanks !

dpavlin commented 6 years ago

You should remove - from your mqtt_topic_root since it's "magic" character according to https://www.lua.org/manual/5.3/manual.html#6.4.1