Closed Onyxxed closed 1 year ago
The command is wrong try:
mosquitto_pub -h localhost -p 21883 -t ewpe-smart/MyAcCidHere/set -m {\"Pow\":1, \"SetTem\":24}
The command is wrong try:
mosquitto_pub -h localhost -p 21883 -t ewpe-smart/MyAcCidHere/set -m {\"Pow\":1, \"SetTem\":24}
Ah, thanks for the reply, i just got it working by adding single parentheses around json payload.
Yes is saw it, was make the comment and reserved the mail 😆 If it works it works.
My npm service crashes with this error when trying to use the /set function to control my ac. SyntaxError: Unexpected token P in JSON at position 1 The error occurs at index.js file at line 72.
What i tried to do: mosquitto_pub -h localhost -p 21883 -t ewpe-smart/MyAcCidHere/set -m {"Pow":1, "SetTem":24}
The port is changed from 1883, and everything else works just fine, just cant control the ac.
A little help would be greatly appreciated :)
Edit: I am currently on xenomes /fix branch which helped me to start the service without crashing. @stas-demydiuk @Xenomes
FIX: What ended up working for this was adding single parentheses around mosquitto message (Json payload) ie: '{"Pow": 1}'