By defining the custom service and character definitions... have a look at the source on GitHub - in lib/services.js for the MQTT branch, or in index.js in the master branch.RduPre wrote: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
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:
eDomoticz Homebridge-Plugin
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
forever seems to create randomly named logs, is there a way to get it to write home bridge.log in ~/.forever ? so i can then add it to log rotate ?Marci wrote:Can do, aye...
i tried
Code: Select all
forever -l ~/.forever/homebridge.log restart /usr/local/lib/node_modules/homebridge/bin/homebridge
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:
eDomoticz Homebridge-Plugin
See https://github.com/foreverjs/forever but you'll probably need to stop it and start it rather than restart it.
Might have to use -o instead of -l and at a guess the file will need to exist.
Might have to use -o instead of -l and at a guess the file will need to exist.
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:
eDomoticz Homebridge-Plugin
Dammit - have created a problem somewhere... lasts an hour then a whole pile of sensors and switches vanish... From 65 down to 11.
MQTT branch currently broken - sorry folks!
They return after a homebridge restart, but end up vanishing again...
MQTT branch currently broken - sorry folks!
They return after a homebridge restart, but end up vanishing again...
Last edited by Marci on Thursday 11 August 2016 22:28, 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
seems it's
seems to work now, got log rotate setup for it.
i have some devices not showing properly in Home app, will go through and get the json out put but one if the you less meter not showing me anything in home app, just shows "on" and the others are netatmo air quality sensors, also just how "On"
Code: Select all
forever -a -l homebridge.log start /usr/local/lib/node_modules/homebridge/bin/homebridge
i have some devices not showing properly in Home app, will go through and get the json out put but one if the you less meter not showing me anything in home app, just shows "on" and the others are netatmo air quality sensors, also just how "On"
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
Yup - fire over json & I'll take a look over next few days.
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 thought you added youless as 1 of the first items when you first started this plugin, but this is the output for it anyway
and here is one of the air quality
Code: Select all
{
"ActTime" : 1470948170,
"ServerTime" : "2016-08-11 21:42:50",
"Sunrise" : "05:42",
"Sunset" : "20:29",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"Counter" : "19311.648",
"CounterToday" : "10.000 kWh",
"CustomImage" : 0,
"Data" : "19311.648 kWh 338 Watt",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 4,
"HardwareName" : "youless",
"HardwareType" : "YouLess Meter with LAN interface",
"HardwareTypeVal" : 6,
"HaveTimeout" : false,
"ID" : "80",
"LastUpdate" : "2016-08-11 21:42:43",
"Name" : "YouLess",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2 ],
"Protected" : false,
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "YouLess counter",
"SwitchTypeVal" : 0,
"Timers" : "false",
"Type" : "YouLess Meter",
"TypeImg" : "counter",
"Unit" : 1,
"Usage" : "338 Watt",
"Used" : 1,
"ValueQuantity" : "",
"ValueUnits" : "",
"XOffset" : "0",
"YOffset" : "0",
"idx" : "2"
}
],
"status" : "OK",
"title" : "Devices"
}
Code: Select all
[8/11/2016, 9:50:55 PM] [eDomoticz] { Battery: 255,
RSSI: 12,
dtype: 'YouLess Meter',
id: '80',
idx: 2,
name: 'YouLess',
nvalue: 0,
stype: 'YouLess counter',
svalue1: '19311697',
svalue2: '436',
unit: 1 }
Code: Select all
{
"ActTime" : 1470948301,
"ServerTime" : "2016-08-11 21:45:01",
"Sunrise" : "05:42",
"Sunset" : "20:29",
"result" : [
{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "614 ppm",
"Description" : "",
"Favorite" : 1,
"HardwareID" : 3,
"HardwareName" : "netatmo",
"HardwareType" : "Netatmo",
"HardwareTypeVal" : 54,
"HaveTimeout" : false,
"ID" : "00BD",
"LastUpdate" : "2016-08-11 21:35:11",
"Name" : "Lounge Air Quality",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2 ],
"Protected" : false,
"Quality" : "Excellent",
"ShowNotifications" : true,
"SignalLevel" : "-",
"SubType" : "Voltcraft CO-20",
"Timers" : "false",
"Type" : "Air Quality",
"TypeImg" : "air",
"Unit" : 102,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "7"
}
],
"status" : "OK",
"title" : "Devices"
}
Code: Select all
[8/11/2016, 9:15:09 PM] [eDomoticz] { Battery: 255,
RSSI: 12,
dtype: 'Air Quality',
id: '189',
idx: 7,
name: 'Lounge Air Quality',
nvalue: 540,
stype: 'Voltcraft CO-20',
unit: 102 }
Last edited by deejc on Thursday 11 August 2016 22:54, edited 1 time in total.
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
I did, but the MQTT handler is still experimental...
I also need an MQTT message sample for each device too please!
I also need an MQTT message sample for each device too please!
Last edited by Marci on Thursday 11 August 2016 22:48, 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
fair enough
and i do appreciate all your work, it works more or less out of the box and i know there is so much going on under the hood!!
btw, the mqtt messages are so quick the iOS home app updates before the actual light turns off in my living room
and i do appreciate all your work, it works more or less out of the box and i know there is so much going on under the hood!!
btw, the mqtt messages are so quick the iOS home app updates before the actual light turns off in my living room
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
i think i got it in the post above, thats whats in the logMarci wrote:I also need an MQTT message sample for each device too please!
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
So you did... Soz!
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!
-
- Posts: 11
- Joined: Friday 11 April 2014 15:45
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: eDomoticz Homebridge-Plugin
this is very interesting, Marci your work is much appreciated.
when open technology starts utilising the innovation that smart software developers bring, the combination becomes incredible powerfull
when open technology starts utilising the innovation that smart software developers bring, the combination becomes incredible powerfull
- 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
Head to your homebridge-edomoticz folder, run...deejc wrote: i think i got it in the post above, thats whats in the log
Code: Select all
cd lib/
sudo rm domoticz_accessory.js
sudo wget https://raw.githubusercontent.com/PatchworkBoy/homebridge-eDomoticz/mqtt-integration/lib/domoticz_accessory.js
Point to note: MQTT can only update air particulate density as that’s all it sends in the MQTT message. Overall Air Quality (Excellent / Fair / Poor etc) can only be retrieved via a pull-to-refresh / old-style http request.
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!
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Are we close to a general release this weekend Marci?
- 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
Not sure yet - there’s still something which occurs that causes me to randomly lose 54 devices in one hit, until homebridge is restarted. Don’t want to let it properly loose til I’ve established the cause... as once it loses them, you have lost all room assignments / scene assignments etc for those devices.
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!
-
- Posts: 612
- Joined: Wednesday 07 August 2013 19:09
- Target OS: -
- Domoticz version:
- Location: UK
- Contact:
Re: eDomoticz Homebridge-Plugin
Ok mate, good luck! LolMarci wrote:Not sure yet - there’s still something which occurs that causes me to randomly lose 54 devices in one hit, until homebridge is restarted. Don’t want to let it properly loose til I’ve established the cause... as once it loses them, you have lost all room assignments / scene assignments etc for those 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
@TheRamon - here’s something genius I’ve noticed...
Get it all up and running, and run homebridge in debug mode ala:
Then open a new terminal window in which to tail -f /var/log/homebridge.log
Now, open Eve, and you can see all the characteristics register for events for your devices IP Address. Close Eve, and all the characteristics unregister for events for your devices IP Address... UNLESS those characteristics are associated with a rule or trigger that requires that characteristic to remain registered. Either way, every now and again a keepalive is sent to all clients it’s aware of.
When next that device reregisters for events (ie: Eve is foregrounded again), it fires off a mass queue of things it’s missed to bring the client up to date.
So, that’s how battery life and bandwidth hit on the device is minimised.
Get it all up and running, and run homebridge in debug mode ala:
Code: Select all
DEBUG=* /usr/local/bin/homebridge -D >> /var/log/homebridge.log
Now, open Eve, and you can see all the characteristics register for events for your devices IP Address. Close Eve, and all the characteristics unregister for events for your devices IP Address... UNLESS those characteristics are associated with a rule or trigger that requires that characteristic to remain registered. Either way, every now and again a keepalive is sent to all clients it’s aware of.
When next that device reregisters for events (ie: Eve is foregrounded again), it fires off a mass queue of things it’s missed to bring the client up to date.
So, that’s how battery life and bandwidth hit on the device is minimised.
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
The air quality is actually the part that worksMarci wrote: Head to your homebridge-edomoticz folder, run...
<Snip>
Overall Air Quality (Excellent / Fair / Poor etc) can only be retrieved via a pull-to-refresh / old-style http request.
youless is still showing "off"
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
Repeat...
Head to your homebridge-edomoticz folder, run...
...then restart Homebridge. Let me know!
Head to your homebridge-edomoticz folder, run...
Code: Select all
cd lib/
sudo rm domoticz_accessory.js
sudo wget https://raw.githubusercontent.com/PatchworkBoy/homebridge-eDomoticz/mqtt-integration/lib/domoticz_accessory.js
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
nah, still the same except now it says it "on"Marci wrote:Repeat..
...then restart Homebridge. Let me know!
Domoticz 3.5641 on RPI (Raspbian GNU/Linux 8)
Who is online
Users browsing this forum: No registered users and 1 guest