Page 73 of 86

Re: homebridge-edomoticz Plugin

Posted: Saturday 30 December 2017 13:01
by michel30
Hello,

I have the same question.

Everything works in domoticz elec , gas etc but how do I get it in the homekit.

It is the samenhing with temperature it is working in domoticz but it does not show in homekit.

The only thing that works is the light switch buttons.

thanks.

Re: homebridge-edomoticz Plugin

Posted: Thursday 04 January 2018 23:11
by rjblake
rjblake wrote: Thursday 28 December 2017 17:54 Have had it all running, but noticed a lot of restarts through PM2. My error log is filled with these entries:

Code: Select all

SyntaxError: Unexpected token C in JSON at position 0
    at JSON.parse (<anonymous>)
    at MqttClient.<anonymous> (/usr/lib/node_modules/homebridge-edomoticz/lib/mqtt.js:57:24)
    at emitThree (events.js:136:13)
    at MqttClient.emit (events.js:217:7)
    at MqttClient._handlePublish (/usr/lib/node_modules/homebridge-edomoticz/node_modules/mqtt/lib/client.js:934:12)
    at MqttClient._handlePacket (/usr/lib/node_modules/homebridge-edomoticz/node_modules/mqtt/lib/client.js:305:12)
    at work (/usr/lib/node_modules/homebridge-edomoticz/node_modules/mqtt/lib/client.js:261:12)
    at Writable.writable._write (/usr/lib/node_modules/homebridge-edomoticz/node_modules/mqtt/lib/client.js:271:5)
    at doWrite (/usr/lib/node_modules/homebridge-edomoticz/node_modules/readable-stream/lib/_stream_writable.js:406:64)
    at writeOrBuffer (/usr/lib/node_modules/homebridge-edomoticz/node_modules/readable-stream/lib/_stream_writable.js:395:5)

Code: Select all

┌───────────────────┬────────────────────────────────────────────────┐
│ status            │ online                                         │
│ name              │ homebridge                                     │
│ restarts          │ 2880                                           │
│ uptime            │ 22s                                            │
│ script path       │ /usr/bin/homebridge                            │
│ script args       │ N/A                                            │
│ error log path    │ /home/rjb/.pm2/logs/homebridge-error-0.log │
│ out log path      │ /home/rjb/.pm2/logs/homebridge-out-0.log   │
│ pid path          │ /home/rjb/.pm2/pids/homebridge-0.pid       │
│ interpreter       │ node                                           │
│ interpreter args  │ N/A                                            │
│ script id         │ 0                                              │
│ exec cwd          │ /home/rjb/domoticz                         │
│ exec mode         │ fork_mode                                      │
│ node.js version   │ 8.9.3                                          │
│ watch & reload    │ ✘                                              │
│ unstable restarts │ 0                                              │
│ created at        │ 2017-12-28T16:43:18.377Z                       │
└───────────────────┴────────────────────────────────────────────────┘
Any ideas on where it is going wrong?
Nobody else having this issue? I have tried on both a RPi3 and Linux installation and the problem is the same on both. Node 8.9.3 (on Linux), Node 7.10.1 (on RPi3). MQTT.js is version 2.14.0 and Mosquitto is version 1.4.10

If I change MQTT to 0, problem stops. Given all the constant restarts, the Homekit functionality becomes unusable.

Re: homebridge-edomoticz Plugin

Posted: Wednesday 10 January 2018 11:16
by poudenes
Hi All,

I have Milight Controllers and using them in Domoticz. Run homebridge so i can control the lamps in Homekit.
Also installed MQTT.

I find out that when i change things in homekit *swith, change color, dim) sometimes he MiLight controllers give a error.
Applamp Bridge error invalid Command or something like that. Then the controller is broken in Domoticz.

I have to restart domoticz to let everything work again. When i disable the use of MQTT then everything work great.
Except the fast change visibility in Homekit because of disabled MQTT

Does someone have a solution for this or help me how to find a solutions? It seems that MQTT send commands that gives problems to the MiLight controllers...

Re: homebridge-edomoticz Plugin

Posted: Wednesday 10 January 2018 16:11
by harrykausl
I map the security panel via homebridge to my iphone home / eve. In the security panel of domoticz, I see Disarm, Arm Home and Arm away. In the home-eve- security panel I see a 4. status (night). It would help me very much, if I could have the 4 status in Domoticz too. Is it possible to change the security panel in domoticz. Thanks.

Re: homebridge-edomoticz Plugin

Posted: Friday 12 January 2018 10:40
by harrykausl
Next question. Does anybody know, how to manage the home-Security-Panel via Siri. I did not succeed. Thanks.

Re: homebridge-edomoticz Plugin

Posted: Thursday 18 January 2018 23:35
by theo69
sylar wrote: Tuesday 25 April 2017 21:31 Hello,

I'm playing with eDomotiz, trying to find out what I will be able to do with it. Seems very impressive!

I do have some questions:
- first, regarding switches. For instance, I have set up a virtual "Push On Button" and added it to my Homekit room (SwitchTypeVal: 9 in Domoticz). It does appear on my iPhone in Home application, but only as a standard switch, and I can turn it on or off like any other switch. I would really need to use it as a push button, which is off by default, and is turned on temporarily when I click on it. Is it possible?
- I have also set up virtual temp+humidity sensors, whose values are refreshed by a LUA script computing mean temperatures and humidity in my house. Everything seems OK in Domoticz, while I only have access to the temperature on my iPhone, humidity is missing. Is it normal?

Thanks for your help!
Hi did you solve this problem? Having the same issue. Also looking for double click etc.

Thanks

Re: homebridge-edomoticz Plugin

Posted: Friday 19 January 2018 19:57
by theo69
How do I change a generic Button to Push Switches - Domoticz SwitchTypeVal: 9 just dont get it...

Re: homebridge-edomoticz Plugin

Posted: Saturday 20 January 2018 17:21
by colaco
gerard76 wrote: Sunday 09 April 2017 8:47 I'm having trouble to get the plugin active on boot. I have updated the systemd domoticz.service to boot homebridge after domoticz, but domoticz does not have enough time to get up and running.

Code: Select all

Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.493  Active notification Subsystems: email (1/12)
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.521  WebServer(HTTP) started on address: :: with port 8080
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.570  WebServer(SSL) started on address: :: with port 443
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.606  Proxymanager started.
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.619  Starting shared server on: :::6144
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.640  TCPServer: shared server started...
Apr  9 08:40:04 pi domoticz[426]: 2017-04-09 08:40:04.646  RxQueue: queue worker started...
<snip>
pr  9 08:40:44 pi homebridge[560]: [4/9/2017, 8:40:44 AM] [eDomoticz] Initializing eDomoticz platform...
Apr  9 08:40:44 pi homebridge[560]: [4/9/2017, 8:40:44 AM] Loading 0 accessories...
Apr  9 08:40:45 pi homebridge[560]: [4/9/2017, 8:40:45 AM] [eDomoticz] There was a problem connecting to Domoticz.
Apr  9 08:40:46 pi homebridge[560]: - Error: socket hang up
I can manually restart homebridge and all works great, but I would love it if no manual intervention was needed.

Anybody have thoughts on this?
Has someone solved this problem. I'm also stuck with this error.

Thanks

Re: homebridge-edomoticz Plugin

Posted: Sunday 21 January 2018 16:17
by iganin
iPhone cannot find the homebridge.
Any help are welcome.

Code: Select all

pi@Heating:~/.homebridge$ homebridge
*** WARNING *** The program 'node' 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=libdns_sd&e=node>
*** WARNING *** The program 'node' 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=libdns_sd&e=node&f=DNSServiceRegister>
[1/21/2018, 3:55:06 PM] Loaded plugin: homebridge-edomoticz
[1/21/2018, 3:55:06 PM] Registering accessory 'homebridge-edomoticz.eDomoticz'
[1/21/2018, 3:55:06 PM] Registering platform 'homebridge-edomoticz.eDomoticz'
[1/21/2018, 3:55:06 PM] ---
[1/21/2018, 3:55:06 PM] Loaded config.json with 0 accessories and 1 platforms.
[1/21/2018, 3:55:06 PM] ---
[1/21/2018, 3:55:06 PM] Loading 1 platforms...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing eDomoticz platform...
[1/21/2018, 3:55:06 PM] Loading 0 accessories...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory '2dn floor bathroom appliances'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Android'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Back door'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Backlight status'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Barometer'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Bathroom 1st floor Humidity'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Bathroom Fan'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Bathroom Fan Timer'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Bathroom Windows Sensor'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Battery Charger'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'BoilerReceiver_CentralHeating'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Camera C2'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Corridor LED C1'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Devonki 1'...
[1/21/2018, 3:55:06 PM] [eDomoticz] Initializing platform accessory 'Distillator'...
Scan this code with your HomeKit App on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
events.js:160
      throw er; // Unhandled 'error' event
      ^

Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at Server._listen2 (net.js:1252:14)
    at listen (net.js:1288:10)
    at Server.listen (net.js:1384:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:496:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:114:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:372:14)
My config file

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,
            "mqttuser": "",
            "mqttpass": ""
        }
    ],
    "accessories": []
}

Can someone help me with troubleshooting.
Thank you a lot in advance.

Re: homebridge-edomoticz Plugin

Posted: Sunday 21 January 2018 18:48
by islandman
Homebridge is not running, there seams to be an Port Error

Re: homebridge-edomoticz Plugin

Posted: Sunday 21 January 2018 18:48
by islandman
theo69 wrote: Thursday 18 January 2018 23:35
sylar wrote: Tuesday 25 April 2017 21:31 Hello,

I'm playing with eDomotiz, trying to find out what I will be able to do with it. Seems very impressive!

I do have some questions:
- first, regarding switches. For instance, I have set up a virtual "Push On Button" and added it to my Homekit room (SwitchTypeVal: 9 in Domoticz). It does appear on my iPhone in Home application, but only as a standard switch, and I can turn it on or off like any other switch. I would really need to use it as a push button, which is off by default, and is turned on temporarily when I click on it. Is it possible?
- I have also set up virtual temp+humidity sensors, whose values are refreshed by a LUA script computing mean temperatures and humidity in my house. Everything seems OK in Domoticz, while I only have access to the temperature on my iPhone, humidity is missing. Is it normal?

