Glow / Hildebrand Display - Local MQTT Access - Template Help

I also changed those “Today” “energy” ones from “measurement” to “total_increasing” - that seems to work OK as far as I can tell. The issue with the Energy dashboard came from changing the “Cost (Today)” “monetary” one from “measurement” to no “state_class” (remove that line altogether).

Ah ok. My bad. I thought you meant the consumption sensor. I have other sensors and automations setup from before I got this IHD (had the USB stick before) that I use for costs due to being on Go tariff and needing price to change up and down at 12:30am and 4:30am

Hey!

Thanks for the update!
Yes, it’s weird, I tried some different combinations and had no luck so I got the monetary’s state_class restored and kept the energy ones.
I will let you know what happens on this side.

Edit: I returned the whole thing to what it was before to see if the dashboard works, I will ignore the warnings for now.

This is driving me nuts so now even with the same configuration as RobertAlexa’s post, I am still getting negative values in Sources Cost (Energy works fine and is correct), think I have changed everything I could includng trying to reset statistics.

Edit: Managed to get it sorted but I won’t touch the device/state classes, will leave it like that.

1 Like

Does the local MQTT integration work with the USB stick or just the IHD, please?

@jamesking Just the IHD as it has local mqtt server built in. USB stick is via Hildebrand MQTT (which I believe is called bridged MQTT to your local instance)

1 Like

Thanks for the response.

So if I already have an MQTT server I can’t just connect the USB to my MQTT server and then use this integration?

Ideally I would prefer to get the stick as it’s cheaper, and use a it Google Home Hub as a display.

@jamesking with USB stick you can use your own local mqtt, but need to setup the bridged mqtt (Hildebrand cloud mqtt to your local). Before I got the Hildebrand IHD I was using the following:
https://github.com/unlobito/ha-hildebrandglow but it took a fair bit to setup being as I have smets1 meters.

If you haven’t got any device yet, the IHD is only £20 more

2 Likes

Just to add to what @Townsmcp said, it’s well worth it as you won’t depend on Hildebrand’s MQTT server, the IHD connects directly to your WiFi and to your smart meter so no internet involved at all.

2 Likes

I’m beginning to come to this conclusion - that the in home display is the best way to keep it fully local. Also a good backup when my home assistant efforts inevitably fail.

I wonder if Octopus Energy would give me one of these specific IHDs when my smart meters are provided.

@jamesking they will give you the normal IHD (my meters are due to be replaced next month and I intend to remove their IHD and leave the Hildebrand one running) but they won’t have mqtt for you to pull stats.
I have been reading the Hildebrand DCC integration and it seems like Hild have infrastructure issues with capacity at the moment and lots of people saying consumption figures are not matching what has actually been used. By having their IHD you won’t encounter these issues as your not relying on DCC data

1 Like

I have an IHD that was provided by EDF and I moved to Octopus to their Tracker tariff beginning of February. The issue with the IHDs is that Octopus is not able to update their tariffs (Agile or Tracker) that have half an hour or daily prices so the IHD will always display the incorrect prices due to the meters being using the wrong tariff which is not helfpul. What I did was getting rid of the EDF (which is also the same Octopus uses) and use Hildebrand’s one only for live consumption (electrcity) and the amount of kWh I am using so not using cost at all as it would be wrong.

1 Like

Yes. This seems to be the best plan and then get the Octopus integration (which I already have working on my tracker tariff) and multiply my power (Hildebrand) by price )octopus) to get live cost.

Then make a dashboard for it and display it on a Google home hub display.

Thanks everyone for the clarification.

1 Like

I managed to get put on the Octopus Tracker tariff this morning after emailing them before the new waiting list started :smiley:

Today I have been tweaking my old MQTT data from the IHD to show me the new costs using their tracker tariff and the saving I have made. Still a work in progress and it pulls the latest readings each day for the Octopus site using a bit of Node Red.

1 Like

Nice one, @BertrumUK . The saving bit is interesting, how did you do it?

Morning,

All done using NodeRed and an MQTT sensor. I can share the code if anyone wants to add this themselves.

Both values are then added using this simple function node then pushed out via MQTT.

image

2 Likes

Morning!
Great, I don’t use NodeRed but I’ve been meaning to give it a go, I will try.

@BertrumUK if you don’t mind sharing the NR code that would be great

1 Like

Sure, here it is and the MQTT sensor for it. You will need to correct your own sensors to pull in your own data obviously.

