mhwlng / fipha Goto Github PK
View Code? Open in Web Editor NEWHome Assistant integration with HWINFO, MQTT and optionally Logitech Flight Instrument Panel
License: MIT License
Home Assistant integration with HWINFO, MQTT and optionally Logitech Flight Instrument Panel
License: MIT License
Thank you very much for this cool tool.
It is working very well, however I have a small problem with temp-sensors as shown in the image below, the unit_of_measurement for temperature sensors is °C instead of °C.
Any suggestions on how to fix this? Just for reference the units in hwinfo and SharedMemoryViewer looks fine:
Is there a way to define the MQTT topic prefix? right now it defaults to the name of the computer, which I don't always want.
hwinfo.json is getting updated but no sensor or device is appearing in HA. Using HASS.Agent auto discovery recognized the devices earlier but that approach lacks reporting of power usage. Contrary, yours offers substantially more flexibility.
log.txt
ERROR 2024-01-05 15:54:55,299 MoveNext - No Home Assistant Connection for Flight Instrument Panels
INFO 2024-01-05 15:54:55,311 MoveNext - fipha started
INFO 2024-01-05 15:57:17,204 OnExit - exiting
ERROR 2024-01-05 15:57:28,147 MoveNext - No Home Assistant Connection for Flight Instrument Panels
INFO 2024-01-05 15:57:28,159 MoveNext - fipha started
INFO 2024-01-05 15:57:28,215 MoveNext - HWInfo task started, polling interval 5000 ms
INFO 2024-01-05 15:57:28,236 MoveNext - HWINFO Sensors found, Writing all HWINFO Sensors to hwinfo.json
INFO 2024-01-05 15:57:28,822 MqttOnConnected - MQTT Client: Connected with result: Success
INFO 2024-01-05 16:07:38,982 OnExit - HWINFO background task ended
INFO 2024-01-05 16:07:38,983 OnExit - exiting
ERROR 2024-01-05 16:07:57,321 MoveNext - No Home Assistant Connection for Flight Instrument Panels
INFO 2024-01-05 16:07:57,334 MoveNext - fipha started
INFO 2024-01-05 16:07:57,356 MoveNext - HWInfo task started, polling interval 5000 ms
INFO 2024-01-05 16:07:57,378 MoveNext - HWINFO Sensors found, Writing all HWINFO Sensors to hwinfo.json
INFO 2024-01-05 16:07:57,415 MqttOnConnected - MQTT Client: Connected with result: Success
HWINFO.inc (only power draw and usage configured)
[Variables]
CPUPower-SensorId=0xf0000501
CPUPower-SensorInstance=0x0
CPUPower-EntryId=0x5000000
GPUPower-SensorId=0xe0002000
GPUPower-SensorInstance=0x0
GPUPower-EntryId=0x5000000
DIMM1Power-SensorId=0xf3000005
DIMM1Power-SensorInstance=0x1
DIMM1Power-PowerEntryId=0x5000003
DIMM3Power-SensorId=0xf3000005
DIMM3Power-SensorInstance=0x3
DIMM3Power-PowerEntryId=0x5000003
CPUUsage-SensorId=0xf0000300
CPUUsage-SensorInstance=0x0
CPUUsage-EntryId=0x7000021
GPUUsage-SensorId=0xe0002000
GPUUsage-SensorInstance=0x0
GPUUsage-EntryId=0x7000000
[HWINFO-Config-USAGE]
CPUUsage=CPU
GPUUsage=GPU
[HWINFO-Config-POWER]
CPUPower=CPU
GPUPower=GPU
DIMM1Power=RAM
DIMM3Power=RAM
mqtt.config
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<mqtt>
<add key="mqttURI" value="192.168.1.124" />
<add key="mqttUser" value="USER" />
<add key="mqttPassword" value="PASS" />
<add key="mqttPort" value="1883" />
<add key="mqttSecure" value="False" />
<add key="mqttPollingInterval" value="5000" />
</mqtt>
</configuration>
appsettings.config
<?xml version="1.0" encoding="utf-8" ?>
<appSettings>
<add key="EnableWindowsFormsHighDpiAutoResizing" value="false" />
<add key="haUrl" value ="" />
<add key="haToken" value ="" />
</appSettings>
hi, i have a problem when restart hassio the entity created by fipha in unavailable, i need to restart fipha application to get them online, am I wrong something in the mqtt settings? thankyou
Hi,
First of all, thanks a ton for this awesome software. I love it.
Now, a minor problem,
I noticed that my HA instance lost network connection (loose cable) which caused fipha to lose mqtt connection. Once I fixed the network connection, log shows MqttOnConnected - MQTT Client: Connected with result: Success
but my sensors in HA are still unavailable.
If I close fipha.exe and start it again, everything works normally again.
I can reproduce this issue/behavior by disconnecting and reconnecting network to my HA .
Is there any way to fix/change this behavior ?
Log:
ERROR 2023-11-26 19:20:00,640 MoveNext - No Home Assistant Connection for Flight Instrument Panels
INFO 2023-11-26 19:20:00,656 MoveNext - fipha started
INFO 2023-11-26 19:20:00,692 MoveNext - HWInfo task started, polling interval 1000 ms
INFO 2023-11-26 19:20:00,724 MoveNext - HWINFO Sensors found, Writing all HWINFO Sensors to hwinfo.json
INFO 2023-11-26 19:20:00,756 MqttOnConnected - MQTT Client: Connected with result: Success
ERROR 2023-11-26 19:26:24,323 b__16_2 - MQTT Client: Connection lost with reason: NormalDisconnection.
ERROR 2023-11-26 19:26:45,490 b__16_2 - MQTT Client: Connection lost with reason: UnspecifiedError.
ERROR 2023-11-26 19:26:45,490 b__16_3 - MQTT Client: Connection Failed
MQTTnet.Exceptions.MqttCommunicationTimedOutException: The operation has timed out.
at MQTTnet.Implementations.CrossPlatformSocket.d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Implementations.MqttTcpChannel.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Adapter.MqttChannelAdapter.d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttClient.d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttClient.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at MQTTnet.Client.MqttClient.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.d__69.MoveNext()
ERROR 2023-11-26 19:27:36,546 b__16_3 - MQTT Client: Connection Failed
MQTTnet.Exceptions.MqttCommunicationTimedOutException: The operation has timed out.
at MQTTnet.Implementations.CrossPlatformSocket.d__47.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Implementations.MqttTcpChannel.d__17.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Adapter.MqttChannelAdapter.d__34.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttClient.d__53.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Client.MqttClient.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at MQTTnet.Client.MqttClient.d__41.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at MQTTnet.Extensions.ManagedClient.ManagedMqttClient.d__69.MoveNext()
ERROR 2023-11-26 19:27:36,546 b__16_2 - MQTT Client: Connection lost with reason: UnspecifiedError.
INFO 2023-11-26 19:28:10,027 MqttOnConnected - MQTT Client: Connected with result: Success
Regards,
Vaibhav
Fipha.exe does not awake with the computer after putting the computer to sleep.
Other than this issue, the program works perfectly. Thanks for the time and effort you put into this.
Timeline
System
Windows 11 22H2
Latest version of fipha.exe
HWInfo Pro 7.64-5240
Hi, i'm using fipha to monitor 2 windows systems though MQTT and home assistant and really like the new availabitly topic yet one issue arises.
When one machine is turned off it sets all sensors to unavailable and i have to restart fipha on the machine that's on but it still show values of the turned off machine.
I'm guessing this is because of the availability topic being the same on both fipha installs and it creates a conflicts somewhere.
Is there a way to have each machine publish it's own availability status ?
I'll try to mess around with node red to remap the topic but it seems fipha can only read one death status?
Now if you turn your PC off or close HWINFO, the sensors get stuck at the last known value. Is there an option to make them take "unavailable" state if there's no updates for a set timeout?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.