paulw11 / homebridge-wiser

Clipsal C-Bus Wiser plugin for home bridge
MIT License
11 stars 5 forks source link

[Wiser] Error parsing response: Error: Unclosed root tag Line: 0 Column: 1469 #9

Closed Chris-JL closed 3 years ago

Chris-JL commented 4 years ago

According to the log file I periodically get the error: "[Wiser] Error parsing response: Error: Unclosed root tag Line: 0 Column: 1469"

This might (or not) be connected to two issues I constantly have: 1) systematically my homebridge gets wrong the status of several lights (oddly, the non-dimmable ones) that are connected to the Wiser hub; 2) the Wiser hub in my house can read and set the temperature of different rooms, but this information and function is not passed to home bridge.

Any help, would be greatly appreciated.

cbaddah commented 3 years ago

I get the same error messages with a basic setup. I.e. there is no temperature sensor. image

paulw11 commented 3 years ago

Can you run Homebridge in debug mode? That will provide more information, in particular it will provide your entire Wiser project XML file. If you can attach your home bridge debug log it will help a lot.

thealphabonanza commented 3 years ago

I have Wiser running on Homebridge on an Ubuntu machine and never received that error. Today I have just installed Homebridge with the Wiser plugin on a Windows 10 box and have now started to get this error every hour on the hour. The error only shows up on the Windows machine. homebridgexx.log

[12/06/2021, 10:00:05 pm] [Wiser2] Received <cbus_event app="0x102" name="cbusPowerHistoryTotals" hourly_energy_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," daily_energy_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," weekly_energy_totals="0.00,0.00,0.00,0.00," monthly_energy_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," hourly_cost_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," daily_cost_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0 [12/06/2021, 10:00:05 pm] [Wiser2]   [12/06/2021, 10:00:05 pm] [Wiser2] .00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," weekly_cost_totals="0.00,0.00,0.00,0.00," monthly_cost_totals="0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00,0.00," current_total_power="0.00" current_total_cost="0.00" current_total_power_hour="0.00" current_total_power_day="0.00" current_total_power_week="0.00" current_total_power_month="0.00" current_total_cost_hour="0.00" current_total_cost_day="0.00" current_total_cost_week="0.00" current_total_cost_month="0.00" predicted_total_power_hour="0.00" predicted_total_power_day="0.00" predicted_total_power_week="0.00" predicted_total_power_month="0.00" predicted_total_cost_hour="0.00" predicted_total_cost_day="0.00" predicted_total_cost_week="0.00" predicted_total_cost_month="0.00" /> 

paulw11 commented 3 years ago

The Wiser uses a socket to emit events. The events are XML and received by Homebridge-wiser using a stream. In some cases a single network receive event does not contain an entire XML document due to buffering.

An alternate XML parsing approach is required; stream based rather than document based.