GithubHelp home page GithubHelp logo

mhwlng / fipha Goto Github PK

View Code? Open in Web Editor NEW
21.0 21.0 2.0 180 KB

Home Assistant integration with HWINFO, MQTT and optionally Logitech Flight Instrument Panel

Home Page: https://community.home-assistant.io/t/home-assistant-integration-with-logitech-flight-instrument-panel-hwinfo-mqtt/443045

License: MIT License

C# 93.04% HTML 5.55% CSS 1.41%
fip flight-instrument-panel home-assistant hwinfo logitech mqtt saitek

fipha's People

Contributors

mhwlng avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

fipha's Issues

Temperature sensors giving wierd unit_of_measurement

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.

temp sensor

Any suggestions on how to fix this? Just for reference the units in hwinfo and SharedMemoryViewer looks fine:
memory viewer

Define mqtt topic prefix

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.

Sensors not appearing in Home Assistant

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>

mqtt hassio restart

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

fipha.exe mqtt reconnects but entities 'unavailable'

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 from sleep

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

  • Fipha.exe works and sends data to Home Assistant.
  • Put computer to sleep.
  • Wake computer, but all entities in Home Assistant remain unavailable. No errors are present in log file.

System
Windows 11 22H2
Latest version of fipha.exe
HWInfo Pro 7.64-5240

Multiple machines, MQTT and "death" availability topic

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?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.