Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for Heishamon v3 and added Thermostates #13

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jgaalen
Copy link

@jgaalen jgaalen commented Dec 27, 2022

Fixed parse issue since Heishamon v3
Created thermostates for Curves and Delta temperatures which can be set
Created thermostate for Max_Pump_Duty to be able to change the value
Update domoticz values only if they really update. This way, you can validate the lasteUpdated state in events to make sure the new value is actually different (if Threeway Valve changes from Room to DHW for example)
Fixed Holiday State and Force DHW State switches to be properly set as selector switch or normal switch

jvangaalen added 6 commits December 27, 2022 08:46
Created thermostates for Curves and Delta temperatures which can be set
Created thermostate for Max_Pump_Duty to be able to change the value
Created thermostates for Curves and Delta temperatures which can be set
Created thermostate for Max_Pump_Duty to be able to change the value
Fixed Force DHW State and Holiday state switches
Fixed Force DHW State and Holiday state switches
Fixed Force DHW State and Holiday state switches
@MikeyMan83
Copy link

MikeyMan83 commented Jan 21, 2023

Any way you also had a look at the Power and Cop graphs?

Can you share the updated files

I can view the changes, but cannot download the fixed .py files if i'm correct?

@jgaalen
Copy link
Author

jgaalen commented Jan 23, 2023

It isn't merged to main, so if you want to use the update, you need to clone my fork: https://github.com/jgaalen/HeishamonMQTT.git

What is wrong with the Power and Cop graphs?

@MikeyMan83
Copy link

Current value is showing up nicely. But the historical graphs are not I'm afraid.

@MikeyMan83
Copy link

MikeyMan83 commented Jan 25, 2023

@jgaalen This is what i see for instance for the Heat_energy_production:

image

image

@jgaalen
Copy link
Author

jgaalen commented Jan 25, 2023

@MikeyMan83 I see the issue. It's because Heishamon only reports the production in watts, not in kWh. If there is no kWh measurement, it just reports 0.
COP graphs are fine right?

@MikeyMan83
Copy link

MikeyMan83 commented Jan 25, 2023 via email

@MikeyMan83
Copy link

MikeyMan83 commented Jan 25, 2023

Not doubting your knowledge btw, but i tried to fill Domoticz through MQTT / Node red directly.

And somehow, even with that value being in watts as well it fills:

image

image

Also seems to be watts... Now i'm confused...

@jgaalen
Copy link
Author

jgaalen commented Jan 25, 2023

Not doubting your knowledge btw, but i tried to fill Domoticz through MQTT / Node red directly.

And somehow, even with that value being in watts as well it fills:

image

image

Also seems to be watts... Now i'm confused...

It's probably because the mqtt default plugin stores it as a 'watt device', as you can see by the type ('Usage') and the heishamonmqtt plugin save it as a 'kwh' device, but then stores the 'watt' value and the counter explicitly as '0'

@MikeyMan83
Copy link

Ah ok... Clear!

Seems fixable ;)

@MikeyMan83
Copy link

MikeyMan83 commented Jan 25, 2023

Looking at the plugin, it seems that all devices are created as kWh devices:

kWh_devices =["Cool_Energy_Consumption", "Cool_Energy_Production", "DHW_Energy_Consumption", "DHW_Energy_Production", "Heat_Energy_Consumption", "Heat_Energy_Production"]

This should be 'Energy devices' i think? Not easy to change that around in a running situation i assume?

Looking further on https://www.domoticz.com/wiki/Developing_a_Python_plugin#Available_Device_Types.

Current type is Type 243 General with subtype 29 Kwh.
This should be Type 248 Usage with subtype 1 Electric

@jgaalen
Copy link
Author

jgaalen commented Jan 25, 2023

I'll try to change it. No problem doing it for a running situation, just remove the device and at the next poll request it will be recreated. It will have a new idx and no history tho, but the history is '0' anyway

Only update thermostat devices on every poll
Fix counters if there's a null value
@MikeyMan83
Copy link

MikeyMan83 commented Jan 26, 2023

Wow thats quick!
Testing now 👍

No errors so far, and devices recreated nicely.

@jgaalen
Copy link
Author

jgaalen commented Jan 26, 2023

Yes, I've tested it. It recreated the devices if they're old. It will now graph in domoticz as well. Too bad my influxdb/grafana is messed up as the measurement got from an 'Instant' to 'Usage'. Influxdb queries can't merge that nicely, so have to move the values.

But at least the device in domoticz seems to be right and domoticz graphs itself will be there. Although, not sure how valuable the graphs are. It will just copy the value every 5 minutes to the history. All values between those 5 minutes aren't averaged or something, so the graph won't be accurate

@MikeyMan83
Copy link

And confirmation here as well! :)

image

That 5 minute interval is down to the energy device in Domoticz?

@MikeyMan83
Copy link

@IgorYbema I think we can merge the fixes from @jgaalen

@JWGracht
Copy link

New Heishamon version requires to change all Energy to Power

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants