arachnetech / homebridge-mqttthing Goto Github PK
View Code? Open in Web Editor NEWA plugin for Homebridge allowing the integration of many different accessory types using MQTT.
License: Apache License 2.0
A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
License: Apache License 2.0
Hey!
First of all: Thank you for your amazing work.
The Sonoff b1 ist working great with mqttthing exept warmwhite
Is there a chance to set CCWW?
For Tasmota this should work but i cant find a option in mqttthing for it.
Color | RRGGBBCCWW | (Sonoff B1) Set color to RRGGBBCCWW hexadecimal value
Color | CCWW | (Sonoff Led) Set color to CCWW hexadecimal value
Kind Regards from Germany
Robert
Hi there ...
perhaps someone can help me ?!
I installed MQTT on a ESP8266/BME280 with ESPEasy and configured an OpenHAB MQTT Profile,
like in this howto:
https://www.bastelgarage.ch/index.php?route=extension/d_blog_module/post&post_id=15
Than I installed on another ESO8266 a MQTT Broker.
The Broker gets the Data from the other ESP:
received topic '/wohnung/xxx/temperature' with data '21.53'
received topic '/wohnung/xxx/humidity' with data '36.44'
received topic '/wohnung/xxx/pressure' with data '1015.76'
But when i put the config in my homebridge no temp and no humidity will be shown.
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "ESP01 Test Temp",
"url": "http://192.168.2.xxx:1883",
"topics": {
"getCurrentTemperature": "/wohnung/laura/temperature"
}
},
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "ESP01 Test Humidity",
"url": "http://192.168.2.xxx:1883",
"username": "ESP_01",
"password": "ESP_01",
"topics": {
"getCurrentRelativeHumidity": "/wohnung/laura/humidity"
}
}
What did i do wrong? Please hekp ;)
CU Kai
I tried to connect to my secure MQTT broker by using port 8883 in the URL but it didn't work.
I guess TLS isn't implemented, but if it is so I need to put a link to the cert file in the config?
Thanks
Asking again for a possible improvement.
I'm looking to put a ESP with two contact sensors(one for door open, second for door closed) and a relay near my garage door motor.
Currently this plugin only has the possibility to get MQTT message with a payload which describes the state. Would it be possible to get the two different MQTT messages from the contact sensors?
Like this plugin, but only with MQTT not with GPIO:
https://github.com/benlamonica/homebridge-rasppi-gpio-garagedoor
Also it would be awesome if the state would always be updated according to the state of contact sensors. So if I open it manually the state would be right on the home app.
Hi, I'm trying to use smoke sensor but it doesn't work.
I already use with success a lot of your other services.
I configured config.json and with a mqtt client I trying to alarm the sensor publishing 1 or 0 in the topic name, but nothing happen... (integervalue = true)
I thing that there is a missing comma at the endo of the following line:
""getSmokeDetected": """ but I already added.
Please, can you help me?
Thanks
Big fan of this homebridge plugin. Other MQTT related plugins were a hard to wrap ones head around, but this couldn't be easier. More of a question as opposed to an issue, but what are the best practices for naming topics for multiple accessories of the same type?
For example, given the following configuration, how should I modify it if I have 2 or 3 accessories that do the same thing?
{ "accessory": "mqttthing", "type": "switch", "name": "fireplace", "topics": { "getOn": "fireplace/getOn", "setOn":"fireplace/setOn", }, "integerValue": true }
Should I just name them "fireplace1", "fireplace2", etc. and have topics "fireplace1/getOn", "fireplace2/getOn", etc? I guess that would mean I need to hardcode the "fireplace1" topic component into my accessory, which seems less than ideal...
Great plugin. I soon have replaced all my plugins with only this one. But some features are still missing and this issue is about one of them :)
I have a H801 RGBWW controller flashed with Tasmota. It has RGB, warm White and cold White channels.
Mqttthing currently doesn't support RGBWW so the temperature slider in home app does not change the temperature with the warm white and cold white channels.
Would it be possible to add RGBWW support.
As the #10 feature request about LWT was implemented it now would be good to have the possibilities to configure onlineValue
and offlineValue
values.
I'm using Tasmota and it needs "Online" and "Offline" as values.
mqttthing already has configurable values for onValue
and offValue
. The same concept for LWT would make this plugin versatile.
You think there's any chance of adding a 'type' that it suitable for RGB devices programmed with the ESPurna firmware? It seems to want MQTT messages slightly incompatible with the current "Light" type.
On and Off can be made to work, but brightness wants a value between 0 and 255 instead of 0 and 100, and the colour controls won't work at all.
The message types are here https://github.com/xoseperez/espurna/wiki/MQTT#lights
I use node-red to read a switch published on mqtt, but when i reload node-red it don't get the status in..
could it be an idea to be able to set MQTT "retain" on certain accessory in homebridge-mqttthing ;-).
Please add CO2 Accessories
Hi,
I have two topics from the same device (ESPURNA-192102 with SHT30 sensor) and I get the above mentioned error.
How should I change my configuration file?
Here is the config
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "SHT30",
"caption": "Humidity",
"url": "",
"username": "",
"password": "",
"topics": {
"getCurrentRelativeHumidity": "ESPURNA-192102/humidity",
"getStatusActive": "ESPURNA-192102/status",
"getStatusFault": "",
"getStatusTampered": "",
"getStatusLowBattery": ""
}
},
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "SHT30",
"caption": "Temperature",
"url": "",
"username": "",
"password": "",
"topics": {
"getCurrentRelativeHumidity": "ESPURNA-192102/temperature",
"getStatusActive": "ESPURNA-192102/status",
"getStatusFault": "",
"getStatusTampered": "",
"getStatusLowBattery": ""
}
},
Here is the error message:
[2018-9-4 01:36:17] [SHT30] Initializing mqttthing accessory...
/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264
throw new Error("Cannot add a bridged Accessory with the same UUID as another bridged Accessory: " + existing.UUID);
^
Error: Cannot add a bridged Accessory with the same UUID as another bridged Accessory: 9cb50972-5af3-4559-a7f8-1eacf979fae4
at Bridge.Accessory.addBridgedAccessory (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:264:13)
at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:300:18)
at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:43:10)
at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:652:30)
at Object.Module._extensions..js (module.js:663:10)
at Module.load (module.js:565:32)
at tryModuleLoad (module.js:505:12)
at Function.Module._load (module.js:497:3)
at Function.Module.runMain (module.js:693:10)
at startup (bootstrap_node.js:191:16)
at bootstrap_node.js:612:3
homebridge.service: Main process exited, code=exited, status=1/FAILURE
homebridge.service: Unit entered failed state.
homebridge.service: Failed with result 'exit-code'.
homebridge.service: Service hold-off time over, scheduling restart.
Stopped Node.js HomeKit Server.
I'm trying to get the temperature reading from a DS18B20 sensor connected to Sonoff tasmota.
What should the correct MQTT topic be?
cmnd/sonoff_test/status -m 10
will return this:
stat/sonoff_test/STATUS10 {"StatusSNS":{"Time":"2018-09-08T09:39:41","Switch1":"OFF","Switch2":"ON","DS18B20":{"Temperature":25.3},"TempUnit":"C"}}
How can I extract the temperature reading from there?
Please add a value to motion sensor which disables the motion After several Seconds
Hi, the Ikea Tradfri Brightness values must be in the 0-255 range format, but Homekit sends 0-100, can you add a new multiplier value (or something like that) for adapting the range mismatching?
Thanks in advance
Hello @arachnetech,
mqttthing is great and i convert my espeasy sensor for openhab to homebridge. however I found that it always show 0 when the temperature down to below zero. at the same time openhab is working find and if I manually subscribe to the topic, it shows the correct number.
Thanks for the help.
Hi there,
Will it be possible to add a GarageSensor?
Regards,
Jo
Hello again :) there were problems with LWT. I don't know if you can influence it or not. After restarting homebridge all mqtt devices write offline. if I reboot the esp device, everything is fine.
Hi,
I have an mqttthings Security System Switch in one instance of home bridge, with a copy of it in another instance of home bridge. I want to sync the state between the two. When I change the status in one instance I see the message published to the topic, but the other instance will change to a status like "Arming" or "Disarming" with a loading icon, but never updates to reflect what's published to the topic.
I have tried using a simple switch in the above setup and the state of the switch is reflected in each instance (i.e it works as expected)
I've tried looking at the home bridge log files but nothing relevant is logged in them...
Hi,
i set this to true, but still get no logging, even with Debug mode of homebridge.
Bug or my fault?
"logMqtt": "true",
Thank you!
Possible to add lockmechanism Service ?
would really love to be able to use hcsr04 ultrasonic sensor to be able to tell if garage door open/closed. any chance support for this sensor might be coming?
I'm sorry! I can not find a setting that indicates the availability of the device. How to make it show when the device is not in the state. that the device is unavailable.
topic /esp/status/LWT
payload_available: "Online"
payload_not_available: "Offline"
Thank you very much!
How add fan accessory ? After entering the "type": "fan", homebridge does not start.
Hi,
I have a very similar configuration to closed issue #27
{
"accessory": "mqttthing",
"type": "contactSensor",
"name": "sensor_1",
"url": "mqtt://192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "sonoff_rf",
"topics":
{
"getContactSensorState": {
"topic": "tele/sonoff_rf/RESULT",
"apply": "return JSON.parse(message).RfReceived.Data;"
}
},
"onValue": "6F5321",
"offValue": "79FAE1",
"logMqtt": true
}
my sonoff rf bridge in the console show
13:37:11 MQT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":12380,"Low":400,"High":1210,"Data":"79FAE1","RfKey":"None"}}
13:37:13 MQT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":12420,"Low":400,"High":1210,"Data":"6F5321","RfKey":"None"}}
and homebridge logMqtt show
[1/20/2019, 1:01:25 PM] [sensor_1] Received MQTT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":12390,"Low":400,"High":1210,"Data":"79FAE1","RfKey":"None"}}
[1/20/2019, 1:01:28 PM] [sensor_1] Received MQTT: tele/sonoff_rf/RESULT = {"RfReceived":{"Sync":12410,"Low":400,"High":1210,"Data":"6F5321","RfKey":"None"}}
the problem is that the "onValue" option: "6F5321" works properly and triggers sensor_1 "open" while the "close" state triggers "offValue": "79FAE1" or any value eg "offValue": "111111".
This means that you can not assign specific 2 values to a specific sensor.
"offValue": "111111" or "offValue": "79FAE1" close all sensors
Can I ask for help in proper configuration
Regards
Marcin Kowalik
I was thinking that if the Wiki was enabled then people could share their settings for various devices. For example, I'm using the CE Smart WIFI Smart Dimmer from Costco, flashed with Sonoff-Tasmota and thought others would like my configuration to me things easier for them to setup.
{
"accessory": "mqttthing",
"type": "lightbulb",
"name": "Beside Stairs",
"caption": "Test Caption",
"topics":
{
"getOn": "stat/sonoff-0685/POWER",
"setOn": "cmnd/sonoff-0685/power",
"getBrightness": {
"topic": "stat/sonoff-0685/RESULT",
"apply": "return JSON.parse(message).Dimmer;"
},
"setBrightness": "cmnd/sonoff-0685/dimmer"
},
"onValue": "ON",
"offValue": "OFF"
},
hi there,
thanks for this plug in, works fine.
here: I've two MQTT commands, the first arms my Security System, the other one disams it.
It's not clear what - and how, which syntax - to configure here:
{
"getCurrentState": "",
"setTargetState": ""
},
"currentStateValues": "<array of 5 values corresponding to security system current states (optional)>",
"targetStateValues": "<array of 4 values corresponding to security system target states (optional)>"
and, what about
"onValue": "<value representing on (optional)>",
"offValue": "<value representing off (optional)>"
common fields?
can you please provide some kind of explanation/example?
thanks a lot!
A suggestion to add a percentage sensor to homebridge-mqqting.
I have a weather station https://www.itead.cc/sonoff-sc.html
I uploaded the tasmot software to the station.
mqtt console show
21:44:46 MQT: tele / sonoff / SENSOR = {"Time": "2019-01-20T21: 44: 46", "SonoffSC": {"Temperature": 26.0, "Humidity": 39.0, "Light": 80, "Noise" 20 "AirQuality": 100}, "TempUnit", "C"}
in homebridge-mqtting there are sensors for temperature and humidity. they work properly. however, the station gives light also in percent, not in lux. Other values, Noise and AirQuality are also in the range of 0% - 100%.
I added the configuration
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "Temperatura",
"url": "mqtt: //192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "temperature",
"Topics":
{
"getCurrentTemperature": {
"topic": "tele / sonoff / SENSOR",
"apply": "return JSON.parse (message) .SonoffSC.Temperature;"
}
}
}
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "Wilgotność",
"url": "mqtt: //192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "humidity",
"Topics":
{
"getCurrentRelativeHumidity": {
"topic": "tele / sonoff / SENSOR",
"apply": "return JSON.parse (message) .SonoffSC.Humidity;"
}
}
}
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "Oświetlenie",
"url": "mqtt: //192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "sonoff_sc",
"Topics":
{
"getCurrentRelativeHumidity": {
"topic": "tele / sonoff / SENSOR",
"apply": "return JSON.parse (message) .SonoffSC.Light;"
}
}
}
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "Hałas",
"url": "mqtt: //192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "noise",
"Topics":
{
"getCurrentRelativeHumidity": {
"topic": "tele / sonoff / SENSOR",
"apply": "return JSON.parse (message) .SonoffSC.Noise;"
}
}
}
{
"accessory": "mqttthing",
"type": "humiditySensor",
"name": "Jakosć powietrza",
"url": "mqtt: //192.168.4.10",
"username": "admin",
"password": "123456",
"caption": "air quality",
"Topics":
{
"getCurrentRelativeHumidity": {
"topic": "tele / sonoff / SENSOR",
"apply": "return JSON.parse (message) .SonoffSC.AirQuality;"
}
}
and it works. I add a screenshot of the home application
The problem is to give the humidity level many times. An additional general purpose percentage sensor would eliminate this inconvenience.
Regards, Marcin Kowalik
Hi!
It would be nice if you eventually add support for pressure sensor. I have an MQTT topic in which current atmospheric pressure is published as float number. For this moment I have to abuse "lightSensor" as this is the only accessory which can accept float number higher than 360 :)
Thanks.
Hi,
is there the possibility to add a last will functionality? I.e., if a device disconnects from an MQTT broker, the broker can publish a last will message for that device. This can be used to permanently indicate a device error, until the device gets back online. In such a case, the get methods of an accessory (such as the outlet) would not return anything anymore in order to indicate, that the device is offline.
Or how does homebridge currently identify a device error?
Best,
Jonathan.
Please add support Water Leak Sensor)
Thanks
StartCmd will allow to get device status on start. This should be triggered at homebridge start
"startCmd": "cmnd/lights/POWER1",
"startParameter": ""
startParameter is also really handy as it can be used in 2 ways, Empty: will return current switch state, or if value provided (ON or OFF) then it can be used to set a default value on start of homebridge.
The 'Doorbell' mode, is defined as
service = new Service.Doorbell(name);
but causes an error, it should be:
service = new Service.StatelessProgrammableSwitch(name);
Line 464 in 6a3fd0a
Hey,
when I change the garagedoor status externally, i get a notification that says that the door was for example closed, but the button in home kit shows, in this case "opening". So i think it tries to reachieve the state of before changing the door´s status extrenally
Hi there,
I'm using mqtthing for lots of tasmota accessories and it's great but i'm having issues getting my RGBW strip to use the W channel.
Colour is working great with the HSV commands but Homekit shows this as a colour light only and doesn't control the white channel at all. Setting colours directly in the console of the device is controlling all channels including so i'm not sure what i'm doing wrong here.
If I configure a second accessory (see below) targeting just the white channel I can control it and get dimming working but the power and dimming commands conflict with each other
RGB light:
{ "accessory": "mqttthing", "type": "lightbulb", "name": "RGBW LED Strip", "url": "mqtt://127.0.0.1", "username": "homebridge", "password": "***", "topics": { "getOn": "stat/sonoff_4/POWER", "setOn": "cmnd/sonoff_4/POWER", "getHSV": "stat/sonoff_4/HSBCOLOR", "setHSV": "cmnd/sonoff_4/HSBCOLOR" }, "onValue": "ON", "offValue": "OFF" },
White light:
{ "accessory": "mqttthing", "type": "lightbulb", "name": "W LED Strip", "url": "mqtt://127.0.0.1", "username": "homebridge", "password": "***", "topics": { "getOn": "stat/sonoff_4/CHANNEL4", "setOn": "cmnd/sonoff_4/CHANNEL4", "getBrightness": "stat/sonoff_4/CHANNEL4", "setBrightness": "cmnd/sonoff_4/CHANNEL4" }, "onValue": "ON", "offValue": "OFF" },
Do you know a better way to get this working?
I've used Eclipse Paho MQTT-client to verify the behavior.
I've copy-pasted Switch and GarageDoor test\config.json examples - they work fine out of the box: I see topics firing around.
When changing accessory Name in HomeBridge config to a non-latin string (like "name": "Проверка Switch"), MQTT-publish (and I guess querying) doesn't happen.
Same silence, when topic string contains non-latin chars, like:
"setOn": "test/switch/setOn" - works
"setOn": "test/свич/setOn" - doesn't reach MQTT-broker, although MQTT logging says all ok.
Please, give it a try.
P.S. I'm using 'mqtt-switch-tasmota' HB plugin with cyrillic topics and names just fine.
Thanks for this great work and hope someone can provide some help.
I use a sonoff SV (with tasmota) as garage opener. I have a reed switch connected to GPIO14 of a sonoff SV configured as Switch2. The main mqtt topic is "svgaragerelay" and the switch2 dedicated mqtt topic is called "garagesensor".
I noticed that the sonoff broadcasts mqtt telemetry messages using the main topic. The second reports the state of Switch2 (see "Switch2":"OFF"):
21:07:24 MQT: tele/svgaragerelay/STATE = {"Time":"2018-09-23T21:07:24","Uptime":"0T02:05:01","Vcc":3.151,"POWER1":"OFF","Wifi":{"AP":1,"SSId":"XXX","RSSI":100,"APMac":"XXX"}}
21:07:24 MQT: tele/svgaragerelay/SENSOR = {"Time":"2018-09-23T21:07:24","Switch2":"OFF"}
I'm trying to create an mqttthing accessory that is updated based on the reported ON/OFF status of Switch2 in the telemetry messages.
I can't find the right accessory or topic keyword to use. I'm wondering if this is possible as switch2 is embedded in the telemetry message.
Any suggestions ? Thanks
Some accessories, like move sensor, temperature, humidity, power consumption, etc. can be more useful if support the ElGato Feature or store historical data.
Thanks in advance!
Hi,
Please accept my sincere thanks for the work you have done, it has made me achieve my goal.
I'm writing this to discuss the issue I'm experiencing with Garage Door.
The Topic response for the status of the Garage is based no a reed switch, as a stand-alone sensor, it is working fine as the configuration of contact sensor is based on the topic response of "On"or "Off".
What is the way for me to make the script recognize the sensor response of Open and closed based on/off rather than "O ,C , o, c, S"etc.
Interestingly, the relay topic doesn't trigger the relay button, not sure what I'm missing, as the same relay is working with the Toggle function
Thanks for your help.
Hey.
I have managed to get working temperature from Sonoffs but I have a question about code, because I'm not java dev. Do I have to use "toFixed(1)"? For now I don't and it seems to be working...
`
{
"accessory": "mqttthing",
"type": "temperatureSensor",
"name": "BartoszTemp",
"url": "mqtt://192.168.88.10",
"username": "",
"password": "",
"caption": "",
"topics": {
"getCurrentTemperature": {
"topic": "tele/Bartosz/SENSOR",
"apply": "return JSON.parse(message).DS18B20.Temperature;"}
}
}`
@Kepete I think you will be interested in this ;)
A good enhancement must be a topic for get the battery percent of an accessory, for example, i use zigbee2mqtt for connect the Xiaomi Human Body Movement Sensor with MQTT, this software expose, also, the percent of battery life of the device in the JSON response.
If the plugin will support a topic for that will be great!
Now days i just use the low battery feature
Regards
Hello
I bought a door / window opening sensor such as here:
https://www.aliexpress.com/item/SECRUI-D026-Window-Door-Magnet-Sensor-Detector-Portable-Alarm-Sensors-Smart-Home-Detectors-Wireless-For-SECRUI/32891067687.html?spm=a2g0s.9042311.0.0.27425c0fBEEiyB
The sensor supports 3 RF codes: closed, open and tampered. I've paired the sensor with Sonoff RF Bridge with Tasmota. When I open physically, I close the sensor so I have in the console, respectively:
21:11:33 MQT: tele/rf-bridge/RESULT = {"RfReceived":{"Sync":9560,"Low":320,"High":940,"Data":"81FEE7","RfKey":3}}
21:11:42 MQT: tele/rf-bridge/RESULT = {"RfReceived":{"Sync":9560,"Low":320,"High":940,"Data":"81FEEE","RfKey":4}}
21:11:47 MQT: tele/rf-bridge/RESULT = {"RfReceived":{"Sync":9530,"Low":320,"High":940,"Data":"81FEEB","RfKey":5}}
Where:
Rf3 = open
Rf4 = closed
Rf5 = tempered
How do I set the topics in the plugin configuration to make it work properly? My config:
{
"accessory": "mqttthing",
"type": "contactSensor",
"name": "sensor1",
"url": "mqtt://192.168.99.170",
"username": "",
"password": "",
"caption": "",
"topics": {
"getContactSensorState": "cmnd/rf-bridge/RfKey3",
"getStatusActive": "",
"getStatusFault": "",
"getStatusTampered": "",
"getStatusLowBattery": ""
},
"integerValue": "",
"onValue": "ON",
"offValue": "OFF"
}
Should turnOffAfter work for switches and lightbulbs? I have a few lights I would very much light to turn off automatically (after, say 20 minutes - the ones that the kids forget). And just to confirm, the command takes an argument in ms, not seconds?
My appropriate section below:
{
"accessory": "mqttthing",
"type": "switch",
"name": "office-light",
"url": "http://192.168.1.201:1883",
"caption": "Office Light",
"topics": {
"getOn": "cmnd/office-light/status",
"setOn": "cmnd/office-light/power",
"setOff": "cmnd/office-light/power"
},
"turnOffAfter": 6000,
"logMqtt": false,
"integerValue": true,
"manufacturer": "ITEAD"
},
If in the Home app I don't turn on the light bulb but instead long press and then change color, it works, but doesn't show the correct ON/OFF state. The light bulb turns to RED and it shows OFF in home app as the state.
Mqttthigns should toggle the state to ON as soon as any input is received to change color.
Hello,
first of all thanks for this incredible Plugin! But it need the ability to integrate Shutters. Is there a possibility to integrate this feature the next weeks?
I am using the awesome Devices of Shelly which are open source. Maybe this part of the API Reference will help you:
MQTT in Roller mode
When configured to operate in roller mode, MQTT topics used by Shelly Switch are:
shellies/shellyswitch-/roller/0 reports the current state: open, close while in motion, stop when not moving.
shellies/shellyswitch-/roller/0/command accepts open, close and stop.
If you are not able to integrate this the next weeks, please write me some instructions that I can do instead.
I know I must be missing something simple, but with mosquitto I can issue
mosquitto_pub -h 192.168.1.201 -t cmnd/office-light/power -m 1
mosquitto_pub -h 192.168.1.201 -t cmnd/office-light/power -m 0
A sonoff flashed with tasmota firmware turns on and off without issue (as above). What (newbie warning here) is the appropriate line for the config.json file?
I currently have the following in the homebridge config file:
{ "accessory": "mqttthing", "type": "switch", "name": "office-light", "topics": { "getOn": "cmnd/office-light/status", "setOn": "cmnd/office-light/power" }, "logMqtt": true, "integerValue": true, "turnOffAfterms": 20000 },
PS - Is there a forum for such issues?
Hi I'm setting up Homebridge to connect to a Victron Color Controller (Venus OS) using your plugin.
The problem I've got is the device requires a keepalive publish sent every 30 seconds, otherwise it stops broadcasting anything. I have it working nicely manually by setting up a switch to send the suggested 'keepalive' broadcast (R/[myDeviceIDHere]/system/0/Serial), so activating the switch in the home app happily starts showing the other values for 30 seconds, then they go back to 0.
Any ideas what the best way to implement this is so it's regularly sending a broadcast?
Also a side note, your example code for applying functions doesn't work with the Victron gear, as it stops broadcasting the javascript fails with an error. I added a simple check to ensure the value exists before using it. Here's my config so far:
{ "accessory": "mqttthing", "type": "temperatureSensor", "name": "Voltage", "url": "http://192.168.1.101:1883", "mqttOptions": { "keepalive": 30 }, "topics": { "getCurrentTemperature": { "topic": "N/[myDeviceIDHere]/battery/258/Dc/0/Voltage", "apply": "return (message!='') ? JSON.parse(message).value.toFixed(0) : 0;" } }, "logMqtt": true }, { "accessory": "mqttthing", "type": "humiditySensor", "name": "Battery", "url": "http://192.168.1.101:1883", "mqttOptions": { "keepalive": 30 }, "topics": { "getCurrentRelativeHumidity": { "topic": "N/[myDeviceIDHere]/battery/258/Soc", "apply": "return (message!='') ? JSON.parse(message).value.toFixed(0) : 0;" } }, "logMqtt": true }, { "accessory": "mqttthing", "type": "outlet", "name": "Victron Keepalive", "url": "http://192.168.1.101:1883", "mqttOptions": { "keepalive": 30 }, "topics": { "setOn": "R/[myDeviceIDHere]/system/0/Serial", "getOn": { "topic": "N/[myDeviceIDHere]/battery/258/Soc", "apply": "return (message!='') ? true : false;" } }, "logMqtt": true }
The doorbell isn't recognised by the Home app. It shows as 'Not Supported'.
According to Samfox2/homebridge-doorbell#7, the doorbell service has to be attached to a video doorbell. I haven't tried this yet.
I have tried adding a motion sensor service. That just makes it look like a motion sensor in the Home app.
I have a problem updating the light switches. Works correctly when I turn on / off the light in the Home App on iOS or in the plugin accessories at homebridge-ui-x. However, it does not work as I turn it off I turn off the light with a physical switch on the wall (sonoff touch T1). What do I have wrong in configuration?
Take a look at the video: https://youtu.be/ZjzXG4jKIPk
My config:
{
"accessory": "mqttthing",
"type": "lightbulb",
"name": "Sypialnia światło",
"url": "mqtt://192.168.99.100",
"username": "",
"password": "",
"caption": "",
"topics": {
"getOn": "stat/sypialnia/Power",
"setOn": "cmnd/sypialnia/Power",
"stateGet": "tele/sypialnia/STATE"
},
"integerValue": "true",
"onValue": "ON",
"offValue": "OFF"
}
Hello,
I am trying to use your lovely module but i seem to have hit a wall.
{
"accessory": "mqttthing",
"type": "securitySystem",
"name": "Parter",
"url": "mqtt://localhost",
"topics": {
"getCurrentState": "<topic used to get security system current state>",
"setTargetState": "paradox/control/partitions/Parter/"
},
"currentStateValues": "<array of 5 values (optional)>",
"targetStateValues": [
"arm_stay",
"arm",
"arm_sleep",
"disarm"
]
},
The control part is working flawlessly, but i have a problem with getting the state of the alarm. The MQTT script that i am using posts the status of the alarm in multiple topics as follows:
paradox/states/partitions/Etaj/arm
paradox/states/partitions/Etaj/stay_arm
paradox/states/partitions/Etaj/sleep_arm
paradox/states/partitions/Etaj/alarm
So when i arm SLEEP the topic paradox/states/partitions/Etaj/sleep_arm will post True when i disarm it will post False.
Is there anything that can be done to make this work?
Thank you,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.