nebulous / infinitude

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

Calling /api/status results in two uninitialized value errors #75

Closed bdf0506 closed 4 years ago

bdf0506 commented 5 years ago

Looks like there is some sort of bug in the code here in line 170 and 177. It's something with the regex matching, but I can't figure out what.

If you navigate to http://:3000/api/status, you get an output on the browser. On the backend, you see the following log messages.

Mar 15 10:37:25 server infinitude[28968]: [Fri Mar 15 10:37:25 2019] [debug] GET "/api/status/"
Mar 15 10:37:25 server infinitude[28968]: [Fri Mar 15 10:37:25 2019] [debug] Routing to a callback
Mar 15 10:37:25 server infinitude[28968]: Use of uninitialized value $zone_id in pattern match (m//) at /opt/infinitude/infinitude line 170.
Mar 15 10:37:25 server infinitude[28968]: Use of uninitialized value $prop in pattern match (m//) at /opt/infinitude/infinitude line 177.
Mar 15 10:37:25 server infinitude[28968]: [Fri Mar 15 10:37:25 2019] [debug] 200 OK (0.003902s, 256.279/s)

Note, if you go to the status for an individual zone (such as http://:3000/api/status/1), all is well

ijg commented 4 years ago

Bump. Still having this issue. Not sure if it's an easy fix or not.

nebulous commented 4 years ago

pushed a tweak which should silence that warning. feel free to close this issue if so.

nebulous commented 4 years ago

hearing nothing I'll assume the above fixed the issue.