Replies: 2 comments 6 replies
-
You're the first to report it
Charles
…________________________________
From: kkrankall ***@***.***>
Sent: Thursday, October 27, 2022 10:03:39 AM
To: CharlesGodwin/pymagnum ***@***.***>
Cc: Subscribed ***@***.***>
Subject: [CharlesGodwin/pymagnum] Unexpected Inverter data (Discussion #42)
First off everything works great. It's just that sometimes I get the strange data about an inverter that is not mine. Not sure if it's because my packet count is low (25 packets). I set it low so there is less latency as I'm calling the API every 5 seconds. I have 2 MS4024PAEs but every now in then I pick up some other models (MS2012E, MS4448PAE, MS4124E) that would then cause some crazy voltage readings
[Screen Shot 2022-10-27 at 9 47 10 AM]<https://user-images.githubusercontent.com/15572661/198302135-95d77be2-cd10-4ac8-94d2-a5e0898c7af3.png>
[image]<https://user-images.githubusercontent.com/15572661/198305608-a84e73a0-6d92-4915-aa0f-105edd49da50.png>
In HA (Home Assistant) I have added logic to setting the sensor state value to make sure It's only recording data for the correct Inverter Model (MS4024PAE) and that if the API is down for some reason it will just keep the last value so I dont have a bunch of weird looking data.
`
template:
* sensor:
* name: "Magnum Inverter Volts"
unit_of_measurement: "V"
state: >
{% set model = state_attr('sensor.magnum_inverter_master', 'model_text') %}
{% set ignore = ['unknown', 'unavailable'] %}
{% if state_attr('sensor.magnum_inverter_master', 'vdc') not in ignore %}
{% if model == 'MS4024PAE' %}
{{ state_attr('sensor.magnum_inverter_master', 'vdc') }}
{% else %}
{{ states.sensor.magnum_inverter_volts.state | float(default=0)}}
{% endif %}
{% else %}
{{ states.sensor.magnum_inverter_volts.state | float(default=0)}}
{% endif %}
device_class: voltage
state_class: measurement
`
Just wondering if anyone else is getting strange data
Thank you,
Kevin
—
Reply to this email directly, view it on GitHub<#42>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AE6AIHZNDMJRRJOJNEIA6P3WFKDTXANCNFSM6AAAAAARQDDKDQ>.
You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Also I sometime get a PT100 charge controller (Had one for a week before it gave up the ghost) and it will show up with NaN in a few values. Home Assistant doesn't like this and says "REST result could not be parsed as JSON" Here is what the JSON data looks like
|
Beta Was this translation helpful? Give feedback.
6 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off everything works great. It's just that sometimes I get the strange data about an inverter that is not mine. Not sure if it's because my packet count is low (25 packets). I set it low so there is less latency as I'm calling the API every 5 seconds. I have 2 MS4024PAEs but every now in then I pick up some other models (MS2012E, MS4448PAE, MS4124E) that would then cause some crazy voltage readings
In HA (Home Assistant) I have added logic to setting the sensor state value to make sure It's only recording data for the correct Inverter Model (MS4024PAE) and that if the API is down for some reason it will just keep the last value so I dont have a bunch of weird looking data.
`
template:
unit_of_measurement: "V"
state: >
{% set model = state_attr('sensor.magnum_inverter_master', 'model_text') %}
{% set ignore = ['unknown', 'unavailable'] %}
{% if state_attr('sensor.magnum_inverter_master', 'vdc') not in ignore %}
{% if model == 'MS4024PAE' %}
{{ state_attr('sensor.magnum_inverter_master', 'vdc') }}
{% else %}
{{ states.sensor.magnum_inverter_volts.state | float(default=0)}}
{% endif %}
{% else %}
{{ states.sensor.magnum_inverter_volts.state | float(default=0)}}
{% endif %}
device_class: voltage
state_class: measurement
`
Just wondering if anyone else is getting strange data
Thank you,
Kevin
Beta Was this translation helpful? Give feedback.
All reactions