StyraHem / ShellyForHASS

Shelly smart home platform for Home Assistant
MIT License
622 stars 112 forks source link

Shelly EM, Voltage (V), Current (A), and Power Factor Sensors (as global setting) #250

Open DMQ8 opened 4 years ago

DMQ8 commented 4 years ago

Hi,

I'm trying to add the new settings for Voltage, Current and Power Factor as global settings and getting the following config error error: Configuration invalid Invalid config for [shelly]: value is not allowed @ data['shelly']['attributes'][13]. Got 'phase_factor'. (See /config/configuration.yaml, line 36).

According to Read Me, its mentioned in the table that for Sensors/Attributes: "phase factor" >> Show current phase factor

I have tested "phase factor" and "phase_factor" both gives config error (invalid) in Hassio 3.12 & HA 107.7 both as Sensors and Attributes as global.

While in Read ME in : Types (decimal, units) and default settings (0.1.7) table, it's mentioned: "power_factor"

So I have used "power_factor" for Sensors and Attributes and config check was "valid". So is it a typo in the Read Me page regarding the power factor?

After deleting the old integration for Shelly and restarting HA, I'm unable to get the Power Factor sensor, Voltage (V) or Current (A) sensors for Shelly EM all are as global setting in "Sensors" and "Attributes" in the config. Note that I'm able to get the Voltage now as Attributes for Shelly 4 Pro, Shelly 2 and Shelly 2.5, but not for Shelly 1PM or Shelly EM as Attributes or as Sensor. Shelly EM is on latest firmware v1.6.0 and Shelly 1PM on firmware v1.6.1 (both cloud Disabled).

For Shelly EM I'm only getting as Sensors, the Current_Consumption (W) and the Total_Consumption (kWh) since ShellyForHASS v0.1.6 with no issue, the same with v0.1.7.

So with Cloud disabled for Shelly EM, am I suppose to get Voltage (V), Current (A), and Power Factor Sensors with v0.1.7 using global settings?

Thanks.

hakana commented 4 years ago

Yes it is a typo.

Shelly EM not report power factor in CoAP or REST. I hope that will be fixed in the next firmware from Shelly.

DMQ8 commented 4 years ago

Yes it is a typo.

Shelly EM not report power factor in CoAP or REST. I hope that will be fixed in the next firmware from Shelly.

So what about:

Thanks.

hakana commented 4 years ago

Yes V and A is working for EM, 1PM and 3EM

PF is working for 3EM

They are reported by both CoAP and REST

chemelli74 commented 4 years ago

Asked Allterco to check PF for EM. Will report back once I have their feedback.

Simone

DeviousPenguin commented 4 years ago

So does this mean that until there is a firmware update there is no way to access Voltage imformation using ShellyForHASS?

I'm currently running firmware v20200309

chemelli74 commented 4 years ago

So does this mean that until there is a firmware update there is no way to access Voltage imformation using ShellyForHASS?

Exactly

Simone

DeviousPenguin commented 4 years ago

Thanks, I'll see if I'm able to do a feature request on the shelly forum for this

alnavasa commented 3 years ago

no update on this? better to go with Matt to integrate them, I am missing voltage on the shelly EM :S

martin3000 commented 3 years ago

I have a shelly 3em and a device here which draws 15A at 230V, but the power factor is only 0.2. So the real power is 230150.2=690W. But the sensor sensor.shelly_shem_3_d8baaaa7fae_2_current_consumption show over 3000W. Who is calculating the wattage?

warwickchapman commented 3 years ago

We also have a 3EM and the pf values we are seeing are unbelievable between 0.1 and 0.5 most of the time, screwing up the reported power.