homebridge-edomoticz Plugin

Moderator: leecollings

User avatar
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

Post by Marci »

TheRamon wrote:Heya,

I have just created a pull request on mqtt-integration.
This is basically the first proof of concept that MQTT integration works. I have messed about with a lot of files, hope you don't mind Marci.
Also split up the platform and accessory since they were in one file.
Merged! SUPERB job d00d - loving it. Have replied over on the github issue - https://github.com/PatchworkBoy/homebri ... -238362470 - have also just made a few changes - pulled out the custom services & characteristics etc as some were getting missed. Figured may as well as they were the only bits left not to abstract out into their own lib...!

On an aside - are you seeing many SIGPIPE kills of homebridge after doing all this? Mefinx it’s not handling MQTT dropping occasionally and reconnecting. Nothing you’ve done - mine started doing this on the odd occasion as soon as I added mqtt.js and started consuming domoticz/out
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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

I have added an X10 Motion Sensor and I set type as Motion sensors.

In domoticz it appears as "Lighting 1, X10, Motion sensor".
In homebridge I can't see it as motion sensor, I see it as normal switch.

Where am I wrong?

Ty
User avatar
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

Post by Marci »

See first post, q & a's... need JSON output for the device to be able to investigate. And... is homebridge-eDomoticz fully up to date?

If json output lists swType as 8, then i'd suggest you need to update the plugin.
Last edited by Marci on Monday 08 August 2016 23:03, 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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

This?

{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 60.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-08 22:43:30",
"Level" : 0,
"LevelInt" : 0,
"MaxDimLevel" : 0,
"Name" : "Sensore Movimento",
"Notifications" : "false",
"PlanID" : "2",
"PlanIDs" : [ 2, 3, 4 ],
"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" : "3"
}
User avatar
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

Post by Marci »

Yep, switchtypeval is 8, so update plugin to latest and restart homebridge then try again.
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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

Ok...I have to understand how to update.....I will try now
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

I issued npm update and the current homebridge running is 0.3.4

Is it latest version?

Ty
User avatar
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

Post by Marci »

Yep, but it's the plugin you need to update, not homebridge itself.
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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

Yes I just discovered... :)

I just updated but the problem is still there so I am not sure if I updated correctly.
Is there a way to check if I am running latest version?

Thanks Marci
User avatar
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

Post by Marci »

Find the plugin directory, version is on top line of index.js, or in package.json, or in changelog.

Did you npm update, or sudo npm update -g? And did you restart homebridge after updating the plugin (and waited a minute or two for it to load and redetect accessories).
Last edited by Marci on Monday 08 August 2016 23:44, 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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

sudo npm update -g homebridge-edomoticz

Is there a way to debug what is it doing?

From the main log I see that it start correctly and works but I cannot understand why it is not getting the motion sensor correctly

I am almost sure that it is updated to last version....
User avatar
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

Post by Marci »

Only thing left is to...

Code: Select all

sudo rm -rf ~/.homebridge/persist/*
...then restart homebridge & re-pair your bridge within your HomeKit app.
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!
User avatar
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

Post by Marci »

Use...

Code: Select all

sudo npm ls -g homebridge-edomoticz


...to get version of globally installed modules.
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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

/usr/local/lib
└── [email protected]
User avatar
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

Post by Marci »

Yup, that's latest.
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!
chrispazz
Posts: 81
Joined: Friday 08 July 2016 10:38
Target OS: -
Domoticz version:
Contact:

Re: eDomoticz Homebridge-Plugin

Post by chrispazz »

Also deleting accessory files and repairing is doing the same result...
:(

Could it be the new version still not working good?

Ty
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: eDomoticz Homebridge-Plugin

Post by TheRamon »

Thanks Marci! Not seeing any SIGPIPEs, on the other side I don't have much devices either.. AND I'm running on Mac for testing. Did not try on my RPI yet. Did you try another broker? I'm using mosquitto myself.
User avatar
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

Post by Marci »

Nah, just Mosquitto - trying to stick to the tools preinstalled with the Domoticz SD image to keep things as simple as possible.
chrispazz wrote:Also deleting accessory files and repairing is doing the same result...
Could it be the new version still not working good?
Nope. Current version is stable.

Do the following:

Code: Select all

cd /
sudo find ./ -name homebridge-edomoticz


...and copy/paste the output.
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!
User avatar
TheRamon
Posts: 126
Joined: Tuesday 12 July 2016 11:32
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: NL/DE
Contact:

Re: eDomoticz Homebridge-Plugin

Post by TheRamon »

Righto, understood. Have just created another pull request. Blinds, smoke sensors and dimmers are now supported through MQTT aswell.
User avatar
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

Post by Marci »

Merged! 8-)
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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest