Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crashes after few hours of working ok #16

Open
Plampi64 opened this issue Aug 24, 2022 · 0 comments
Open

Crashes after few hours of working ok #16

Plampi64 opened this issue Aug 24, 2022 · 0 comments

Comments

@Plampi64
Copy link

Plampi64 commented Aug 24, 2022

After HA 2022.8.x updates worked fine. Now etrv2mqtt crashes after few hours of operation. I can start it again and then it will again working few hours until again crashes. Log on crash looks like this:

2022-08-24 13:04:36.706 | DEBUG | etrv2mqtt.devices:poll:39 - Polling data from DanfMarianne
2022-08-24 13:04:36.708 | ERROR | main::8 - An error has been caught in function '', process 'MainProcess' (8), thread 'MainThread' (548003052848):
Traceback (most recent call last):

File "/usr/local/bin/etrv2mqtt", line 8, in
sys.exit(entrypoint())
│ │ └ <function entrypoint at 0x7f9602c700>
│ └
└ <module 'sys' (built-in)>
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/cli.py", line 28, in entrypoint
main(sys.argv[1])
│ │ └ ['/usr/local/bin/etrv2mqtt', '/data/options.json']
│ └ <module 'sys' (built-in)>
└ <function main at 0x7f96ff33a0>
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/cli.py", line 17, in main
deviceManager.poll_forever()
│ └ <function DeviceManager.poll_forever at 0x7f95ec9b80>
└ <etrv2mqtt.devices.DeviceManager object at 0x7f9702a1f0>
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/devices.py", line 96, in poll_forever
schedule.run_pending()
│ └ <function run_pending at 0x7f95ec9310>
└ <module 'schedule' from '/usr/local/lib/python3.9/site-packages/schedule/init.py'>
File "/usr/local/lib/python3.9/site-packages/schedule/init.py", line 780, in run_pending
default_scheduler.run_pending()
│ └ <function Scheduler.run_pending at 0x7f95f35c10>
└ <schedule.Scheduler object at 0x7f95ec2580>
File "/usr/local/lib/python3.9/site-packages/schedule/init.py", line 100, in run_pending
self._run_job(job)
│ │ └ Every 3600 seconds do _poll_devices() (last run: 2022-08-24 11:57:28, next run: 2022-08-24 12:57:28)
│ └ <function Scheduler._run_job at 0x7f95f35f70>
└ <schedule.Scheduler object at 0x7f95ec2580>
File "/usr/local/lib/python3.9/site-packages/schedule/init.py", line 172, in _run_job
ret = job.run()
│ └ <function Job.run at 0x7f95ec90d0>
└ Every 3600 seconds do _poll_devices() (last run: 2022-08-24 11:57:28, next run: 2022-08-24 12:57:28)
File "/usr/local/lib/python3.9/site-packages/schedule/init.py", line 661, in run
ret = self.job_func()
│ └ functools.partial(<bound method DeviceManager._poll_devices of <etrv2mqtt.devices.DeviceManager object at 0x7f9702a1f0>>)
└ Every 3600 seconds do _poll_devices() (last run: 2022-08-24 11:57:28, next run: 2022-08-24 12:57:28)
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/devices.py", line 82, in _poll_devices
device.poll(self._mqtt)
│ │ │ └ <etrv2mqtt.mqtt.Mqtt object at 0x7f95ed7c40>
│ │ └ <etrv2mqtt.devices.DeviceManager object at 0x7f9702a1f0>
│ └ <function TRVDevice.poll at 0x7f95ec9940>
└ <etrv2mqtt.devices.TRVDevice object at 0x7f95ed7130>
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/devices.py", line 44, in poll
ret = eTRVUtils.read_device(self._device)
│ │ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ │ └ <etrv2mqtt.devices.TRVDevice object at 0x7f95ed7130>
│ └ <staticmethod object at 0x7f95ff0d90>
└ <class 'etrv2mqtt.etrvutils.eTRVUtils'>
File "/usr/local/lib/python3.9/site-packages/etrv2mqtt/etrvutils.py", line 34, in read_device
return eTRVData(device.name, device.battery, device.temperature.room_temperature, device.temperature.set_point_temperature, datetime.now())
│ │ │ │ │ │ │ │ │ │ └ <method 'now' of 'datetime.datetime' objects>
│ │ │ │ │ │ │ │ │ └ <class 'datetime.datetime'>
│ │ │ │ │ │ │ │ └ <libetrv.properties.eTRVProperty object at 0x7f95ff94f0>
│ │ │ │ │ │ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ │ │ │ │ │ └ <libetrv.properties.eTRVProperty object at 0x7f95ff94f0>
│ │ │ │ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ │ │ │ └ <libetrv.properties.eTRVProperty object at 0x7f95ff9460>
│ │ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ │ └ <libetrv.properties.eTRVProperty object at 0x7f95ff9640>
│ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
└ <class 'etrv2mqtt.etrvutils.eTRVData'>
File "/usr/local/lib/python3.9/site-packages/libetrv/properties.py", line 22, in get
return self.get_data_object(device).retrieve()
│ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ └ <function eTRVProperty.get_data_object at 0x7f95fbd4c0>
└ <libetrv.properties.eTRVProperty object at 0x7f95ff94f0>
File "/usr/local/lib/python3.9/site-packages/libetrv/properties.py", line 59, in retrieve
self.read()
│ └ <function eTRVData.read at 0x7f95fbdaf0>
└ <libetrv.data_struct.TemperatureData object at 0x7f95699160>
File "/usr/local/lib/python3.9/site-packages/libetrv/properties.py", line 91, in read
data = etrv_read_data(self.device, handler, send_pin, use_encoding)
│ │ │ │ │ └ True
│ │ │ │ └ True
│ │ │ └ 45
│ │ └ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
│ └ <libetrv.data_struct.TemperatureData object at 0x7f95699160>
└ <function etrv_read_data at 0x7f95fb1d30>
File "/usr/local/lib/python3.9/site-packages/libetrv/utils.py", line 20, in etrv_read_data
data = device.ble_device.readCharacteristic(handler)
│ │ │ └ 45
│ │ └ <function Peripheral.readCharacteristic at 0x7f9605f3a0>
│ └ <bluepy.btle.Peripheral object at 0x7f95ed7280>
└ <libetrv.device.eTRVDevice object at 0x7f95ed7df0>
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 529, in readCharacteristic
self._writeCmd("rd %X\n" % handle)
│ │ └ 45
│ └ <function BluepyHelper._writeCmd at 0x7f9605c790>
└ <bluepy.btle.Peripheral object at 0x7f95ed7280>
File "/usr/local/lib/python3.9/site-packages/bluepy/btle.py", line 302, in _writeCmd
raise BTLEInternalError("Helper not started (did you call connect()?)")
└ <class 'bluepy.btle.BTLEInternalError'>
bluepy.btle.BTLEInternalError: Helper not started (did you call connect()?)

In addition, Watchdog -function does not restart service as it should after crash. Have to start it manually.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant