nebulous / infinitude

Open control of Carrier/Bryant thermostats
MIT License
225 stars 50 forks source link

Infinitude keeps crashing with Closed: 1006 error #73

Closed bdf0506 closed 4 years ago

bdf0506 commented 5 years ago

Not sure why, but it keeps crashing. Any ideas? I don't think it has to do with the fact that I am running it as a service, but see the below service config:

[root@hassio ~]$ cat /etc/systemd/system/infinitude.service 
[Unit]
Description=Infinitude HVAC control
After=network-online.target

[Service]
Type=simple
WorkingDirectory=/opt/infinitude
ExecStart=/opt/infinitude/infinitude daemon -l http://:8080
Restart=always
User=root

[Install]
WantedBy=multi-user.target

and the log file:

Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] No cache for systems-331xxx6-status. Make Carrier request
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] /systems/331xxx6/status
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] Saving status
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] POST "/systems/331xxxx6/status"
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] Routing to a callback
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] ********** Check Carrier/Bryant change flags ****************
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] 200 OK (0.00466s, 214.592/s)
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] Closed: 1006
Mar 10 18:21:44 hassio infinitude[14333]: [Sun Mar 10 18:21:44 2019] [debug] Closed stream
Mar 10 18:21:44 hassio infinitude[14333]: Server available at http://:8080
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000256/cgroup/filp(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/proc_inode_cache/cgroup/proc_inode_cache(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/sock_inode_cache/cgroup/sock_inode_cache(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000208/cgroup/vm_area_struct(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000128/cgroup/eventpoll_epi(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0002112/cgroup/mm_struct(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000072/cgroup/eventpoll_pwq(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/inode_cache/cgroup/inode_cache(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000064/cgroup/pid(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:0000512/cgroup/kmalloc-512(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/anon_vma/cgroup/anon_vma(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:0000256/cgroup/kmalloc-256(3219:infinitude.service)"
Mar 10 18:21:44 hassio snapd[1050]: udevmon.go:190: udev monitor observed remove event for unknown device "/sys/kernel/slab/:A-0000192/cgroup/cred_jar(3219:infinitude.service)"
Mar 10 18:21:45 hassio systemd[1]: infinitude.service: Service hold-off time over, scheduling restart.
Mar 10 18:21:45 hassio systemd[1]: infinitude.service: Scheduled restart job, restart counter is at 1.
Mar 10 18:21:45 hassio systemd[1]: Stopped Infinitude HVAC control.
Mar 10 18:21:45 hassio systemd[1]: Started Infinitude HVAC control.
Mar 10 18:21:45 hassio infinitude[15463]: Using /dev/ttyUSB0 serial interface
Mar 10 18:21:45 hassio infinitude[15463]: [Sun Mar 10 18:21:45 2019] [info] Listening at "http://:8080"
bdf0506 commented 5 years ago

It appears this is directly related to having the /dev/ttyUSB0 connection here. When i disconnect the USB to serial adapter I have, this error goes away completely. Perhaps it's an issue just with the adapter I am using, or perhaps it's an issue in the code. I am using the following adapter: https://www.amazon.com/gp/product/B076WVFXN8/ref=ppx_yo_dt_b_asin_title_o00_s00?ie=UTF8&psc=1

Craigzyc commented 4 years ago

I'm having the same issue. Any resolution?

nebulous commented 4 years ago

Going through the backlog of issues. Is this still happening? At first glance it doesn't seem related to Infinitude itself since it seems that attempts to open the serial port are bombing. Maybe device permissions or a quirky driver module? @Craigzyc are you using the same adapter?

nebulous commented 4 years ago

Closed due to lack of activity. Please re-open if this issue is impacting you.