NorthernMan54 / homebridge-acurite-temperature

Fridge and Freezer temperature sensor using a RTL-SDR and the Acurite 986 Fridge/Freezer temperature sensor
MIT License
5 stars 0 forks source link

homebridge always reports timeout for device #6

Open campanel54 opened 4 years ago

campanel54 commented 4 years ago

Installed per instructions, running on a Raspberry PI3, but don't seem to get any connection between HB and the plugin. Seems to register ok, I can test rtf_433 outside of HB and all works ok. For "devices" I used the "id" of the sensors. Accessories always says 32 degrees.
Am I missing something?

NorthernMan54 commented 4 years ago

Share your log file, it should log what the sensor see’s

On May 9, 2020, at 1:54 PM, campanel54 notifications@github.com wrote:

 Installed per instructions, running on a Raspberry PI3, but don't seem to get any connection between HB and the plugin. Seems to register ok, I can test rtf_433 outside of HB and all works ok. For "devices" I used the "id" of the sensors. Accessories always says 32 degrees. Am I missing something?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe.

campanel54 commented 4 years ago

Thanks for looking at this. No err log file. This is the section from Restart.

[5/9/2020, 18:57:41] [HB Supervisor] Restarting Homebridge... [5/9/2020, 18:57:41] [HB Supervisor] Starting Homebridge with extra flags: -I -D [5/9/2020, 18:57:41] [HB Supervisor] Started Homebridge v1.0.4 with PID: 22235 [5/9/2020, 18:57:42] Loaded config.json with 0 accessories and 7 platforms. [5/9/2020, 18:57:42] --- [5/9/2020, 18:57:45] Loaded plugin: homebridge-acurite-temperature [5/9/2020, 18:57:46] Registering platform 'homebridge-acurite-temperature.Acurite' [5/9/2020, 18:57:46] --- [5/9/2020, 18:57:46] Loaded plugin: homebridge-bravia [5/9/2020, 18:57:46] Registering platform 'homebridge-bravia.BraviaPlatform' [5/9/2020, 18:57:46] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-camera-ffmpeg [5/9/2020, 18:57:47] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-config-ui-x [5/9/2020, 18:57:47] Registering platform 'homebridge-config-ui-x.config' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-ecoplug [5/9/2020, 18:57:47] Registering platform 'homebridge-ecoplug.EcoPlug' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:48] Loaded plugin: homebridge-mylink [5/9/2020, 18:57:48] Registering platform 'homebridge-mylink.Somfy myLink' [5/9/2020, 18:57:48] --- [5/9/2020, 18:57:48] Loaded plugin: homebridge-sonoff [5/9/2020, 18:57:48] Registering platform 'homebridge-sonoff.Sonoff' [5/9/2020, 18:57:48] --- [5/9/2020, 18:57:48] Loading 7 platforms... [5/9/2020, 18:57:48] [Config] Initializing config platform... [5/9/2020, 18:57:48] [Config] Running in Service Mode [5/9/2020, 18:57:48] [EcoPlug] Initializing EcoPlug platform... [5/9/2020, 18:57:48] [Camera-ffmpeg] Initializing Camera-ffmpeg platform... [5/9/2020, 18:57:48] [Sonoff] Initializing Sonoff platform... [5/9/2020, 18:57:48] [BraviaPlatform] Initializing BraviaPlatform platform... [5/9/2020, 18:57:48] [Acurite] Initializing Acurite platform... [5/9/2020, 18:57:48] [Acurite] Adding device 65 Campanelli [5/9/2020, 18:57:48] [Acurite] Adding device 6473 Ridder [5/9/2020, 18:57:48] Initializing platform accessory 'Campanelli'... [5/9/2020, 18:57:48] [Acurite] getServices Campanelli [5/9/2020, 18:57:48] [Acurite] Fakegato-timer Subscription : Campanelli [5/9/2020, 18:57:48] [Acurite] Registring Events Campanelli [5/9/2020, 18:57:48] [Acurite] Accessory Campanelli [5/9/2020, 18:57:48] Initializing platform accessory 'Ridder'... [5/9/2020, 18:57:48] [Acurite] getServices Ridder [5/9/2020, 18:57:48] [Acurite] Fakegato-timer Subscription : Ridder [5/9/2020, 18:57:48] [Acurite] Registring Events Ridder [5/9/2020, 18:57:48] [Acurite] Accessory Ridder [5/9/2020, 18:57:48] [Somfy myLink] Initializing Somfy myLink platform... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Master Bedroom'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Master Bath'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Upper'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Lower'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Upper North'... [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Roadside Porch Light [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Roadside Soffit [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Lakeside Soffit [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Back Retaining Wall [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Lake wall lights [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Office Shelf [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7800E493 inside Xmas [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7800D984 Street Lts [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-78032E6B Dining Rm [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7802CD7C outside Xmas [5/9/2020, 18:57:48] [BraviaPlatform] Restoring Sony Bravia from HomeKit [5/9/2020, 18:57:48] [Sonoff] Cached accessories loaded. (node:22235) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [5/9/2020, 18:57:48] Roadside Porch Cam is running on port 37229. [5/9/2020, 18:57:48] Please add [Roadside Porch Cam] manually in Home app. Setup Code: 927-35-812 [5/9/2020, 18:57:48] Lakeside Porch Cam is running on port 35805. [5/9/2020, 18:57:48] Please add [Lakeside Porch Cam] manually in Home app. Setup Code: 927-35-812 Setup Payload: X-HM://0025057ICG0D4 Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 927-35-812 │     
└────────────┘     

[5/9/2020, 18:57:48] Homebridge is running on port 51071. [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 59:D9:74:6D:ED:F7 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 59:D9:74:6D:ED:F7 via http://10.0.1.5:37229/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 0E:4B:E4:99:28:35 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 0E:4B:E4:99:28:35 via http://10.0.1.5:51071/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 59:D9:74:6D:ED:F7 via http://10.0.1.5:37229/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 0E:4B:E4:99:28:35 via http://10.0.1.5:51071/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 82:A8:EB:8F:7B:B0 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 82:A8:EB:8F:7B:B0 via http://10.0.1.5:35805/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: [10.0.1.5:37229 (59:D9:74:6D:ED:F7)] Instance Registered [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: [10.0.1.5:51071 (0E:4B:E4:99:28:35)] Instance Registered [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 82:A8:EB:8F:7B:B0 via http://10.0.1.5:35805/accessories [5/9/2020, 18:57:51] [Config] [HapClient] Discovery :: [10.0.1.5:35805 (82:A8:EB:8F:7B:B0)] Instance Registered [5/9/2020, 18:58:37] [Config] [HapClient] Discovery :: Ended

On May 9, 2020, at 2:02 PM, Northern Man notifications@github.com wrote:

Share your log file, it should log what the sensor see’s

On May 9, 2020, at 1:54 PM, campanel54 notifications@github.com wrote:

 Installed per instructions, running on a Raspberry PI3, but don't seem to get any connection between HB and the plugin. Seems to register ok, I can test rtf_433 outside of HB and all works ok. For "devices" I used the "id" of the sensors. Accessories always says 32 degrees. Am I missing something?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-acurite-temperature/issues/6#issuecomment-626213938, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPLUSXEPXVS7UIEBVMAJPDRQWLEVANCNFSM4M44PTHQ.

campanel54 commented 4 years ago

This is the output from rtf_433. I have two devices I’m monitoring. pi@hassbian:~/HomeBridge $ /usr/local/bin/rtl_433 -F json rtl_433 version 20.02-20-g0e355dc branch master at 202003281909 inputs file rtl_tcp RTL-SDR SoapySDR Use -h for usage help and see https://triq.org/ for documentation. Trying conf file at "rtl_433.conf"... Trying conf file at "/home/pi/.config/rtl_433/rtl_433.conf"... Trying conf file at "/usr/local/etc/rtl_433/rtl_433.conf"... Trying conf file at "/etc/rtl_433/rtl_433.conf"... Registered 122 out of 150 device decoding protocols [ 1-4 8 11-12 15-17 19-21 23 25-26 29-36 38-60 63 67-71 73-100 102-105 108-116 119 121 124-128 130-149 ] Found Rafael Micro R820T tuner Exact sample rate is: 250000.000414 Hz [R82XX] PLL not locked! Sample rate set to 250000 S/s. Tuner gain set to Auto. Tuned to 433.920MHz. Allocating 15 zero-copy buffers {"time" : "2020-05-09 19:17:39", "model" : "Acurite-609TXC", "id" : 65, "battery_ok" : 0, "temperature_C" : 3.500, "humidity" : 60, "status" : 9, "mic" : "CHECKSUM"} {"time" : "2020-05-09 19:17:39", "model" : "Acurite-609TXC", "id" : 65, "battery_ok" : 0, "temperature_C" : 3.500, "humidity" : 60, "status" : 9, "mic" : "CHECKSUM"} {"time" : "2020-05-09 19:17:53", "model" : "Acurite-3n1", "subtype" : 32, "id" : 6473, "channel" : "B", "sequence_num" : 1, "battery_ok" : 1, "wind_avg_mi_h" : 7.000, "temperature_F" : 37.500, "humidity" : 73, "mic" : "CHECKSUM"} {"time" : "2020-05-09 19:17:53", "model" : "Acurite-3n1", "subtype" : 32, "id" : 6473, "channel" : "B", "sequence_num" : 1, "battery_ok" : 1, "wind_avg_mi_h" : 7.000, "temperature_F" : 37.500, "humidity" : 73, "mic" : "CHECKSUM"} ^CSignal caught, exiting!

On May 9, 2020, at 2:05 PM, Mic mcampane@rochester.rr.com wrote:

Thanks for looking at this. No err log file. This is the section from Restart.

[5/9/2020, 18:57:41] [HB Supervisor] Restarting Homebridge... [5/9/2020, 18:57:41] [HB Supervisor] Starting Homebridge with extra flags: -I -D [5/9/2020, 18:57:41] [HB Supervisor] Started Homebridge v1.0.4 with PID: 22235 [5/9/2020, 18:57:42] Loaded config.json with 0 accessories and 7 platforms. [5/9/2020, 18:57:42] --- [5/9/2020, 18:57:45] Loaded plugin: homebridge-acurite-temperature [5/9/2020, 18:57:46] Registering platform 'homebridge-acurite-temperature.Acurite' [5/9/2020, 18:57:46] --- [5/9/2020, 18:57:46] Loaded plugin: homebridge-bravia [5/9/2020, 18:57:46] Registering platform 'homebridge-bravia.BraviaPlatform' [5/9/2020, 18:57:46] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-camera-ffmpeg [5/9/2020, 18:57:47] Registering platform 'homebridge-camera-ffmpeg.Camera-ffmpeg' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-config-ui-x [5/9/2020, 18:57:47] Registering platform 'homebridge-config-ui-x.config' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:47] Loaded plugin: homebridge-ecoplug [5/9/2020, 18:57:47] Registering platform 'homebridge-ecoplug.EcoPlug' [5/9/2020, 18:57:47] --- [5/9/2020, 18:57:48] Loaded plugin: homebridge-mylink [5/9/2020, 18:57:48] Registering platform 'homebridge-mylink.Somfy myLink' [5/9/2020, 18:57:48] --- [5/9/2020, 18:57:48] Loaded plugin: homebridge-sonoff [5/9/2020, 18:57:48] Registering platform 'homebridge-sonoff.Sonoff' [5/9/2020, 18:57:48] --- [5/9/2020, 18:57:48] Loading 7 platforms... [5/9/2020, 18:57:48] [Config] Initializing config platform... [5/9/2020, 18:57:48] [Config] Running in Service Mode [5/9/2020, 18:57:48] [EcoPlug] Initializing EcoPlug platform... [5/9/2020, 18:57:48] [Camera-ffmpeg] Initializing Camera-ffmpeg platform... [5/9/2020, 18:57:48] [Sonoff] Initializing Sonoff platform... [5/9/2020, 18:57:48] [BraviaPlatform] Initializing BraviaPlatform platform... [5/9/2020, 18:57:48] [Acurite] Initializing Acurite platform... [5/9/2020, 18:57:48] [Acurite] Adding device 65 Campanelli [5/9/2020, 18:57:48] [Acurite] Adding device 6473 Ridder [5/9/2020, 18:57:48] Initializing platform accessory 'Campanelli'... [5/9/2020, 18:57:48] [Acurite] getServices Campanelli [5/9/2020, 18:57:48] [Acurite] Fakegato-timer Subscription : Campanelli [5/9/2020, 18:57:48] [Acurite] Registring Events Campanelli [5/9/2020, 18:57:48] [Acurite] Accessory Campanelli [5/9/2020, 18:57:48] Initializing platform accessory 'Ridder'... [5/9/2020, 18:57:48] [Acurite] getServices Ridder [5/9/2020, 18:57:48] [Acurite] Fakegato-timer Subscription : Ridder [5/9/2020, 18:57:48] [Acurite] Registring Events Ridder [5/9/2020, 18:57:48] [Acurite] Accessory Ridder [5/9/2020, 18:57:48] [Somfy myLink] Initializing Somfy myLink platform... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Master Bedroom'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Master Bath'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Upper'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Lower'... [5/9/2020, 18:57:48] Initializing platform accessory 'Somfy Living Rm Upper North'... [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Roadside Porch Light [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Roadside Soffit [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Lakeside Soffit [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Back Retaining Wall [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Lake wall lights [5/9/2020, 18:57:48] [Sonoff] Loaded accessory Office Shelf [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7800E493 inside Xmas [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7800D984 Street Lts [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-78032E6B Dining Rm [5/9/2020, 18:57:48] [EcoPlug] configureAccessory ECO-7802CD7C outside Xmas [5/9/2020, 18:57:48] [BraviaPlatform] Restoring Sony Bravia from HomeKit [5/9/2020, 18:57:48] [Sonoff] Cached accessories loaded. (node:22235) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. [5/9/2020, 18:57:48] Roadside Porch Cam is running on port 37229. [5/9/2020, 18:57:48] Please add [Roadside Porch Cam] manually in Home app. Setup Code: 927-35-812 [5/9/2020, 18:57:48] Lakeside Porch Cam is running on port 35805. [5/9/2020, 18:57:48] Please add [Lakeside Porch Cam] manually in Home app. Setup Code: 927-35-812 Setup Payload: X-HM://0025057ICG0D4 <x-hm://0025057ICG0D4> Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 927-35-812 │     
└────────────┘     

[5/9/2020, 18:57:48] Homebridge is running on port 51071. [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 59:D9:74:6D:ED:F7 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 59:D9:74:6D:ED:F7 via http://10.0.1.5:37229/accessories http://10.0.1.5:37229/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 0E:4B:E4:99:28:35 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 0E:4B:E4:99:28:35 via http://10.0.1.5:51071/accessories http://10.0.1.5:51071/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 59:D9:74:6D:ED:F7 via http://10.0.1.5:37229/accessories http://10.0.1.5:37229/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 0E:4B:E4:99:28:35 via http://10.0.1.5:51071/accessories http://10.0.1.5:51071/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Found HAP device with username 82:A8:EB:8F:7B:B0 [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Testing 82:A8:EB:8F:7B:B0 via http://10.0.1.5:35805/accessories http://10.0.1.5:35805/accessories [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: [10.0.1.5:37229 (59:D9:74:6D:ED:F7)] Instance Registered [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: [10.0.1.5:51071 (0E:4B:E4:99:28:35)] Instance Registered [5/9/2020, 18:57:49] [Config] [HapClient] Discovery :: Success 82:A8:EB:8F:7B:B0 via http://10.0.1.5:35805/accessories http://10.0.1.5:35805/accessories [5/9/2020, 18:57:51] [Config] [HapClient] Discovery :: [10.0.1.5:35805 (82:A8:EB:8F:7B:B0)] Instance Registered [5/9/2020, 18:58:37] [Config] [HapClient] Discovery :: Ended

On May 9, 2020, at 2:02 PM, Northern Man <notifications@github.com mailto:notifications@github.com> wrote:

Share your log file, it should log what the sensor see’s

On May 9, 2020, at 1:54 PM, campanel54 <notifications@github.com mailto:notifications@github.com> wrote:

 Installed per instructions, running on a Raspberry PI3, but don't seem to get any connection between HB and the plugin. Seems to register ok, I can test rtf_433 outside of HB and all works ok. For "devices" I used the "id" of the sensors. Accessories always says 32 degrees. Am I missing something?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or unsubscribe. — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-acurite-temperature/issues/6#issuecomment-626213938, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPLUSXEPXVS7UIEBVMAJPDRQWLEVANCNFSM4M44PTHQ.

NorthernMan54 commented 4 years ago

Tks for the second dump, that shows the issue. This particular sensor isn't compatible with this plugin, but it will be compatible with homebridge-rtl

Please install that one instead and it should be fine.

campanel54 commented 4 years ago

Hi, still working on it. Removed accurate-temperature and added rtf package. First message I see is this:

[5/11/2020, 16:19:03] Plugin 'homebridge-rtl' tried to register with an incorrect plugin identifier: 'homebridge-rtl_433'. Please report this to the developer!

Modified the update to be every two minutes vs 1, removed the pkill and put a timer on the rtf_433, i.e., -T 60, so it only runs for 60sec then exits. I see in the logs it’s emitting the error message but the code is zero which usually means success.

[5/11/2020, 16:19:14] [rtl_433] Spawning rtl_433 [5/11/2020, 16:19:14] [rtl_433] child exit code (spawn) 0 [5/11/2020, 16:19:14] [rtl_433] child close code (spawn) 0 [5/11/2020, 16:19:24] [rtl_433] Spawning rtl_433 [5/11/2020, 16:19:24] [rtl_433] child exit code (spawn) 0 [5/11/2020, 16:19:24] [rtl_433] child close code (spawn) 0 …

New to Nodejs content so still trying to debug. The accessory shows up but always says 32 degrees.

Thanks Mic

On May 10, 2020, at 11:18 AM, Northern Man notifications@github.com wrote:

Tks for the second dump, that shows the issue. This particular sensor isn't compatible with this plugin, but it will be compatible with homebridge-rtl

Please install that one instead and it should be fine.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/NorthernMan54/homebridge-acurite-temperature/issues/6#issuecomment-626343733, or unsubscribe https://github.com/notifications/unsubscribe-auth/APPLUSXCNUS6WBEK566BTU3RQ3AUDANCNFSM4M44PTHQ.

NorthernMan54 commented 4 years ago

I'm not sure why you had to change the code as it should have been fine without changes.

The pkill is there to ensure that this plugin is the one that starts rtl_433 and is receiving the messages. If it doesn't start rtl_433 it won't be able to receive messages containing the sensor messages. Stopping and starting rtl_433 will cause it to not work

The refresh setting is for how often it updates the Fakegato library with the current sensor value. This is just to ensure the fakegato receives regular updates for when sensors don't send values for extended periods of time.

campanel54 commented 4 years ago

I started playing with it because out of the box it didn’t work. The configuration type is temperature. It was exiting with error code 1. I traced it to the rtl_433 command and with some minor changes the error code went to 0, but it still is going into the error section of the code. And no luck updating the accessory, always says 32 when it’s about 50 out.

I understand the pkill and your other points, what I don’t understand is it seems like the spawn doesn’t return any output? Yet if I run the rtl_433 command outside it works ok.

Thanks for your comments. It’s slow going, my next task is to learn how to write a plugin. Maybe then I’ll get a better understanding of how this all works!

On May 11, 2020, at 5:40 PM, Northern Man notifications@github.com wrote:  I'm not sure why you had to change the code as it should have been fine without changes.

The pkill is there to ensure that this plugin is the one that starts rtl_433 and is receiving the messages. If it doesn't start rtl_433 it won't be able to receive messages containing the sensor messages. Stopping and starting rtl_433 will cause it to not work

The refresh setting is for how often it updates the Fakegato library with the current sensor value. This is just to ensure the fakegato receives regular updates for when sensors don't send values for extended periods of time.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

NorthernMan54 commented 4 years ago

The way this works, is that it spawns rtl_433 and then listens to the output from the program here

https://github.com/NorthernMan54/homebridge-rtl/blob/f023c43ba2ebdf32aa8099ca8391dd1bec7fb8d6/sensor.js#L64

it then parses the periodic output from rtl_433, looking for the sensor id. and if it finds a matching id sends it to the homebridge code to update HomeKit

In DEBUG=* mode it will log every message from rtl_433 prior to parsing here

https://github.com/NorthernMan54/homebridge-rtl/blob/f023c43ba2ebdf32aa8099ca8391dd1bec7fb8d6/sensor.js#L65