Comments (2)
Ok, after digging further, the new liquidctl version returns a string value for a status entry ("Fan x control mode"), whereas the DLL only expects float values there:
Log entry
:
28/05/2024 03:29:52: Newtonsoft.Json.JsonReaderException: Could not convert string to double: DC. Path '[0].status[0].value', line 1, position 229.
at Newtonsoft.Json.JsonReader.ReadDoubleString(String s)
at Newtonsoft.Json.JsonTextReader.FinishReadQuotedNumber(ReadType readType)
at Newtonsoft.Json.JsonTextReader.ReadAsDouble()
at Newtonsoft.Json.JsonReader.ReadForType(JsonContract contract, Boolean hasConverter)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateList(IList list, JsonReader reader, JsonArrayContract contract, JsonProperty containerProperty, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateList(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, Object existingValue, String id)
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
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 FanControl.Liquidctl.LiquidctlCLIWrapper.ReadStatus()
at FanControl.Liquidctl.LiquidctlPlugin.Load(IPluginSensorsContainer _container)
at FanControl.Domain.BackendProviders.Plugin.PluginBackendProvider.Open()
Result from liquidctl --json --address {address} status
:
[
{
"address": "\\\\?\\HID#VID_1E71&PID_2011#7&3b3f9bd5&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}",
"bus": "hid",
"description": "NZXT RGB & Fan Controller (3+6 channels)",
"status": [
{
"key": "Fan 1 control mode",
"unit": "",
"value": "DC"
},
{
"key": "Fan 1 duty",
"unit": "%",
"value": 25
},
]
}
]
The class used for deserializing the result LiquidctlStatusJSON.cs
, which expects float as the value
type:
using System.Collections.Generic;
namespace FanControl.Liquidctl
{
public class LiquidctlStatusJSON
{
public class StatusRecord
{
public string key { get; set; }
public float? value { get; set; }
public string unit { get; set; }
}
public string bus { get; set; }
public string address { get; set; }
public string description { get; set; }
public List<StatusRecord> status { get; set; }
}
}
from fancontrol.liquidctl.
I fixed this issue by replacing public float? value { get; set; }
with public dynamic value { get; set; }
There are other issues however, the current plugin can't handle outputs for multiple fans, e.g. "Fan 1 speed", "Fan 2 speed", etc.
I tried to fix this in my modded version, but since I have no real idea about C#, I'm not creating a PR for this. It seems to work though.
https://github.com/sp00n/FanControl.Liquidctl
from fancontrol.liquidctl.
Related Issues (20)
- Corsair Hydro H115i Pro XT not working due to lack of pump channel
- Corsair ICUE H150i Pro XT
- Running the Liquidctl plugin for FanControl causes Elgato FaceCam to disconnect and reconnect sporadically when camera is idle
- Plugin will not run on Corsair iCUE H115i ELITE CAPELLIX using an iCUE Commander Core
- High CPU Usage (Antimalware Service Executable)
- Plugin not working with Corsair H100i v2 due to version naming HOT 29
- failed to load plug in HOT 1
- High CPU usage (Root of the problem) HOT 10
- LiquidctlPlugin could not initialize or has no sensors HOT 9
- Loading FanControl.Liquidctl v0.1.1 with latest and prebuilt liquidctl exeutable crashes FanControl at application startup HOT 1
- Am I losing my mind here? HOT 6
- LiquidctlPlugin could not initialize or has no sensors
- H100i V2 only shows Pump RPM. No Fans RPM, Fan Control or Pump control HOT 1
- Constant hard drive writes? (8 to 15MB/s) HOT 2
- Plugin will not initialize
- Plugin Failing to Initialize yet Ramping up fans when FanControl refreshed
- Plugin will not initialize Possible fix
- Doesn't work when installed directly over Fan Control HOT 1
- Increased power usage
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fancontrol.liquidctl.