Code Monkey home page Code Monkey logo

insteon-mqtt's People

Contributors

dcande avatar diogos88 avatar djfjeff avatar djryan012 avatar embak avatar j3kestrel avatar jordanrounds avatar jrevans avatar jtmoderate876 avatar kpfleming avatar krkeegan avatar lnr0626 avatar matt-cantu avatar mooshee avatar td22057 avatar tommycw1 avatar tstabrawa avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

stmrocket

insteon-mqtt's Issues

Condense Controllers in Scenes

Do we want to ensure that each controller is only specified once? The following is allowed in the scene code:

- controllers:
    - dimmer1
    - keypad1
   responders:
    - fan1
    - fan2

- controllers:
    - keypad1
   responders:
    - fan3

I believe everything will work if this is done. But the import function may do funny things, because when looking to add a responder, it just looks for the first instance of the controller and adds it there (splitting from the other controllers if necessary).

It isn't a big deal, mostly cosmetic. I suppose people will only be using 'Import' when first transitioning to insteon-mqtt and probably never again.

Maybe someone will manually create links on the devices and then import them? This kind of seems like a one off or very rare instance.

Probably don't fix this.

Allow for Ramp Rate and Level in Scene Definitions

Currently the low level Data_1-3 are used, but it would be more user friendly to allow for Ramp and Level.

Would require conversion to proper values on Sync (Probably in Populate_Scenes) and reverse-conversion on import.

additional examples in scenes.yaml

The scenes.yaml in the scene_sync branch has some great examples of different scene configurations.
One thing I want to better understand is how the fan speed settings would map to the kpl buttons. Given that the fanlinc has two groups, grp 1 for the light, grp 2 for the fan, the fan speeds are mapped to values in ranges between 0x00 and 0xff (as documented in FanLinc.py). Is the value that maps to the speed set in data_1? That's what it seems, as I look at the database of one of my devices. If so, do we need to map data_[1,3] in the scene definition, or just data_1?

an example, cribbing off of the existing example scene 1:

  • name: lr_fan_hi
    responders:
    - lr fan: 2
    data_1: 0xff
    - lr kpl1: 6
    - lr kpl2: 6
    controllers:
    - lr kpl1: 6
    - lr kpl2: 6
    - modem

Also, as it is, is this sufficient to update the modem, and thereby homeassistant, if one of the KPLs presses the button, or would the modem also need to be a responder for the scene? As I mentioned, the above is based on an example already given, and my understanding is shaky at best.

Specific keypad vintage that won't pair

Note it looks to me like the IYS99 detects this vintage and does not use db get all on it. This is a dump of the ISY99 on this vintage. TD22057#233

Note in the debug it still dumps the database, but the insteon-mqtt app has stopped listening.

(venv) jonsmirl@ares:/aosp/insteon-mqtt$ insteon-mqtt config.yaml pair 29.53.46
Commanding keypad_linc device 29.53.46 (2nd / m bath / mb chandelier kp.1) cmd=pair
KeypadLinc 29.53.46 setting LED bits 11000000
KeypadLinc 29.53.46 refresh at level 0
Device 29.53.46 db out of date (got 72 vs None), refreshing
ERROR: 29.53.46 device NAK error: , Message: Std: 29.53.46->53.bf.6b Type.DIRECT_NAK cmd: 2f 00
ERROR: Database command NAK.
Pairing may fail if the modem db is out of date. Try running
the following and then re-try the pair command.
insteont-mqtt config.py refresh modem
(venv) jonsmirl@ares:~/aosp/insteon-mqtt$

--------------- DEBUG -------------------------------

2020-12-06 12:36:15 INFO Mqtt: MQTT message insteon/command/29.53.46 b'{"cmd": "pair", "session": "2526865919"}'
2020-12-06 12:36:15 UI Mqtt: Commanding keypad_linc device 29.53.46 (2nd / m bath / mb chandelier kp.1) cmd=pair
2020-12-06 12:36:15 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "MESSAGE", "data": "Commanding keypad_linc device 29.53.46 (2nd / m bath / mb chandelier kp.1) cmd=pair"} qos=0 ret=False
2020-12-06 12:36:15 INFO KeypadLinc: KeypadLinc 29.53.46 pairing
2020-12-06 12:36:15 DEBUG CommandSeq: Running command 1 of 11
2020-12-06 12:36:15 INFO KeypadLinc: KeypadLinc 29.53.46 cmd: keypad status refresh
2020-12-06 12:36:15 DEBUG CommandSeq: Running command 1 of 4
2020-12-06 12:36:15 INFO Protocol: Write message to modem: Std: 29.53.46, Type.DIRECT, 19 01
2020-12-06 12:36:15 DEBUG Protocol: Write bytes to modem: 02622953460f1901
2020-12-06 12:36:15 DEBUG Serial: Wrote 8 bytes to serial /dev/insteon
2020-12-06 12:36:15 DEBUG Mqtt: MQTT writing
2020-12-06 12:36:15 INFO Protocol: Read 0x62: Std: 29.53.46, Type.DIRECT, 19 01 ack: True
2020-12-06 12:36:15 DEBUG Protocol: Passing msg to write handler: DeviceRefresh handler
2020-12-06 12:36:15 DEBUG DeviceRefresh: 29.53.46 ACK response
2020-12-06 12:36:15 INFO Protocol: Read 0x50: Std: 29.53.46->53.bf.6b Type.DIRECT_ACK cmd: 48 c0
2020-12-06 12:36:15 DEBUG Protocol: Setting next write time: 1607276176.080111
2020-12-06 12:36:15 DEBUG MsgHistory: Received 1 hops, total 5 for 7 entries
2020-12-06 12:36:15 DEBUG Protocol: Passing msg to write handler: DeviceRefresh handler
2020-12-06 12:36:15 UI KeypadLinc: KeypadLinc 29.53.46 setting LED bits 11000000
2020-12-06 12:36:15 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "MESSAGE", "data": "KeypadLinc 29.53.46 setting LED bits 11000000"} qos=0 ret=False
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 1 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 2 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 3 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 4 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 5 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 6 old: 0 new 0
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 7 old: 1 new 1
2020-12-06 12:36:15 DEBUG KeypadLinc: Btn 8 old: 1 new 1
2020-12-06 12:36:15 DEBUG CommandSeq: Running command 2 of 4
2020-12-06 12:36:15 DEBUG Protocol: Write handler finished
2020-12-06 12:36:15 INFO Protocol: Write message to modem: Std: 29.53.46, Type.DIRECT, 19 00
2020-12-06 12:36:15 DEBUG Protocol: Write bytes to modem: 02622953460f1900
2020-12-06 12:36:15 DEBUG Mqtt: MQTT writing
2020-12-06 12:36:16 DEBUG Serial: Wrote 8 bytes to serial /dev/insteon
2020-12-06 12:36:16 INFO Protocol: Read 0x62: Std: 29.53.46, Type.DIRECT, 19 00 ack: True
2020-12-06 12:36:16 DEBUG Protocol: Passing msg to write handler: DeviceRefresh handler
2020-12-06 12:36:16 DEBUG DeviceRefresh: 29.53.46 ACK response
2020-12-06 12:36:16 INFO Protocol: Read 0x50: Std: 29.53.46->53.bf.6b Type.DIRECT_ACK cmd: 48 00
2020-12-06 12:36:16 DEBUG Protocol: Setting next write time: 1607276176.661964
2020-12-06 12:36:16 DEBUG MsgHistory: Received 0 hops, total 5 for 8 entries
2020-12-06 12:36:16 DEBUG Protocol: Passing msg to write handler: DeviceRefresh handler
2020-12-06 12:36:16 UI KeypadLinc: KeypadLinc 29.53.46 refresh at level 0
2020-12-06 12:36:16 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "MESSAGE", "data": "KeypadLinc 29.53.46 refresh at level 0"} qos=0 ret=False
2020-12-06 12:36:16 INFO KeypadLinc: Setting device 29.53.46 (2nd / m bath / mb chandelier kp.1) grp=1 on=0 normalrefresh
2020-12-06 12:36:16 INFO KeypadLinc: MQTT received button press 29.53.46 (2nd / m bath / mb chandelier kp.1) = btn 1 at 0 normal refresh
2020-12-06 12:36:16 DEBUG Mqtt: MQTT publish insteon/29.53.46/state/1 { "state" : "OFF", "brightness" : 0 } qos=1 ret=1
2020-12-06 12:36:16 UI DeviceRefresh: Device 29.53.46 db out of date (got 72 vs None), refreshing
2020-12-06 12:36:16 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "MESSAGE", "data": "Device 29.53.46 db out of date (got 72 vs None), refreshing"} qos=0 ret=False
2020-12-06 12:36:16 DEBUG MsgHistory: Average hops 0.6, using 1
2020-12-06 12:36:16 DEBUG Protocol: Write handler finished
2020-12-06 12:36:16 INFO Protocol: Write message to modem: Ext: 29.53.46, Type.DIRECT ext, 2f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
2020-12-06 12:36:16 DEBUG Protocol: Write bytes to modem: 0262295346152f0000000000000000000000000000d1
2020-12-06 12:36:16 DEBUG Mqtt: MQTT writing
2020-12-06 12:36:16 DEBUG Serial: Wrote 22 bytes to serial /dev/insteon
2020-12-06 12:36:16 INFO Protocol: Read 0x62: Ext: 29.53.46, Type.DIRECT ext, 2f 00 ack: True 00 00 00 00 00 00 00 00 00 00 00 00 00 d1
2020-12-06 12:36:16 DEBUG Protocol: Passing msg to write handler: DeviceDbGet handler
2020-12-06 12:36:17 INFO Protocol: Read 0x50: Std: 29.53.46->53.bf.6b Type.DIRECT_NAK cmd: 2f 00
2020-12-06 12:36:17 DEBUG Protocol: Setting next write time: 1607276177.094474
2020-12-06 12:36:17 DEBUG MsgHistory: Received 0 hops, total 5 for 9 entries
2020-12-06 12:36:17 DEBUG Protocol: Passing msg to write handler: DeviceDbGet handler
2020-12-06 12:36:17 ERROR DeviceDbGet: 29.53.46 device NAK error: , Message: Std: 29.53.46->53.bf.6b Type.DIRECT_NAK cmd: 2f 00
2020-12-06 12:36:17 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "ERROR", "data": "29.53.46 device NAK error: , Message: Std: 29.53.46->53.bf.6b Type.DIRECT_NAK cmd: 2f 00"} qos=0 ret=False
2020-12-06 12:36:17 ERROR Mqtt: Database command NAK.
2020-12-06 12:36:17 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "ERROR", "data": "Database command NAK. "} qos=0 ret=False
2020-12-06 12:36:17 DEBUG Mqtt: MQTT publish insteon/command/29.53.46/session/2526865919 {"type": "END", "data": null} qos=0 ret=False
2020-12-06 12:36:17 DEBUG Protocol: Write handler finished
2020-12-06 12:36:17 DEBUG Mqtt: MQTT writing
2020-12-06 12:36:17 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ff 20 a2 48 3c 48 88 ff 1f 06 88
2020-12-06 12:36:17 DEBUG MsgHistory: Received 1 hops, total 6 for 10 entries
2020-12-06 12:36:17 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ff 20 a2 48 3c 48 88 ff 1f 06 88
2020-12-06 12:36:17 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f f7 20 a2 48 3c 48 88 ff 1f 05 91
2020-12-06 12:36:17 DEBUG MsgHistory: Received 1 hops, total 7 for 11 entries
2020-12-06 12:36:17 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f f7 20 a2 48 3c 48 88 ff 1f 05 91
2020-12-06 12:36:18 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ef 20 a2 48 3c 48 88 ff 1f 04 9a
2020-12-06 12:36:18 DEBUG MsgHistory: Received 1 hops, total 8 for 11 entries
2020-12-06 12:36:18 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ef 20 a2 48 3c 48 88 ff 1f 04 9a
2020-12-06 12:36:18 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ef 20 a2 48 3c 48 88 ff 1f 04 9a
2020-12-06 12:36:18 DEBUG MsgHistory: Received 1 hops, total 9 for 11 entries
2020-12-06 12:36:18 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f ef 20 a2 48 3c 48 88 ff 1f 04 9a
2020-12-06 12:36:19 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f e7 20 a2 48 3c 48 88 ff 1f 03 a3
2020-12-06 12:36:19 DEBUG MsgHistory: Received 1 hops, total 10 for 11 entries
2020-12-06 12:36:19 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f e7 20 a2 48 3c 48 88 ff 1f 03 a3
2020-12-06 12:36:20 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f df 20 a2 3f 3c 48 88 ff 1f 06 b1
2020-12-06 12:36:20 DEBUG MsgHistory: Received 0 hops, total 9 for 11 entries
2020-12-06 12:36:20 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f df 20 a2 3f 3c 48 88 ff 1f 06 b1
2020-12-06 12:36:20 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f d7 20 a2 3e 3c 48 88 ff 1f 03 bd
2020-12-06 12:36:20 DEBUG MsgHistory: Received 1 hops, total 10 for 11 entries
2020-12-06 12:36:20 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f d7 20 a2 3e 3c 48 88 ff 1f 03 bd
2020-12-06 12:36:21 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f cf 20 a2 3d 3c 48 88 ff 1f 04 c5
2020-12-06 12:36:21 DEBUG MsgHistory: Received 1 hops, total 8 for 11 entries
2020-12-06 12:36:21 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f cf 20 a2 3d 3c 48 88 ff 1f 04 c5
2020-12-06 12:36:21 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f c7 20 a2 48 3c 48 88 d8 1c 01 ef
2020-12-06 12:36:21 DEBUG MsgHistory: Received 1 hops, total 8 for 11 entries
2020-12-06 12:36:21 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f c7 20 a2 48 3c 48 88 d8 1c 01 ef
2020-12-06 12:36:21 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f bf 20 a2 3f 3c 48 88 ff 1f 01 d6
2020-12-06 12:36:21 DEBUG MsgHistory: Received 1 hops, total 9 for 11 entries
2020-12-06 12:36:21 WARNING Protocol: No read handler found for message type 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00
00 01 0f bf 20 a2 3f 3c 48 88 ff 1f 01 d6
2020-12-06 12:36:22 INFO Protocol: Read 0x51: Ext: 29.53.46->53.bf.6b Type.DIRECT ext cmd: 2f 00

and so on.....

Handle IOLinc Scene in Sync and Import

There is an odd feature in the IOLinc code that creates a modem scene. We need some way to mark this scene as "Safe" so that it isn't deleted with a Sync command or imported by the Import command.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.