[{"id":"122b252972da3fe8","type":"api-current-state","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Tracker Elec Cost","server":"6c58d917.102028","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.my_octopus_electric_tracker_price","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":410,"y":3160,"wires":[["b317bf3795e3efc4"]]},{"id":"0cfa2854d5ee6b0b","type":"inject","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"1 Minute Update","props":[{"p":"payload"},{"p":"topic","vt":"str"}],"repeat":"60","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":150,"y":3200,"wires":[["77b164af10e0269f","9d2ca0ce7b358890","122b252972da3fe8","6645e771b588c9f9"]]},{"id":"b317bf3795e3efc4","type":"join","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":3120,"wires":[["f3526326d02576fe"]]},{"id":"77b164af10e0269f","type":"api-current-state","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"MQTT Elec Cost","server":"6c58d917.102028","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.mqtt_elec_cost","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":400,"y":3100,"wires":[["b317bf3795e3efc4"]]},{"id":"9d2ca0ce7b358890","type":"api-current-state","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"MQTT Gas Cost","server":"6c58d917.102028","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.mqtt_gas_cost","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":400,"y":3240,"wires":[["b2fc0b10acb52db4"]]},{"id":"6645e771b588c9f9","type":"api-current-state","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Tracker Gas Cost","server":"6c58d917.102028","version":3,"outputs":1,"halt_if":"","halt_if_type":"str","halt_if_compare":"is","entity_id":"sensor.my_octopus_gas_tracker_price","state_type":"str","blockInputOverrides":false,"outputProperties":[{"property":"payload","propertyType":"msg","value":"","valueType":"entityState"},{"property":"data","propertyType":"msg","value":"","valueType":"entity"}],"for":"0","forType":"num","forUnits":"minutes","override_topic":false,"state_location":"payload","override_payload":"msg","entity_location":"data","override_data":"msg","x":410,"y":3300,"wires":[["b2fc0b10acb52db4"]]},{"id":"f3526326d02576fe","type":"function","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Electric Difference","func":"var num1 = msg.payload[0];\nvar num2 = msg.payload[1];\nlet ans = num1 - num2 \nmsg.payload = ans;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":870,"y":3120,"wires":[["778b229795b6c405","e57349fce79b90b6"]]},{"id":"b2fc0b10acb52db4","type":"join","z":"94eabe72.796ff","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":650,"y":3280,"wires":[["795e48027ac64ef5"]]},{"id":"778b229795b6c405","type":"mqtt out","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"","topic":"tracker/elec/difference","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"54f27b91.384acc","x":1160,"y":3120,"wires":[]},{"id":"e57349fce79b90b6","type":"join","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"","mode":"custom","build":"array","property":"payload","propertyType":"msg","key":"payload","joiner":"\\n","joinerType":"str","accumulate":false,"timeout":"","count":"2","reduceRight":false,"reduceExp":"","reduceInit":"","reduceInitType":"","reduceFixup":"","x":670,"y":3200,"wires":[["5cfe329b7b843db8"]]},{"id":"795e48027ac64ef5","type":"function","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Gas Difference","func":"var num1 = msg.payload[0];\nvar num2 = msg.payload[1];\nlet ans = num1 - num2 \nmsg.payload = ans;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":860,"y":3280,"wires":[["2ad9cfa9f54ba10e","e57349fce79b90b6"]]},{"id":"5cfe329b7b843db8","type":"function","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Total Saving","func":"var num1 = msg.payload[0];\nvar num2 = msg.payload[1];\nlet ans = num1 + num2 \nmsg.payload = ans;\nreturn msg;","outputs":1,"noerr":0,"initialize":"","finalize":"","libs":[],"x":850,"y":3200,"wires":[["3b72c30052ab85dd"]]},{"id":"2ad9cfa9f54ba10e","type":"mqtt out","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"","topic":"tracker/gas/difference","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"54f27b91.384acc","x":1160,"y":3280,"wires":[]},{"id":"3b72c30052ab85dd","type":"mqtt out","z":"94eabe72.796ff","g":"d8b7df83c1d3a3e6","name":"Total Saving","topic":"tracker/elec/totalsaving","qos":"0","retain":"false","respTopic":"","contentType":"","userProps":"","correl":"","expiry":"","broker":"54f27b91.384acc","x":1130,"y":3200,"wires":[]},{"id":"6c58d917.102028","type":"server","name":"Home Assistant","version":5,"addon":true,"rejectUnauthorizedCerts":true,"ha_boolean":"y|yes|true|on|home|open","connectionDelay":true,"cacheJson":true,"heartbeat":false,"heartbeatInterval":30,"areaSelector":"friendlyName","deviceSelector":"friendlyName","entitySelector":"friendlyName","statusSeparator":"at: ","statusYear":"hidden","statusMonth":"short","statusDay":"numeric","statusHourCycle":"h23","statusTimeFormat":"h:m","enableGlobalContextStore":true},{"id":"54f27b91.384acc","type":"mqtt-broker","name":"MQTT","broker":"192.168.0.60","port":"1883","clientid":"","autoConnect":true,"usetls":false,"compatmode":false,"protocolVersion":4,"keepalive":"60","cleansession":true,"birthTopic":"","birthQos":"0","birthRetain":"false","birthPayload":"","closeTopic":"","closeQos":"0","closeRetain":"false","closePayload":"","willTopic":"","willQos":"0","willRetain":"false","willPayload":""}]
    -  state_topic: "tracker/elec/difference" 
       name: "Electric Tracker Saving" 
       value_template: '{{ value | round(2)  }}'
       icon: "mdi:cash"
       unit_of_measurement: "GBP"

    -  state_topic: "tracker/gas/difference" 
       name: "Gas Tracker Saving" 
       value_template: '{{ value | round(2)  }}'
       icon: "mdi:cash"
       unit_of_measurement: "GBP"
       
    -  state_topic: "tracker/elec/totalsaving" 
       name: "Total Tracker Saving" 
       value_template: '{{ value | round(2)  }}'
       icon: "mdi:cash"
       unit_of_measurement: "GBP"
2 Likes