Search found 11 matches

by Posiek
Saturday 15 April 2017 0:02
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

FINALLY! SweetPants thank you so much for your support and I should apologize for stupid mistake, becouse I found it. Solution as I said few post ago was simple - I make my bash script in Windows environment and it have DOS format. After copy to Linux it doesn't work properly. Now I write this ...
by Posiek
Friday 14 April 2017 21:47
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

i'm out of options to try. My script looks like: #!/bin/sh TOPIC=/Device/$1/in; MESSAGE={\"switch\":\"$2\"}; mosquitto_pub -h localhost -p 1884 -q 2 -r -u <username> -P <password> -t $TOPIC -m $MESSAGE PS: I use authentication and a different port on my broker, but that should not make any ...
by Posiek
Friday 14 April 2017 20:13
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

yes, i would try. Just run the ./updatebeta script from the domoticz directory. But pleas make a backup of your database first Of course backup is the basis. Domoticz updated and version now is 3.7320 but still nothing... I'm sure the problem is a tiny mistake :evil: Post your script an i can give ...
by Posiek
Friday 14 April 2017 20:01
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

SweetPants wrote:yes, i would try. Just run the ./updatebeta script from the domoticz directory. But pleas make a backup of your database first
Of course backup is the basis. Domoticz updated and version now is 3.7320 but still nothing... I'm sure the problem is a tiny mistake :evil:
by Posiek
Friday 14 April 2017 19:39
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

Well I use this all the time and works fine. I only run the latest Beta instead of latest stable like you do. Maybe I should try to install on Windows Beta version and test it, but what about command? I guess I have to install mqtt for windows... It should work under Raspberry Linux just perfect. i ...
by Posiek
Friday 14 April 2017 19:35
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

Well I use this all the time and works fine. I only run the latest Beta instead of latest stable like you do. Maybe I should try to install on Windows Beta version and test it, but what about command? I guess I have to install mqtt for windows... EDIT My Broker on RPi should be universal for all ...
by Posiek
Friday 14 April 2017 19:12
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

Now you do not have any errors, can you subscribe to the same topic now to see if the command is executed by domoticz? I'm not sure that is proper way - nothing happen in SSH window (clicked few times): http://www.posiekdesign.ehost.pl/iot/mqtt-sub.jpg and below test with second PuTTy window and ...
by Posiek
Friday 14 April 2017 17:58
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

Bash script have default bash header Can you change this to: #!/bin/sh I changed that, but still doesn't work. But I don't have error in my logs: 2017-04-14 17:57:46.581 User: Admin initiated a switch command (17/SH_O70_Switch/On) 2017-04-14 17:57:46.581 (MQTT Switch) Light/Switch (SH_O70_Switch ...
by Posiek
Friday 14 April 2017 11:55
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

What domoticz version are you running? And how does the script look like? Have you tried: script://home/pi/domoticz/scripts/bash/script_sh070_off.sh (only 2 x /) My Domoticz version is 3.5877. Bash script have default bash header and 1 line with mosquitto_pub -t "/my/subject/" -m "message" and ...
by Posiek
Thursday 13 April 2017 22:51
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Re: Creating in domoticz light switch to use with MQTT

You can create a "dummy switch" and use the On/Off action to run the mosquitto_pub command (in a script) Thanks for your answer. I tried something like this, but It doesn't work: script:///home/pi/domoticz/scripts/bash/script_sh070_off.sh I tested this script in Putty and works fine. What I'am ...
by Posiek
Friday 07 April 2017 14:39
Forum: Other questions and discussions
Topic: Creating in domoticz light switch to use with MQTT
Replies: 19
Views: 6692

Creating in domoticz light switch to use with MQTT

Hi,
I'm trying to create light switch which will use mosquitto_pub with my custom subject and message, but I can't find this option. Maybe someone use that before? I want to send command to my sonoff with custom firmware.

Thanks in advance.