CyberDNS / Lupusec2Mqtt

Lupusec Alarm System to Mqtt
MIT License
11 stars 5 forks source link

Changing alarm state does not work correctly #68

Closed ahamro closed 5 months ago

ahamro commented 5 months ago

I have been using this add-on successfully for quite some time now and I'm really happy with it. I'm using it in a lightly manner: showing the alarm status on an informative dashboard and for changing the alarm from 'Disarmed' to 'Night' or 'Away' and back.

Since a couple of weeks the state changing does not work as it should: the status is still shown correctly, but when changing the state nothing happens and I have to use the Lupusec remote control. Only after I restart the add-on it starts working again. I suppose it stops working sometimes during the day or night.

Is there a chance somebody can shed some light on this? I'm using version 3.1.4 of the add-on and HA 2024.3, and the Lupusec hardware is an XT1+.

The log shows this:

[14:54:19 INF] Value for topic homeassistant/binary_sensor/lupusec/RF_05c32f30/state on device RF:05c32f30 - woonkamer achter changed from ON to OFF [14:55:51 INF] Value for topic homeassistant/binary_sensor/lupusec/RF_05c32f30/state on device RF:05c32f30 - woonkamer achter changed from OFF to ON [14:56:49 INF] Value for topic homeassistant/binary_sensor/lupusec/RF_05c32f30/state on device RF:05c32f30 - woonkamer achter changed from ON to OFF [15:02:59 INF] Area 1 set to ARM_NIGHT [15:02:59 ERR] Error calling GET http://192.168.1.140/: Request: Method: GET, RequestUri: 'http://192.168.1.140/', Version: 1.1, Content: , Headers: { Accept: application/json X-Token: zpzT4mGzMYn5cZ8pNGS43hyf8JByVzjn } Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: <. Path '', line 0, position 0. at Newtonsoft.Json.JsonTextReader.ParseValue() at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, JsonContract contract, Boolean hasConverter) at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent) at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType) at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings) at Newtonsoft.Json.JsonConvert.DeserializeObject[T](String value, JsonSerializerSettings settings) at Lupusec2Mqtt.Lupusec.LupusecService.SendRequest[T](HttpRequestMessage request, LogLevel logLevel) in /src/Lupusec2Mqtt/src/Lupusec2Mqtt/Lupusec/LupusecService.cs:line 166 [15:02:59 INF] Command homeassistant/alarm_control_panel/lupusec/lupusec_alarm_area1/set of device lupusec_alarm_area1 - Area 1 executed with input ARM_NIGHT [15:02:59 ERR] Error calling POST http://192.168.1.140/action/deviceListGet: Request: Method: POST, RequestUri: 'http://192.168.1.140/action/deviceListGet', Version: 1.1, Content: , Headers: { Accept: application/json Authorization: Basic ZXhwZXJ0OjhVWU43enIzdThaTU15 X-Token: zpzT4mGzMYn5cZ8pNGS43hyf8JByVzjn } System.Net.Http.HttpRequestException: Response status code does not indicate success: 401 (Unauthorized). at System.Net.Http.HttpResponseMessage.EnsureSuccessStatusCode() at Lupusec2Mqtt.Lupusec.LupusecService.SendRequest[T](HttpRequestMessage request, LogLevel logLevel) in /src/Lupusec2Mqtt/src/Lupusec2Mqtt/Lupusec/LupusecService.cs:line 166