Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't control anything #5

Closed
romheu opened this issue Jun 29, 2018 · 5 comments
Closed

Can't control anything #5

romheu opened this issue Jun 29, 2018 · 5 comments

Comments

@romheu
Copy link

romheu commented Jun 29, 2018

Hello Lionel, it's me again!

I have a Legrand MyHome F454 server running firmware 2.0.51. It works with commands sent directly via netcat or with the Android app OpenWebNet.

I've installed homebridge and homebridge-own on Raspbian on my Raspberry Pi 2.

homebridge seems to be working as I've been able to add a dummy switch. It's available on my iPhone's Home app and I see the result into the homebridge console when I activate it.

But homebridge-own doesn't detect any of my MyHome accessory, and even if I add manually one of my lights, it's not available in the Home iOS app.

Any suggestion?

Here's my config.json file:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:50",
        "port": 51826,
        "pin": "031-45-154"
    },
    
    "platforms": [
        {
            "platform" : "own",
            "name" : "OwnServer",
	    "server": "192.168.1.250",
	    "bindings": {
		    "lights": {
			    "11": "Entree"
		    }
	    }
        }
    ],

    "accessories": [
	    {
		    "accessory": "DummySwitch",
		    "name": "DummySwitch"
	    }
    ]
}

And homebridge's console:

[30/06/2018, 01:36:28] Loaded config.json with 1 accessories and 1 platforms.
[30/06/2018, 01:36:28] ---
[30/06/2018, 01:36:28] Loaded plugin: homebridge-dummy
[30/06/2018, 01:36:28] Registering accessory 'homebridge-dummy.DummySwitch'
[30/06/2018, 01:36:28] ---
*** 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=libdns_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=libdns_sd&e=nodejs&f=DNSServiceRegister>
[30/06/2018, 01:36:31] Loaded plugin: homebridge-own
[30/06/2018, 01:36:31] Registering platform 'homebridge-own.own'
[30/06/2018, 01:36:31] ---
[30/06/2018, 01:36:31] Loading 1 platforms...
[30/06/2018, 01:36:31] [OwnServer] Initializing own platform...
[30/06/2018, 01:36:31] [OwnServer] Constructing platform...
[30/06/2018, 01:36:31] [OwnServer] Fetch OWN accessories
[30/06/2018, 01:36:31] Loading 1 accessories...
[30/06/2018, 01:36:31] [DummySwitch] Initializing DummySwitch accessory...
[30/06/2018, 01:36:31] [OwnServer] Lights : []
[30/06/2018, 01:36:31] [OwnServer] Automations : []
[30/06/2018, 01:36:31] [OwnServer] Temp sensors : []
Setup Payload:
X-HM://0023ISYWYALA9
Scan this code with your HomeKit app on your iOS device to pair with Homebridge:

Or enter this code with your HomeKit app on your iOS device to pair with Homebridge:
                       
    ┌────────────┐     
    │ 031-45-154 │     
    └────────────┘     
                       
[30/06/2018, 01:36:32] Homebridge is running on port 51826.
[30/06/2018, 01:37:27] [DummySwitch] Setting switch to true
[30/06/2018, 01:37:28] [DummySwitch] Setting switch to false

img_0914

@lionep
Copy link
Owner

lionep commented Jun 30, 2018

Hi Romain,

Unfortunately, I’ve moved out and I don’t have access to this hardware anymore.
Is it possible that the server has been upgraded?

Can you try with netcat the discovery command (*#1*0##) ?

Did you upgrade your node version, it may also be due to homebridge. If you don’t have any other plugins, you can fix its version to 0.3.2.

@romheu
Copy link
Author

romheu commented Jun 30, 2018

Hello again Lionel,

Thank you for your reply!

I have upgraded the server's firmware from version 1.x to version 2.x, as the Web GUI is a bit more attractive and way more responsive: https://twitter.com/RomainHeuillard/status/1012279030370983936

But it looks like the OpenWebNet protocole stayed exactly the same. At least the discovery command works as intended:

$ netcat 192.168.1.250 20000
*#*1##
*99*9##
*#*1##
*1*1*11##
*#*1##
*1*0*11##
*#*1##
*#1*0##
*1*0*11##*1*0*13##*1*0*14##*1*0*15##*1*0*44##*1*0*16##*1*0*19##*1*0*21##*#*1##

But even if I specify the first light manually (see config file above), it doesn't show in the Home app, so the problem is elsewhere, isn't it?

I have node v4.8.2 and I'm using some other plugins. I may dedicate a Raspberry Pi or a Docker container or a VM to homebridge in the long run, so I'll see how I can install v0.3.2.

In the meantime I'll try some debugging with the help of a Twitter friend, I'll keep you updated!

@romheu
Copy link
Author

romheu commented Jun 30, 2018

So on a Twitter friend's suggestion, I did node test.js on your lib/test.js file. I replaced the IP address and some of the accessories.

It returns the following, so I think it works:

$ node test.js
[]
188ms
[]
210ms
[]
215ms
[Error: NACK]
[]
223ms
[Error: NACK]
[]
228ms

I hope it helps you understand why it doesn't work with my setup :-/

@romheu
Copy link
Author

romheu commented Jun 30, 2018

In fact I don't get the same result on each run:

pi@raspberrypi:/usr/local/lib/node_modules/homebridge-own $ node lib/test.js
[]
290ms
[]
315ms
[]
317ms
events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: read ECONNRESET
    at exports._errnoException (util.js:907:11)
    at TCP.onread (net.js:561:26)
pi@raspberrypi:/usr/local/lib/node_modules/homebridge-own $ node lib/test.js
[]
197ms
[]
219ms
[]
224ms
[Error: NACK]
[]
232ms
[Error: NACK]
[]
236ms
pi@raspberrypi:/usr/local/lib/node_modules/homebridge-own $ node lib/test.js
[]
165ms
[]
179ms
[]
184ms
[]
187ms
[]
189ms

@lionep
Copy link
Owner

lionep commented Jul 5, 2018

Thanks you very much @Romano2k for your help, and access to your platform.
Its now resolved from release v0.3.0

@lionep lionep closed this as completed Jul 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants