It works for me OK AFAICS.
I have the triggers set to topic message becomes equal to 'CAMERAS ON' for example.
The MQTT device shows the topicMessage that has been sent.
Is your trigger on the receiving system?
gdm = indigo.devices[1989790393] # "GDM main door"
if hasattr(gdm, 'onState'):
isOn = gdm.onState
if not isOn:
indigo.device.turnOn(gdm)
gdm = indigo.devices[1989790393] # "GDM main door"
if hasattr(gdm, 'onState'):
isOn = gdm.onState
if not isOn:
# turn on subscription
import subprocess
cmd = "/usr/local/bin/mosquitto_pub -t gdm/mainDoor -m 'On'"
process = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
# launch the shell command:
out, err = process.communicate()
if err != '':
indigo.server.log(err[0:], type=u'MQTT turn-on script')
BonfireVA wrote:Is there anyway in Indigo to create "virtual devices" for things other than switches? I have used Sonoff devices with MQTT to update variables in Indigo and tied virtual switches in the interface to these variables, works great. I want to do the same with PIR, temp, and door switches I have deployed using Arduino and MQTT. I was able to update variable in Indigo for these sensors, and create control pages to display the values / states, but I would like to be able to add them as actual devices, mostly for proper integration with homebridge.
Thanks!
-Eric
FlyingDiver wrote:Try using my Masquerade plugin to make a homebridge compatible virtual device.
viewtopic.php?f=216&t=17402
BonfireVA wrote:FlyingDiver wrote:Try using my Masquerade plugin to make a homebridge compatible virtual device.
viewtopic.php?f=216&t=17402
I will take a look, thanks for the quick reply!
-Eric
BonfireVA wrote:Does the plug in support temperature sensor types? I have an Arduino that is sending results from several temp sensors using MQTT. I am using the MQTT plugin to write the temp values to variables in Indigo. If I create a new masquerade device and choose the sensor option, I can choose the MQTT plug in, and the temp sensor I want to use, but the masquerade device only gives me an on/off value, not the contents of the MQTT message (which in this case would be the temp). Is the masquerade sensor type meant for things like door/window or PIR sensors?
-Eric
FlyingDiver wrote:BonfireVA wrote:Does the plug in support temperature sensor types? I have an Arduino that is sending results from several temp sensors using MQTT. I am using the MQTT plugin to write the temp values to variables in Indigo. If I create a new masquerade device and choose the sensor option, I can choose the MQTT plug in, and the temp sensor I want to use, but the masquerade device only gives me an on/off value, not the contents of the MQTT message (which in this case would be the temp). Is the masquerade sensor type meant for things like door/window or PIR sensors?
-Eric
There's currently no temp sensor type. But I could add one fairly easily I think.
BonfireVA wrote:That would be great!
Basically a device type that can support a float or even a string value from the MQTT topic would be extremely useful and a way to tell Indigo what it is (ie temp, humidity, ambient light etc). If you are able to make some progress on adding support I could certainly help test.
-Eric
Users browsing this forum: No registered users and 23 guests