Startup failure because of "Unexpected end of input at 1:1"

I used sudo. oh and i forgot to mention I am running OH2 of Raspbian stretch and not on Openhabian.

then your sudo mkdir created tmp & cache with the following permissions:

drwxr-xr-x 2 root root

The openhab user could not write into userdata/tmp & userdata/cache

It’s the same. openHABian = Raspbian + OH2 + scripts for additional stuff (java, frontail, etc,etc).

Hmm. I thought the files were missing.

(off topic)

I got mqtt up and running but if another client changes the state of “LED” it doesnt have an affect on OH2.

It works without the perfectly without the subscribing part
Thanks

Ps.I am using NodeMcu as prototyping, Mosquitto as mqtt broker.

they were missing. OH2 process tried to re-create them and couldn’t

try with these small corrections (note: this is a bad setup with only 1 topic):

Switch myLed "led" ["Switchable"] {mqtt=">[broker:oh/led:command:ON:0],>[broker:oh/led/:command:OFF:1],<[broker:oh/led:state:default]"}

Does the MQTT endpoint (NodeMCU) publish it’s status? in which topic? (defined in the ESP code). Usually you have one topic for command and another one for status. If the endpoint does not report status… OH2 will never know if someone else toggled its switch.

Get rid of the starting and trailing slashes: it’s a bad idea in a mqtt topic

How come you use 0 for ON and 1 for OFF? :slight_smile:

Now, we are waaaaay off topic :slight_smile: maybe you want to open up a new thread to discuss mqtt.

1 Like

Inverse Logic Relay (you see we engineers love it.:rofl:)

Thanks man, You are the best,you opened up my eye(It was me who wanted same topic.:stuck_out_tongue_winking_eye:)
I had to change Nodemcu’s code(Only if you want Nodemcu_mqtt.txt (7.4 KB)
)

Got a bad habbit of it :sweat_smile:

Thats what we Indian’s are expert at(Always offtopic)

Thanks.

1 Like