homebridge-edomoticz Plugin
Moderator: leecollings
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
It ultimately means that triggers defined on your iOS device will/should occur in realtime (hopefully) rather than when you open the app and swipe to update... Domoticz pushing change notifications in realtime essentially.
Altho the app will still (probably) do a traditionally http-based pull of sensors on-open, the data there should already be completely up-to-date.
Altho the app will still (probably) do a traditionally http-based pull of sensors on-open, the data there should already be completely up-to-date.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
Re: eDomoticz Homebridge-Plugin
Ops....eheheh....I am quite new with Domoticz....Marci wrote:You're not getting how things work - we spool up a fake web server that imitates Domoticz by serving YOUR JSON output, which replicates your sensor exactly, therefore, the JSON output we're using is exactly as you shared earlier in the thread - a direct copy & paste.
This evening I will try to completely remove the homebridge-plugin and try a new fresh install....
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Have just committed updates for the majority of the remaining sensor types to the mqtt-integration branch... (day off work!)TheRamon wrote:You should then restart homebridge on your Pi and see the messages coming in!
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
I am using a docker version of domoticz so I'm not sure it had the mqtt stuff so now I'm running it on the pi where homebridge runs.TheRamon wrote:
Yep, you need a broker. !
Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
-
- Posts: 53
- Joined: Thursday 11 August 2016 18:41
- Target OS: Raspberry Pi / ODroid
- Domoticz version: beta
- Location: The Netherlands
- Contact:
Re: eDomoticz Homebridge-Plugin
Hi Guys,
Sorry to jump in here.
I'm a Homeseer user and using the Homebridge shim for Homeseer based on the same architecture.
I read that you also implemented Custom HomeKit Types, like:
General kWh power meters - Types: General, Current, Usage; SubType: kWh, Electric (inc CurrentCost USB)
YouLess Meter (Current, Total and Today Total Consumption) - Type: YouLess Meter; SubType: YouLess counter
EvoHome / OpenTherm Thermostat support - Types: Heating, Thermostat; SubTypes: Zone, SetPoint
General Usage % meters (eg: Motherboard Sensors Hardware Device - CPU %, Mem %, HDD % etc) - Type: General; SubType: Percentage
Temperature, Temp + Humidity, Temp + Humidity + Baro (Current Temperature, Current Humidity, Current Pressure in hPA) - Type: Temp, Temp + Humidty, Temp + Humidity + Baro
DarkSkies Virtual Weather Station Sensors (Wind, Solar Radiation, Rainfall, Visibility, Barometer)
Location Sensor - any Domoticz text sensor with "Location" in it's title, for use with custom GeoFence / Bluetooth scripts.
Because the types not supported by HomeKit itself, I was wondering how you did this?
Many thanks in advance,
Rien
Sorry to jump in here.
I'm a Homeseer user and using the Homebridge shim for Homeseer based on the same architecture.
I read that you also implemented Custom HomeKit Types, like:
General kWh power meters - Types: General, Current, Usage; SubType: kWh, Electric (inc CurrentCost USB)
YouLess Meter (Current, Total and Today Total Consumption) - Type: YouLess Meter; SubType: YouLess counter
EvoHome / OpenTherm Thermostat support - Types: Heating, Thermostat; SubTypes: Zone, SetPoint
General Usage % meters (eg: Motherboard Sensors Hardware Device - CPU %, Mem %, HDD % etc) - Type: General; SubType: Percentage
Temperature, Temp + Humidity, Temp + Humidity + Baro (Current Temperature, Current Humidity, Current Pressure in hPA) - Type: Temp, Temp + Humidty, Temp + Humidity + Baro
DarkSkies Virtual Weather Station Sensors (Wind, Solar Radiation, Rainfall, Visibility, Barometer)
Location Sensor - any Domoticz text sensor with "Location" in it's title, for use with custom GeoFence / Bluetooth scripts.
Because the types not supported by HomeKit itself, I was wondering how you did this?
Many thanks in advance,
Rien
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
I don't think I'm using the domoticz SD image so not sure I have MQTT installed. Its in the hardware and I have added it but there is an error in the log. I assume I have to follow this wiki to get the blocker installed? https://www.domoticz.com/wiki/MQTT
Re: eDomoticz Homebridge-Plugin
Ok, I think to have found the bug.Marci wrote:You're not getting how things work - we spool up a fake web server that imitates Domoticz by serving YOUR JSON output, which replicates your sensor exactly, therefore, the JSON output we're using is exactly as you shared earlier in the thread - a direct copy & paste.
PLease try to add 2 mov sensors....
I have 1 X10 Security motion sensor (DS90) and 1 X10 Standard motion sensor (MS13).
Whichever sensor I add as second sensor, it remain a simple switch and not a movement sensor.
I tried to delete both and then added first the MS13 (and it got the correct status as movement sensor) and then added the DS90 and it was identified as a standard switch.....
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
So I'm not sure what's going on but the broker seems up as I can connect to it from my laptop and see the total messages increase but I cannot subscribe to domoticz/out, domoticz log shows me it connects so no idea now what's going on
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Give me the JSON output for your two sensors.chrispazz wrote:Ok, I think to have found the bug.Marci wrote:You're not getting how things work - we spool up a fake web server that imitates Domoticz by serving YOUR JSON output, which replicates your sensor exactly, therefore, the JSON output we're using is exactly as you shared earlier in the thread - a direct copy & paste.
PLease try to add 2 mov sensors....
I have 1 X10 Security motion sensor (DS90) and 1 X10 Standard motion sensor (MS13).
Whichever sensor I add as second sensor, it remain a simple switch and not a movement sensor.
I tried to delete both and then added first the MS13 (and it got the correct status as movement sensor) and then added the DS90 and it was identified as a standard switch.....
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
If you can't subscribe to the topic thru a client, then nor will the plugin be able to subscribe to it.deejc wrote:So I'm not sure what's going on but the broker seems up as I can connect to it from my laptop and see the total messages increase but I cannot subscribe to domoticz/out, domoticz log shows me it connects so no idea now what's going on
In Domoticz Web UI > Setup > Hardware, select your MQTT device, scroll down... what is it's Publish Topic dropdown set to? This must be set to 'out' (and ONLY 'out'). Assuming broker is on the same machine, remote address should be 127.0.0.1 and port 1883
Data Timeout should be disabled. Username and password blank (unless you've manually configured security in your broker).
You should then be able to point any client to your broker on port 1883, and subscribe to the topic domoticz/out
So, in MQTT.fx on your laptop, click the cog up by the profile in top left, broker address = pi ip address. broker port = 1883. Click OK. Click Connect.
Click 'subscribe', then in the dropdown simply type in domoticz/out and hit subscribe. You should see messages start to fill the right-hand pane whenever a device in Domoticz changes. Manually flip some switches in the DomoticzUI and you should see a corresponding message for the changed device state. Once you've got to this point, you should be able to get the plugin working using 127.0.0.1, port 1883 for the MQTT details in config.json
Last edited by Marci on Thursday 11 August 2016 21:14, edited 1 time in total.
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
I have pointed the client at the broker subscribed to the topic and I get nothing , in domoticz I selected only out if I publish a message to the topic the client receives it
2016-08-11 20:06:12.975 MQTT: Connecting to 172.16.30.155:1883
2016-08-11 20:06:13.076 MQTT: connected to: 172.16.30.155:1883
2016-08-11 20:06:13.177 MQTT: Subscribed
Sent from my iPhone using Tapatalk
2016-08-11 20:06:12.975 MQTT: Connecting to 172.16.30.155:1883
2016-08-11 20:06:13.076 MQTT: connected to: 172.16.30.155:1883
2016-08-11 20:06:13.177 MQTT: Subscribed
Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Re: eDomoticz Homebridge-Plugin
first is MS13 and second is DS90
Code: Select all
{
"ActTime" : 1470942825,
"ServerTime" : "2016-08-11 21:13:45",
"Sunrise" : "06:16",
"Sunset" : "20:31",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "Off",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 3,
"HardwareName" : "X10",
"HardwareType" : "Mochad CM15Pro/CM19A bridge with LAN interface",
"HardwareTypeVal" : 37,
"HaveDimmer" : false,
"HaveGroupCmd" : true,
"HaveTimeout" : false,
"ID" : "65",
"Image" : "Light",
"IsSubDevice" : false,
"LastUpdate" : "2016-08-11 21:09:03",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 0,
"Name" : "AL_Movimento Sala",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : 0,
"Status" : "Off",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "X10",
"SwitchType" : "Motion Sensor",
"SwitchTypeVal" : 8,
"Timers" : "false",
"Type" : "Lighting 1",
"TypeImg" : "motion",
"Unit" : 5,
"Used" : 1,
"UsedByCamera" : false,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "87"
}
],
"status" : "OK",
"title" : "Devices"
}
Code: Select all
{
"ActTime" : 1470942879,
"ServerTime" : "2016-08-11 21:14:39",
"Sunrise" : "06:16",
"Sunset" : "20:31",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "No Motion",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 3,
"HardwareName" : "X10",
"HardwareType" : "Mochad CM15Pro/CM19A bridge with LAN interface",
"HardwareTypeVal" : 37,
"HaveDimmer" : false,
"HaveGroupCmd" : false,
"HaveTimeout" : false,
"ID" : "AF4080",
"LastUpdate" : "2016-08-11 20:16:51",
"MaxDimLevel" : 0,
"Name" : "AL_Movimento Camera",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "No Motion",
"StrParam1" : "",
"StrParam2" : "",
"SubType" : "X10 security motion",
"SwitchType" : "Security",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "Security",
"TypeImg" : "security",
"Unit" : 0,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "88"
}
],
"status" : "OK",
"title" : "Devices"
}
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
See edits in post above.deejc wrote:I have pointed the client at the broker subscribed to the topic and I get nothing , in domoticz I selected only out if I publish a message to the topic the client receives it
2016-08-11 20:06:12.975 MQTT: Connecting to 172.16.30.155:1883
2016-08-11 20:06:13.076 MQTT: connected to: 172.16.30.155:1883
2016-08-11 20:06:13.177 MQTT: Subscribed
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Ok sooooo, strange goings on, I published a load of messages from the client to domoticz/out just with test in them and then all of a sudden it seems domoticz started pushing messages as well as I got a flood of them
Sent from my iPhone using Tapatalk
Sent from my iPhone using Tapatalk
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Look at the code for your second device... Second Device's "SwitchTypeVal" is 0. It should be 8, same as the first. This is a problem with Domoticz, not the plugin. Domoticz is assigning the wrong SwitchTypeVal to the second sensor for whatever reason. Open an issue in the relevant bit of the forum for Domoticz bugs.chrispazz wrote:first is MS13 and second is DS90
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
Re: eDomoticz Homebridge-Plugin
Ok, thank you!
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Can take a while for the services to initialise. So, if you now see messages via your client when you flip switches in the Domoticz UI, you're ready to get the plugin up and running...deejc wrote:Ok sooooo, strange goings on, I published a load of messages from the client to domoticz/out just with test in them and then all of a sudden it seems domoticz started pushing messages as well as I got a flood of them
Config.json:
Code: Select all
{
"bridge": {
"name": “Homebridge”,
"username": "CC:21:3E:E4:DE:33”,
"port": 51826,
"pin": "031-45-154”
},
"description": "Configuration file for (e)xtended Domoticz platform.”,
"platforms": [
{
"platform": “eDomoticz”,
"name": “eDomoticz”,
"server": “127.0.0.1”,
"port": “8080”,
"ssl": 0,
"roomid": 0,
"mqttenable": 1,
"mqttserver": “127.0.0.1”,
"mqttport": “1883”,
"mqttauth": 0, //only needed if you've password protected mosquitto via mosquitto.conf
"mqttuser": "", //only needed if you've password protected mosquitto via mosquitto.conf
"mqttpass": "" //only needed if you've password protected mosquitto via mosquitto.conf
}
],
"accessories": []
}
Code: Select all
[Thu Aug 11 2016 20:03:55 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Temperature (LR3) (Type: Temp, SubType: LaCrosse TX3, swType: undefined)
[Thu Aug 11 2016 20:03:55 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Household Power (Type: Usage, SubType: Electric, swType: undefined)
[Thu Aug 11 2016 20:03:55 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Shed Motion (Type: Light/Switch, SubType: Switch, swType: 8)
[Thu Aug 11 2016 20:03:58 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Pond Motion (Type: Light/Switch, SubType: Switch, swType: 8)
[Thu Aug 11 2016 20:04:00 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Pond Motion (Type: Light/Switch, SubType: Switch, swType: 8)
[Thu Aug 11 2016 20:04:00 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Central Heating (Type: Lighting 1, SubType: X10, swType: 0)
[Thu Aug 11 2016 20:04:01 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Household Power (Type: Usage, SubType: Electric, swType: undefined)
[Thu Aug 11 2016 20:04:04 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Shed Motion (Type: Light/Switch, SubType: Switch, swType: 8)
[Thu Aug 11 2016 20:04:07 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Household Power (Type: Usage, SubType: Electric, swType: undefined)
[Thu Aug 11 2016 20:04:13 GMT+0100 (BST)] [eDomoticz] MQTT Message received for Household Power (Type: Usage, SubType: Electric, swType: undefined)
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
all good now, not sure why it only just started working as i had it up and running all day.. anyway the Home app is responding immediately to gui changes i make in domoticz, Another amazing job, cheers !!!
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
- deejc
- Posts: 168
- Joined: Tuesday 22 September 2015 18:50
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.5641
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
should i put log rotate on the home bridge log now as it'll probably end up massive wont it ?
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
- Marci
- Posts: 531
- Joined: Friday 22 January 2016 18:00
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 3.8153
- Location: Wakefield, West Yorkshire UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Can do, aye...
Extended Domoticz homebridge-plugin for latest Homebridge - adds temp/humidity/pressure sensors, power consumption sensors, DarkSkies virtual weather station support, YouLess Meter support, general % usage support & switch/lamp status checking!
Who is online
Users browsing this forum: No registered users and 1 guest