Page 14 of 86

Re: eDomoticz Homebridge-Plugin

Posted: Sunday 10 April 2016 1:48
by simon_rb
I do have one issue I can't understand, whenever I ask the kitchen tv to turn on everything turns on. Every switch! No idea why that is. I've had it in ia room called kitchen, I've had it in the house. I've had it as a to symbol and a power symbol within Eve and same thing happens. Anyone else encounter this, I don't think it's a bug it's something I've done. Just trying to workout why by saying turn in the kitch tv that it turns everything on.

Strange.

Ok.. So my kitchen tv is called kitchen - tv. My other TVs are living room - tv (living room), dining room - tv (dining room) and bedroom - tv (our bedroom). Now if I say turn on living room tv is does, same as bedroom tv however the kitchen tv it turns everything on. Even when it's not put in the kitchen on HomeKit. If I say turn on kitchen kitchen tv then it turns on. Why is that one the exception. What could I do to rename them so I don't have this problem. Same goes for radios, I have a kitchen radio called kitchen radio in the kitchen. When I say turn off kitchen radio it says it can't get a response where if I say kitchen kitchen radio it works but bedroom has a bedroom radio and that responds to bedroom radio. Might try renaming kitchen.

That fixed that. Renamed room to Cooking and now they work as expected. Very strange.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 11 April 2016 18:51
by Marci
Try “turn off the radio in the kitchen” / “turn off the tv in the kitchen” rather than “turn off the kitchen radio” / “turn off the kitchen tv”

Make sure the TV’s icon is set to a TV in Eve. Make sure the Radio icon is set to the Amp & Speakers icon. Make sure the radio features the word radio in it’s name, but NOT the word kitchen. Same for TV. My TVs are called “plasma”, “lcd” and “telly”, so I can switch the devices by their unique name, but also via “tv in the <roomname>” and the room name is derived solely from the room that it’s placed in within home kit.

You can override Domoticz names by heading into Eve > Settings > Accessories > choose accessory, and set a Siri Name, which it then uses instead of whatever the Domoticz-defined name is.

Room name isn’t directly mentioned in my switch names at all, and I find it best to avoid it wherever possible.

Eg: my temp probes are called “Temperature (LR)”, “Temperature (BR)”, “Temperature (Gd)”, "Temperature (Sh)”, place respectively in rooms called “Living Room”, “Bedroom”, “Garden”, “Shed”.

Living Room is in the Downstairs zone, Bedroom in the upstairs zone, Garden & Shed in the Outside zone.

I can get the temperature via: “how warm is it in the <roomname>”, “how warm is it <zonename>”. Asking for outside will answer either with the individual temperatures for garden and shed as two statements (i.e.: The temperature in the shed is xx and the temperature in the garden is xx) or it’ll average that group of sensors... so (garden temp + shed temp) /2 ...and answer the “the temperature outside is around <avgtemp>”.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 11 April 2016 19:19
by simon_rb
Marci wrote:Try “turn off the radio in the kitchen” / “turn off the tv in the kitchen” rather than “turn off the kitchen radio” / “turn off the kitchen tv”

Make sure the TV’s icon is set to a TV in Eve. Make sure the Radio icon is set to the Amp & Speakers icon. Make sure the radio features the word radio in it’s name, but NOT the word kitchen. Same for TV. My TVs are called “plasma”, “lcd” and “telly”, so I can switch the devices by their unique name, but also via “tv in the <roomname>” and the room name is derived solely from the room that it’s placed in within home kit.

You can override Domoticz names by heading into Eve > Settings > Accessories > choose accessory, and set a Siri Name, which it then uses instead of whatever the Domoticz-defined name is.

Room name isn’t directly mentioned in my switch names at all, and I find it best to avoid it wherever possible.

Eg: my temp probes are called “Temperature (LR)”, “Temperature (BR)”, “Temperature (Gd)”, "Temperature (Sh)”, place respectively in rooms called “Living Room”, “Bedroom”, “Garden”, “Shed”.

Living Room is in the Downstairs zone, Bedroom in the upstairs zone, Garden & Shed in the Outside zone.

I can get the temperature via: “how warm is it in the <roomname>”, “how warm is it <zonename>”. Asking for outside will answer either with the individual temperatures for garden and shed as two statements (i.e.: The temperature in the shed is xx and the temperature in the garden is xx) or it’ll average that group of sensors... so (garden temp + shed temp) /2 ...and answer the “the temperature outside is around <avgtemp>”.
I'll take a look at that, thank you. What do you use for temperature in your rooms?

Re: eDomoticz Homebridge-Plugin

Posted: Monday 11 April 2016 19:37
by Marci
Raspberry Pi3 upstairs with 3x probes, Raspberry Pi1 B in shed with 2x probes, raspberry Pi1 B+ in living room with 2x probes. Each Pi runs Domoticz, living room is master, other two are slaves. All probes wired up to their respective Raspberry Pi’s via 1Wire on a single GPIO, and added into Domoticz via adding new hardware, type: 1Wire (system), and then the probes added to the user account being used for the master:slave connections.

With these > 3 in / out choc block > gpio pins, single 4.7k resistor from data to 3.3v at the choc block (ignore the Python Programme section - not required. Domoticz just picks up the data when it discovers the devices on the 1Wire network).

The master Pi then rebroadcasts everything via MQTT to Node-Red on the RaspPi3 which then handles a lot of automation functions (rather than using blockly/lua) which manually trigger switches etc back on the master Pi, as well as allowing secure websockets access to externally hosted responsive webUI (Twitter Bootstrap-based with Highcharts), and homebridge-edomoticz / homebridge running on the master Pi exposing everything to Homebridge / HomeKit, which works externally thanks to an AppleTV3 on the network.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 11 April 2016 20:53
by simon_rb
Quite involved then haha, Might set it up so one Pi can detect motion and temperature in a room.I have just added an Apple TV 3 to mine yesterday. I can now ride up to my garage on my motorbike and open the door via my helmet bluetoothed to my phone and invoke Siri. Can be now done up the road before I arrive so I can ride straight in.

Future project maybe :)

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 11:57
by mccubix
Hi,
have just finished Homebridge and eDomoticz installation. EVE recognises all, but does not import rooms from Domoticz.
I have a few questions for organisation:

- If I change accessory names in Domoticz, will they change in Eve? At the moment I have abbreviations in Domoticz, so can either change there or in EVE. If changed in EVE and I use different home kit software, would EVE names be transferred?

- Same for rooms, if I create them in EVE, will they transfer (i.e stored in iCloud / HomeKit)

- For general name rules, I had names with rooms in them, like Kitchen Ceiling etc. You mentioned you use Temperature with brackets for room, like Temperature (Ki), but can't use brackets if renaming in EVE.

- last point, sorry for list, I start home bridge on RPi3 through terminal on my Mac, as soon as I close Terminal, home bridge stops. Why? feel a bit stupid here, am I missing something?

Thanks a lot for any help !!

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 12:23
by Marci
mccubix wrote:If I change accessory names in Domoticz, will they change in Eve? At the moment I have abbreviations in Domoticz, so can either change there or in EVE. If changed in EVE and I use different home kit software, would EVE names be transferred?
If you set Siri Names thru Eve (Settings > Accessories > Accessory > Siri Name), they are set at HomeKit level and apply to all HomeKit apps.
The Siri Name can be completely different to the Domoticz name.
Same for rooms, if I create them in EVE, will they transfer (i.e stored in iCloud / HomeKit)
Yes. HomeKit rooms can only be created within the HomeKit app. They can’t be pulled in from Domoticz. Once defined in one HomeKit app, they apply in all HomeKit apps.
For general name rules, I had names with rooms in them, like Kitchen Ceiling etc. You mentioned you use Temperature with brackets for room, like Temperature (Ki), but can't use brackets if renaming in EVE.
Those are my names within Domoticz. I only give items Siri Names to accessories that need them - usually switches. Everything else just is queried by it’s category and room more than by it’s Siri Name. i.e.: If you ask how warm it is in a room, it will automatically find a single temperature category device in that room and use it’s data, or average the data across all devices in that category within that room if there are more than one. When you ask how warm it is in the living room, as long as there’s a temperature device in that room it’s fine. That device could be called “Uncle Fred’s Pickle Probe” for all Siri cares, as long as it’s a temperature device in the room in question.

Switches however, I give unique names and make sure I set the “Used for” field in settings > accessories as appropriate. The “Used for” drops that switch into a general category (light, switch, tv device, sound device) which covers general statements such as “turn on the TV in the Living Room” or “turn on the Lamp in the Living Room”, or I can address with specifics via “turn on the Plasma” (plasma being the unique Siri Name for the living room TV), or “turn on Helen’s Reading Light” (Helen’s Reading Light being the Domoticz device name for the Living Room Lamp) or “turn on the bloody lamp” (Bloody Lamp being the Siri Name set up in Eve).

All takes a bit of experimentation...!

TLDR; 3 ways of addressing:
  • Category (derived from Sensor Type <defined within homebridge-edomoticz code> & “Used for” settings in Eve) with room (defined in Eve)
  • Accessory name (as pulled from Domoticz)
  • Siri Name (defined in Eve)
last point, sorry for list, I start home bridge on RPi3 through terminal on my Mac, as soon as I close Terminal, home bridge stops. Why? feel a bit stupid here, am I missing something?
Sounds like you’re not launching with forever start... see instructions in original post and the link in that post to the later post on autolaunching at boot up.

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 12:32
by mccubix
That's great, thanks. Works for temperatures !!
Forever start throws error message:

pi@raspberrypi:~$ forever start /usr/local/lib/node_modules/homebridge/bin/homebridge
warn: --minUptime not set. Defaulting to: 1000ms
warn: --spinSleepTime not set. Your script will exit if it does not stay up for at least 1000ms
info: Forever processing file: /usr/local/lib/node_modules/homebridge/bin/homebridge
error: Cannot start forever
error: script /usr/local/lib/node_modules/homebridge/bin/homebridge does not exist.
pi@raspberrypi:~$

wrong directory?

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 12:38
by Marci
Yup... try:

Code: Select all

forever start /usr/local/bin/homebridge
If that doesn’t work, then...

Code: Select all

sudo find / -name homebridge
...to track down where it’s put the homebridge binary on your system. (Refer to this post onwards for locating everything and what to modify in scripts)

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 12:45
by mccubix
not in bin as well.

Find only shows:

pi@raspberrypi:/usr/local/lib$ sudo find / -name homebridge
/root/.npm/homebridge
/root/.npm/registry.npmjs.org/homebridge
pi@raspberrypi:/usr/local/lib$

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 12:53
by mccubix
found it, wasn't in home when I did search.
Is in /usr/bin/homebridge
forever works now, thanks !!

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 14:40
by Heisenberg
I think I messed up the installation of Homebridge. Now I want to start over. How can I remove all the Homebridge and forever files to start all over again? Or is there another way to get Homebridge working correctly?

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 16:25
by Marci
No need to remove, just follow the instructions again from scratch and everything’ll reinstall.

Re: eDomoticz Homebridge-Plugin

Posted: Saturday 16 April 2016 22:30
by jc1234
Hi Marci,

I was trying to follow along with the blinds discussion, but I'm not sure at this point if they should work (be recognized based on SwitchTypeVal 3). At any rate, they are showing up in Eve as just switches. These are roller blinds, so only open/closed. A Domoticz device status of open and closed state is below if this helps, or if you have any other ideas I could try I'd appreciate it. Thanks for all the work you've put into this too!

