ztalbot2000 / homebridge-cmd4

CMD4 Plugin for Homebridge - Supports ~All Accessory Types & now all Characteristics too
Apache License 2.0
149 stars 13 forks source link

Fakegato logging #101

Closed jameswestcott closed 3 years ago

jameswestcott commented 3 years ago

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt

ztalbot2000 commented 3 years ago

Send me your config.json and I'll look to find out what's wrong.

TTFN, John

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA .

ztalbot2000 commented 3 years ago

Oops, you did.

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA .

jameswestcott commented 3 years ago

Thanks John. Attached is the config.json file.

This is on a windows system. When the accessory is defined in a platform, no data appears at all in the eve app. When defined as a HomeBridge accessory, the data graphs appear with logs entries every 10 mins, but their values are set at 0.

Also, nothing ever gets saved in the storagePath folder. Wasn't sure if that was an escape character issue with the backslash.

James

On Sun, 21 Mar 2021 at 23:55, John Talbot @.***> wrote:

Send me your config.json and I'll look to find out what's wrong.

TTFN, John

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt <https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803683917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCLF5WDSOGBGVYAKDM27FTTE2BPFANCNFSM4ZSC2TLA .

jameswestcott commented 3 years ago

Hi John,

To give you an update as I've just reset everything and cleared the cache. I'm now getting the temperature logging correctly working when defined as a HomeBridge accessory. Yay! But the humidity value is still coming through in the logs as 0. Spot humidity value correctly displayed.

James

On Sun, 21 Mar 2021 at 23:55, John Talbot @.***> wrote:

Send me your config.json and I'll look to find out what's wrong.

TTFN, John

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt <https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803683917, or unsubscribe https://github.com/notifications/unsubscribe-auth/AMCLF5WDSOGBGVYAKDM27FTTE2BPFANCNFSM4ZSC2TLA .

ztalbot2000 commented 3 years ago

Hi,

So my quick find is that a temperature sensor does not have humidity. Cmd4 adds the characteristic anyway, but either Homebridge or Eve does not recognize it. I can't control what GUI's or HomeBridge chooses not to display. A thermostat has humidity and temperature. You might want to try that.

Ttyl, John

On Sun, Mar 21, 2021 at 8:13 PM jameswestcott @.***> wrote:

Hi John,

To give you an update as I've just reset everything and cleared the cache. I'm now getting the temperature logging correctly working when defined as a HomeBridge accessory. Yay! But the humidity value is still coming through in the logs as 0. Spot humidity value correctly displayed.

James

On Sun, 21 Mar 2021 at 23:55, John Talbot @.***> wrote:

Send me your config.json and I'll look to find out what's wrong.

TTFN, John

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt < https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803683917 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMCLF5WDSOGBGVYAKDM27FTTE2BPFANCNFSM4ZSC2TLA

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803687228, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3BX3YTISM4IGJR7MDTE2DRBANCNFSM4ZSC2TLA .

jameswestcott commented 3 years ago

ok. let me try a different accessory type and see what happens. interesting that eve does display humidity on the temperature sensor.

jameswestcott commented 3 years ago

I've now created two accessories: 1 temp sensor and 1 humidity sensor. Each only polling the relevant characteristic. I now only get one graph for each accessory in eve as expected. The temperature graph works fine. The humidity graph still displays 0, even though the spot value displays the correct value.

Three things I noticed in the logs:

  1. Both accessory types try to log 3 characteristics (temp, humidity & ppm) even though only one is defined.
  2. The humidity characteristic is labelled as undefined.
  3. The accessory label of the last log entry is incorrect. It says temp5 but seems to be logging humid5.

[3/22/2021, 00:59:45] [temp5] Logging temp:17 humidity:undefined ppm:0 [3/22/2021, 00:59:45] [temp5] Fakegato-timer: addData temp5 { time: 1616374785, temp: 17, undefined: undefined, ppm: 0 } immediate: false [3/22/2021, 00:59:45] [humid5] Logging temp:undefined humidity:57 ppm:0 [3/22/2021, 00:59:45] [temp5] Fakegato-timer: addData humid5 { time: 1616374785, temp: undefined, undefined: 57, ppm: 0 } immediate: false

ztalbot2000 commented 3 years ago

Ok, Will look at it in the morning

Night, John

On Sun, Mar 21, 2021 at 8:13 PM jameswestcott @.***> wrote:

Hi John,

To give you an update as I've just reset everything and cleared the cache. I'm now getting the temperature logging correctly working when defined as a HomeBridge accessory. Yay! But the humidity value is still coming through in the logs as 0. Spot humidity value correctly displayed.

James

On Sun, 21 Mar 2021 at 23:55, John Talbot @.***> wrote:

Send me your config.json and I'll look to find out what's wrong.

TTFN, John

On Sun, Mar 21, 2021 at 7:53 PM jameswestcott @.***> wrote:

I'm setting up a TemperatureSensor with fakegato logging with eve room.

Spot temp and humidity values are displaying ok, but I'm having issues with no logs appearing in the eve app. There's nothing obvious in the homebridge logs in debug mode.

I did spot the humidity value is appearing as undefined. Is this a bug?

[3/21/2021, 23:39:29] [temp_3] Logging temp:16 humidity:50 ppm:0 [3/21/2021, 23:39:29] [temp_3] **Fakegato-timer: addData temp_3 { time: 1616369969, temp: 16, undefined: 50, ppm: 0 } immediate: false

HomeBridge config file is attached. config.txt < https://github.com/ztalbot2000/homebridge-cmd4/files/6178646/config.txt

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ABSBCX3EMZZZVKHXENWUY2TTE2BHLANCNFSM4ZSC2TLA

.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub < https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803683917 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AMCLF5WDSOGBGVYAKDM27FTTE2BPFANCNFSM4ZSC2TLA

.

— You are receiving this because you commented.

Reply to this email directly, view it on GitHub https://github.com/ztalbot2000/homebridge-cmd4/issues/101#issuecomment-803687228, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABSBCX3BX3YTISM4IGJR7MDTE2DRBANCNFSM4ZSC2TLA .

ztalbot2000 commented 3 years ago

Fixed in v3.3.2.

When things were moved to constants, a constant was spelled incorrectly for humidity. You would think lint would pick up things like that, but I guess not.

My log now shows: [3/22/2021, 3:30:20 PM] [Cmd4] getValue: CurrentTemperature function for: temp_3 returned: 22.2 [3/22/2021, 3:30:20 PM] [Cmd4] characteristicPolling Updating temp_3 CurrentTemperature 22.2 [3/22/2021, 3:30:20 PM] [Cmd4] Logging temp:22.2 humidity:60.2 ppm:0 [3/22/2021, 3:30:20 PM] [Cmd4] **Fakegato-timer: addData temp_3 { time: 1616441420, temp: 22.2, humidity: 60.2, ppm: 0 } immediate: false

Sorry for the inconvenience. By the way, this was not affected by the Accessory type, just those with eve:room.