juliensantos87 / homebridge-myhome

Homebridge plugin for Legrand MyHome
7 stars 2 forks source link

id explanatoion #5

Open bubez81 opened 4 years ago

bubez81 commented 4 years ago

Hello, can you explain how to write the id? For example, for a light my A PL is 0/2/10

bubez81 commented 4 years ago

ah sorry and I receive always this message: [MyHome] Unable to recognize packet '982##' [2020-9-23 12:20:19] [MyHome] [210] Fetching power state :false [2020-9-23 12:20:19] [MyHome] Unable to recognize packet '982##' [2020-9-23 12:20:50] [MyHome] Unable to recognize packet '#0##' [2020-9-23 12:21:38] [MyHome] Monitor connexion is dead, restart it [2020-9-23 12:21:38] [MyHome] Start monitoring MyHome server [2020-9-23 12:21:38] [MyHome] Unable to recognize packet '982##'

juliensantos87 commented 4 years ago

Hello,

I add more information in the README but can you show me your config file?

the first debug should be


Sep 26 23:32:35 raspberrypi homebridge[13100]: 2020-09-26T21:32:35.766Z - MON <= *#*1##
Sep 26 23:32:35 raspberrypi homebridge[13100]: 2020-09-26T21:32:35.770Z - MON => *99*1##
Sep 26 23:32:35 raspberrypi homebridge[13100]: 2020-09-26T21:32:35.772Z - MON <= *#*1##
bubez81 commented 4 years ago

[2020-9-27 11:33:20] Homebridge v1.2.3 is running on port 51481. 2020-09-27T09:33:20.815Z - MON <= *#*1## 2020-09-27T09:33:20.816Z - MON => *99*1## 2020-09-27T09:33:20.821Z - MON <= *98*2## unable to recognize packet '*98*2##' [2020-9-27 11:33:54] [MyHome] [undefined] Fetching power state [2020-9-27 11:33:54] [MyHome] [11] Fetching target [2020-9-27 11:33:54] [MyHome] [11] Fetching position unable to recognize packet '*98*2##' [2020-9-27 11:34:01] [MyHome] [undefined] Fetching power state unable to recognize packet '*98*2##' [2020-9-27 11:34:03] [MyHome] [undefined] Setting power state to on unable to recognize packet '*98*2##' [2020-9-27 11:34:03] [MyHome] [undefined] Setting power state to off unable to recognize packet '*98*2##' [2020-9-27 11:34:07] [MyHome] [undefined] Setting power state to on

{ "platform": "MyHome", "name": "MyHome", "host": "ip", "password": "password", "lights": [ 3 ], "blinds": [ { "id": 11, "time": 15 } ] }

it's probably an id problem but I can't understand how to know the id number....I know the address of my devices but are in bus format...for example the light is A0 PL3, but I can't insert 03 as id number and only three is wrong...

LeJeko commented 4 years ago

Same issue with this fork and can't understand how to get IDs... (F453)

That's why I'm currently using https://github.com/simont77/homebridge-myhome where I can configure my devices with their B/A/PL address. I've asked the owner simont77 but he doesn't want to publish it on npm. I've found this copy (not a fork) who is published if ever: https://github.com/alessandroferra/homebridge-myhome-wip

@juliensantos87: The forks of Simon77 appears to be more complete and simple to configure. What do you think about testing it ?

My goals are:

  1. Simplify the search in the Homebridge Plugins web UI because it's a little bit confusing for now... HB MyHome I think Homebridge-myhome should be the reference. Thanks to @juliensantos87 for updating his repo this week ;)

  2. Add some features like realtime blind moving and video doorbell (to the reference repo).

bubez81 commented 4 years ago

sorry Lejeko and what is this? homebridge-myhome-own?

LeJeko commented 4 years ago

I created my fork because simont77 did not want to publish his. In the meantime, I contacted @ juliensantos87 via npm as I believed the repository home bridge-myhome to be abandoned. I intend to delete it if we can use this fork.

bubez81 commented 4 years ago

ah ok! clear

juliensantos87 commented 4 years ago

For communication with MyHome server I use https://www.npmjs.com/package/myhome to get your ID you are suppose to be able to connect to your server and ask for configuration

You can try it with telnet telnet 192.168.1.35 20000 And try one of this commandes for example *#1001*0*13##' => https://github.com/sxpert/myhomejs/blob/master/myhome.js#L324

In my case for me on F454 it was not easy to read I just connect with this config

    "platforms": [
        {
            "platform": "MyHome",
            "name": "MyHome",
            "host": "192.168.1.35",
            "password": "12345",
            "lights": [],
            "blinds": []
        }
    ] 

This give me this logs

Oct 05 20:15:41 raspberrypi homebridge[21403]: 2020-10-05T18:15:41.467Z - MON <= *#*1##
Oct 05 20:15:41 raspberrypi homebridge[21403]: 2020-10-05T18:15:41.468Z - MON => *99*1##
Oct 05 20:15:41 raspberrypi homebridge[21403]: 2020-10-05T18:15:41.482Z - MON <= *#*1##

When I switch manually a light On and Off it's give me

Oct 05 20:25:19 raspberrypi homebridge[21403]: 2020-10-05T18:25:19.884Z - MON <= *1*1*12##
Oct 05 20:25:24 raspberrypi homebridge[21403]: 2020-10-05T18:25:24.724Z - MON <= *1*0*12##

The first digit it the type, the second is action and the thrid is ID So I know my first ID and I can add it to my config like that "lights": [12, 13],

For Blind I used the same process but you have to defind a time in secondes to be able to simulate closing %

@bubez81 for your probleme it's look like the connection is not right => https://github.com/sxpert/myhomejs/blob/master/myhome.js#L106

Maybe you can check this with this package and make a PR for that? https://www.npmjs.com/package/myhome

bubez81 commented 4 years ago

Just to inform you that the connection problem is related to the HMEC password I think, it's not possible with myhomeserver1 to set a range of ip trusted so the only way is to implement the hmec password system

juliensantos87 commented 4 years ago

my connection is only local and without pass, discuss in this issue https://github.com/sxpert/myhomejs/issues/1 but the npm package is not pushed (I had to checkout manually to connect without pass) https://github.com/sxpert/myhomejs/issues/2

bubez81 commented 4 years ago

Yes, sadly with myhomeserver 1 gateway it's not possible to create a connection without a password, in essence...this gateway is not supported