-John

Edit: After going back through the thread, I believe that the SwitchTypeVal3 was reverted since it wasn't working as expected. If I'm mistaken and there is something I'm doing wrong, please let me know! Thanks.

Code: Select all

#Blinds Open
{
   "ActTime" : 1460838129,
   "ServerTime" : "Apr 16 2016 16:22:09",
   "Sunrise" : "06:54:00",
   "Sunset" : "19:55:00",
   "result" : [
      {
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Open",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFX",
         "HaveDimmer" : false,
         "HaveGroupCmd" : false,
         "HaveTimeout" : false,
         "ID" : "040000",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-04-16 16:06:52",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 0,
         "Name" : "Bedroom Blinds",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "Open",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "RFY",
         "SwitchType" : "Blinds",
         "SwitchTypeVal" : 3,
         "Timers" : "true",
         "Type" : "RFY",
         "TypeImg" : "blinds",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "84"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}


#Blinds Closed 
{
   "ActTime" : 1460838285,
   "ServerTime" : "Apr 16 2016 16:24:45",
   "Sunrise" : "06:54:00",
   "Sunset" : "19:55:00",
   "result" : [
      {
         "BatteryLevel" : 255,
         "CustomImage" : 0,
         "Data" : "Closed",
         "Favorite" : 1,
         "HardwareID" : 2,
         "HardwareName" : "RFX",
         "HaveDimmer" : false,
         "HaveGroupCmd" : false,
         "HaveTimeout" : false,
         "ID" : "040000",
         "Image" : "Light",
         "IsSubDevice" : false,
         "LastUpdate" : "2016-04-16 16:24:24",
         "Level" : 0,
         "LevelInt" : 0,
         "MaxDimLevel" : 0,
         "Name" : "Bedroom Blinds",
         "Notifications" : "false",
         "PlanID" : "0",
         "Protected" : false,
         "ShowNotifications" : true,
         "SignalLevel" : 7,
         "Status" : "Closed",
         "StrParam1" : "",
         "StrParam2" : "",
         "SubType" : "RFY",
         "SwitchType" : "Blinds",
         "SwitchTypeVal" : 3,
         "Timers" : "true",
         "Type" : "RFY",
         "TypeImg" : "blinds",
         "Unit" : 1,
         "Used" : 1,
         "UsedByCamera" : false,
         "XOffset" : "0",
         "YOffset" : "0",
         "idx" : "84"
      }
   ],
   "status" : "OK",
   "title" : "Devices"
}

Re: eDomoticz Homebridge-Plugin

Posted: Monday 18 April 2016 20:39
by simon_rb
jc1234 wrote:After going back through the thread, I believe that the SwitchTypeVal3 was reverted since it wasn't working as expected. If I'm mistaken and there is something I'm doing wrong, please let me know! Thanks.
Thats right, currently it shows up as a switch in my HomeKit. Once Marci gets his own blind setup working and can debug it all then hopefully we will get the blinds working as intended.

Re: eDomoticz Homebridge-Plugin

Posted: Monday 18 April 2016 23:05
by Heisenberg
Marci wrote:No need to remove, just follow the instructions again from scratch and everything’ll reinstall.
When I try again from scratch I get the following message. What do I miss here?

Code: Select all

*** WARNING *** The program 'nodejs' uses the Apple Bonjour compatibility layer                                     of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libd                                    ns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' called 'DNSServiceRegister()' which is not                                     supported (or only supported partially) in the Apple Bonjour compatibility layer                                     of Avahi.
*** WARNING *** Please fix your application to use the native API of Avahi!
*** WARNING *** For more information see <http://0pointer.de/avahi-compat?s=libd                                    ns_sd&e=nodejs&f=DNSServiceRegister>
[4/18/2016, 11:00:42 PM] Loaded plugin: homebridge-edomoticz
[4/18/2016, 11:00:42 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[4/18/2016, 11:00:42 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[4/18/2016, 11:00:42 PM] ---
[4/18/2016, 11:00:42 PM] Loaded config.json with 0 accessories and 1 platforms.
[4/18/2016, 11:00:42 PM] ---
[4/18/2016, 11:00:42 PM] Loading 1 platforms...
[4/18/2016, 11:00:42 PM] [Domoticz] Initializing eDomoticz platform...
[4/18/2016, 11:00:42 PM] [Domoticz] Fetching Domoticz lights and switches...
[4/18/2016, 11:00:42 PM] Loading 0 accessories...
[4/18/2016, 11:00:42 PM] [Domoticz] Initializing platform accessory '/boot'...
[4/18/2016, 11:00:42 PM] [Domoticz] Initializing platform accessory 'ACM-1000'..                                    .
[4/18/2016, 11:00:42 PM] [Domoticz] Initializing platform accessory 'AppLamp RGB                                    '...
[4/18/2016, 11:00:43 PM] [Domoticz] Initializing platform accessory 'CPU_Usage'.                                    ..
[4/18/2016, 11:00:43 PM] [Domoticz] Initializing platform accessory 'CPU_Usage'.                                    ..
/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:218
      throw new Error("Cannot add a bridged Accessory with the same UUID as anot                                    her bridged Accessory: " + existing.UUID);
      ^

Error: Cannot add a bridged Accessory with the same UUID as another bridged Acce                                    ssory: fea23d26-fc82-4e61-87e5-0a5c6b4dew
    at Bridge.Accessory.addBridgedAccessory (/usr/lib/node_modules/homebridge/no                                    de_modules/hap-nodejs/lib/Accessory.js:218:13)
    at Server.<anonymous> (/usr/lib/node_modules/homebridge/lib/server.js:346:24                                    )
    at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js                                    :15:19
    at callbackLater (/usr/lib/node_modules/homebridge-edomoticz/index.js:366:37                                    )
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-edomoticz/index.js:3                                    92:17)
    at Request.self.callback (/usr/lib/node_modules/homebridge-edomoticz/node_mo                                    dules/request/request.js:198:22)
    at emitTwo (events.js:87:13)
    at Request.emit (events.js:172:7)
    at Request.<anonymous> (/usr/lib/node_modules/homebridge-edomoticz/node_modu                                    les/request/request.js:1082:10)
    at emitOne (events.js:82:20)

Re: eDomoticz Homebridge-Plugin

Posted: Tuesday 19 April 2016 1:11
by simon_rb
Looks like you have two devices with the same name 'CPU Usage' if you take one of them out it should load :-)

Re: eDomoticz Homebridge-Plugin

Posted: Wednesday 20 April 2016 20:15
by Eduard
May i suggest a new option, though i'm not sure it is even possible...

In the Eve-app you can add a 'Siri-name' for a device to change the name Siri listens to. Is it possible to get this name from the device-descriptions from Domoticz?
Now it has to be entered every time you start over from scratch in the Eve-app.
Should help me a lot ;)

Re: eDomoticz Homebridge-Plugin

Posted: Friday 22 April 2016 18:09
by Marci
Nope - it’s not something that’s mapped within Homebridge. As soon as you try to, the name becomes static / non-editable and the Siri Name option vanishes from the accessory altogether.

Re: eDomoticz Homebridge-Plugin

Posted: Friday 22 April 2016 18:12
by Marci
Heisenberg wrote: When I try again from scratch I get the following message. What do I miss here?

Code: Select all

      throw new Error("Cannot add a bridged Accessory with the same UUID as another bridged Accessory: " + existing.UUID);
      ^
     
The UUID for Homebridge is generated from the Device Name, therefore all your device names in Domoticz must be unique. Rename those CPU Usage utility sensors in Domoticz to CPU Usage 1 and CPU Usage 2, and it’ll work fine.