Multiple (some erroneous) state messages appear in log when HS changes the state of lights with a fan with an Up and Down light (see log below). When I turn on a "DownLight" on, AK Bond can report that the down light went OFF when it is already OFF, then went ON and the UpLight went ON when it is actually OFF, then went OFF when it was OFF all along.
To duplicate this
1. start with both lights ON,
2. then turn the down light OFF,
3. then turn the UP light OFF. This should leave Bond in the state shown at the bottom of this post: "light":1,"up_light":0,"down_light":1
4. Then turn the down light ON.
The HS device ICONs are correct at every step, but some of the the logged changes are incorrect. I assume this is because of the way you are dealing with the three lights (UpLight, DownLight, and Light) when there are really only two physical lights (UpLight and DownLight) and Light is a odd combination of UpLight and DownLIght.
AK Bond ANDs the state of Light with UpLight and DownLight to reflect the state of the physical lights so it can set the HS ICONs properly (which it does correctly). I'm guessing that you are registering a state change before you do the AND and that is what is causing the problem. And that is further confused by reporting the state of the UpLight and DownLight whenever Light changes state.
I suppose you could consider this a "who cares" scenario as it does not effect the functioning of the device and in the end the state reporting is correct. However, it is confusing when trying to use the log to determine if events are working properly (the main reason for having the log in my opinion).
.
Bond state before the ON command
To duplicate this
1. start with both lights ON,
2. then turn the down light OFF,
3. then turn the UP light OFF. This should leave Bond in the state shown at the bottom of this post: "light":1,"up_light":0,"down_light":1
4. Then turn the down light ON.
The HS device ICONs are correct at every step, but some of the the logged changes are incorrect. I assume this is because of the way you are dealing with the three lights (UpLight, DownLight, and Light) when there are really only two physical lights (UpLight and DownLight) and Light is a odd combination of UpLight and DownLIght.
AK Bond ANDs the state of Light with UpLight and DownLight to reflect the state of the physical lights so it can set the HS ICONs properly (which it does correctly). I'm guessing that you are registering a state change before you do the AND and that is what is causing the problem. And that is further confused by reporting the state of the UpLight and DownLight whenever Light changes state.
I suppose you could consider this a "who cares" scenario as it does not effect the functioning of the device and in the end the state reporting is correct. However, it is confusing when trying to use the log to determine if events are working properly (the main reason for having the log in my opinion).
Code:
[TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][648]: Device: Sue's Fan Down Light Set to -18 (TurnDownLightOn)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][640]: ValueChanged 'down_light': 1 (old 0)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][646]: Device: Sue's Fan Up Light Set to -15 (TurnUpLightOff)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][640]: ValueChanged 'up_light': 0 (old 1)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][648]: Device: Sue's Fan Down Light Set to -19 (TurnDownLightOff)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][646]: Device: Sue's Fan Up Light Set to -14 (TurnUpLightOn)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][640]: ValueChanged 'light': 1 (old 0)[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:13 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][480]: BPUP status update: {"B":"ZZCC69147","t":"devices/27a50892/state","i":"0500006436c8e6df","f":100,"s":200,"m":0,"b":{"po wer":0,"speed":1,"light":1,"up_light":0,"down_light":1,"_": " 6e0e2edb"}}[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:12 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][480]: Execute cmd: /v2/devices/27a50892/actions/TurnDownLightOn/[/TD] [/TR] [/TABLE] [TABLE] [TR] [TD="align: left"]Mar-03 11:14:12 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]Device Control[/TD] [TD="colspan: 8, align: left"]Device: Bond Sue's Room Sue's Fan Down Light to On (-18) by/from: CAPI Control Handler[/TD] [/TR] [/TABLE]
Bond state before the ON command
Code:
[TABLE] [TR] [TD="align: left"]Mar-03 11:13:58 AM[/TD] [TD="align: left"] [/TD] [TD="colspan: 3, align: left"]AK Bond[/TD] [TD="colspan: 8, align: left"][480]: BPUP status update: {"B":"ZZCC69147","t":"devices/27a50892/state","i":"050000fbf0fc9499","f":100,"s":200,"m":0,"b":{"po wer":0,"speed":1,"light":0,"up_light":1,"down_light":0,"_": " 1fba4a5a"}}[/TD] [/TR] [/TABLE]
Comment