Page 23 of 86

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 22:19
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

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 22:51
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

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:01
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.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:02
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"
}

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:05
by Marci
Yep, switchtypeval is 8, so update plugin to latest and restart homebridge then try again.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:05
by chrispazz
Ok...I have to understand how to update.....I will try now

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:19
by chrispazz
I issued npm update and the current homebridge running is 0.3.4

Is it latest version?

Ty

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:31
by Marci
Yep, but it's the plugin you need to update, not homebridge itself.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:33
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

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:35
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).

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:43
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....

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:53
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.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:57
by Marci
Use...

Code: Select all

sudo npm ls -g homebridge-edomoticz


...to get version of globally installed modules.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 08 August 2016 23:57
by chrispazz
/usr/local/lib
└── [email protected]

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 0:05
by Marci
Yup, that's latest.

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 0:09
by chrispazz
Also deleting accessory files and repairing is doing the same result...
:(

Could it be the new version still not working good?

Ty

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 9:19
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.

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 10:00
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.

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 14:15
by TheRamon
Righto, understood. Have just created another pull request. Blinds, smoke sensors and dimmers are now supported through MQTT aswell.

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 09 August 2016 14:29
by Marci
Merged! 8-)