Thanks for your help!
Hi did you solve this problem? Having the same issue. Also looking for double click etc.

Thanks
same problem here...

Re: homebridge-edomoticz Plugin

Posted: Sunday 21 January 2018 19:54
by iganin
islandman wrote: Sunday 21 January 2018 18:48 Homebridge is not running, there seams to be an Port Error
Where do you see that homebridge is stopped.
Hmm, I see running process :

pi@Heating:~/.homebridge$ ps -aux | grep homeb
pi 27860 0.0 0.1 4280 1848 pts/0 S+ 19:51 0:00 grep homeb
pi 32508 0.0 4.2 144044 40372 ? Ssl 11:18 0:22 homebridge

Re: homebridge-edomoticz Plugin

Posted: Sunday 21 January 2018 22:05
by islandman
iganin wrote: Sunday 21 January 2018 19:54
islandman wrote: Sunday 21 January 2018 18:48 Homebridge is not running, there seams to be an Port Error
Where do you see that homebridge is stopped.
Hmm, I see running process :

pi@Heating:~/.homebridge$ ps -aux | grep homeb
pi 27860 0.0 0.1 4280 1848 pts/0 S+ 19:51 0:00 grep homeb
pi 32508 0.0 4.2 144044 40372 ? Ssl 11:18 0:22 homebridge
lots of unhandled ERROR

is 127.0.0.1 really you Domoticz IP?

try:

Code: Select all

"platforms": [
        {
            "platform": "eDomoticz",
            "name": "eDomoticz",
            "server": "127.0.0.1", (use your Domoticz internal IP)
            "port": "8080",
            "ssl": 0,
            "roomid": 0,
            "mqtt": 1,
            "excludedDevices": []
        }
    ],
I also suggest you us a room ID!! Put all your wanted Devices in one room and use the roomid Number in config.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 23 January 2018 14:21
by islandman
Would it be possible to add push button (selector Button) to the plug-in. Its supported by HomeKit. One example how they could behave are the Logitech Pop Button. I have the Aqara Button with click and double click, they behave basically the same.

Just a Idee.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 23 January 2018 14:28
by islandman
Mazzokun wrote: Monday 18 September 2017 18:37 witch device I have to choose in domoticz If I want to show the electric socket icon in Homeapp?
This would be great, having the same problem!

Re: homebridge-edomoticz Plugin

Posted: Tuesday 23 January 2018 22:08
by Marci
Domoticz’ JSON output for sockets and switches is identical - ie: SwitchTypeVal is always 0. The types and subtypes also do not change to reflect a difference between a switch and a socket. That is why homebridge-edomoticz cannot distinguish between a switch and a socket. So, at this time, other than using EVE app and reassigning the switches to a socket in there instead of using Home app, this is not going to change.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 23 January 2018 22:11
by Marci
islandman wrote: Tuesday 23 January 2018 14:21 Would it be possible to add push button (selector Button) to the plug-in. Its supported by HomeKit. One example how they could behave are the Logitech Pop Button. I have the Aqara Button with click and double click, they behave basically the same.

Just a Idee.
It’s not a matter of whether it’s supported by HomeKit, it’s a matter of whether Domoticz’ JSON output differentiates / is specific enough to uniquely identify the device type and it’s characteristics to match with the Apple HomeKit spec. See the first post of this thread for how to get the JSON output for a device. Only once that has been looked at can anyone say whether support for your pushbutton device can be added or not.

Re: homebridge-edomoticz Plugin

Posted: Tuesday 23 January 2018 22:14
by Marci
iganin wrote: Sunday 21 January 2018 16:17 iPhone cannot find the homebridge.
Any help are welcome.

Code: Select all

*snip*
Error: listen EADDRINUSE :::51826
    at Object.exports._errnoException (util.js:1012:11)
    at exports._exceptionWithHostPort (util.js:1035:20)
    at Server._listen2 (net.js:1252:14)
    at listen (net.js:1288:10)
    at Server.listen (net.js:1384:5)
    at EventedHTTPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/eventedhttp.js:60:19)
    at HAPServer.listen (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:158:20)
    at Bridge.Accessory.publish (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:496:16)
    at Server._publish (/usr/local/lib/node_modules/homebridge/lib/server.js:114:16)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:372:14)
You have something already using port 51826 - this usually means you have two copies of homebridge running simultaneously iirc.

Re: homebridge-edomoticz Plugin

Posted: Friday 26 January 2018 14:22
by GCB2016
Hi everyone (marci?), is it possible to have a switch in Domoticz that tells you if Homebridge is running or not?

Re: homebridge-edomoticz Plugin

Posted: Friday 26 January 2018 16:58
by poudenes
GCB2016 wrote: Friday 26 January 2018 14:22 Hi everyone (marci?), is it possible to have a switch in Domoticz that tells you if Homebridge is running or not?
You can create a bash script that check status of Homebridge and then update a TEXT Device
Or use Monit service