Interfacing to Domoticz using MQTT

2»

Comments

  • Glad to hear MQTT is available now, currently have the API integrated with Node-Red- thanks to Josh's docs and examples.


    If any of you are on Octopus Agile you might find this Node-Red thread interesting, it took a lot of help and learning but managed to crack automatically choosing the cheapest slots to charge, turn on electric heating, etc.

    This bit just uses the Octopus API- I have a separate bit to collect useage.


    A couple of us have evolved this a bit and now have data going to InfluxdB with Grafana displays.

    https://discourse.nodered.org/t/best-strategy-for-reading-sorting-electricity-cost-array/7929

  • Hi sidepipe,

    Many thanks for sharing this post and node-red setup. I am also a Domoticz user and have just received my Glowstick (although at the moment it doesn't seem to have been enabled on the Hildebrand side to connect to my smart meter).

    I'm planning to set up something similar to what you describe for your air source heat pump system. Would you mind sharing your domoticz script(s) as well so that I could take a look at how you've achieve this based on the average readings over the five minute period?

    Thanks!

  • Would you mind sharing your domoticz script(s) as well so that I could take a look at how you've achieve this based on the average readings over the five minute period?

    Ok, there are a few dzvents scripts I use for this - I've put them here:

    https://bit.ly/2EzyJCK

    Don't expect them to be great - it was all just a quick hack if I'm honest. Hopefully you'll make sense of it.

  • Thanks! I'll try to work it out. I haven't really scripted before in Domoticz so this will be a learning curve!

  • Hello,

    I've been using a Glow Stick for a few months now but only just got round to configuring MQTT on my raspberry pi to grab data.

    I've followed the instructions in post #1 and data output can be seen on the Node-Red debug screen:

    11/10/2020, 20:25:35 node: 873abf91.f3419

    SMART/HILD/************ : msg.payload : Object

    { command: "udevice", idx: 88, nvalue: 0, svalue: "511;13700450" }

    Domoticz is showing as connected but the data is not showing in the virtual sensor display.

    Is there an api command required to push the data into Domonicz?

  • ***************** FIXED *****************

    In the Domoticz Hardware setup screen for 'MQTT Client Gateway with LAN interface' I'd configured the Remote Address field with the remote server info (glowmqtt.energyhive.com) instead of localhost.

  • Is there a Hildebarand MQTT node for NodeRED?

  • Just use a standard MQTT in node and configure it with the server url and your username, password and topic.

  • Is this still working for people? I have set it up in node red but it just constantly shows connecting.

  • mqtt is certainly still working

    node red I cannot comment on

    try a command line client to check you have the correct server settings, credentials and topic

  • I've been trying to get sidepipe's NodeRED flow to work but the Hildebrand SMQTT node just hangs showing "connecting"

    I've got Server = mqtt.energyhive.com port = 8883

    username / password = same as I use to log into the Bright app.

    Any suggestions?

  • If things are still as they were when I set mine up last year you have to get MQTT set up by support, and you'll get a different username and password. That was over a year ago now though so may have changed.

  • "Any suggestions?"

    What topic are you subscribing to?

  • Morning all,

    I've just got this working. I also had the connecting issue, I rebuilt the flow from the script and it then started working.

    I do have two issues though, the electricity usage is out by a factor of 10, so 1Kw is showing as 10000 watts - how can i adjust this?


    Also the gas usage is in m3 rather than Kw, has anyone got any thoughts on how to swap that?

    thx

  • @billytkid

    To convert cubic metres to kilowatts you need to know the calorific value of the supplied gas (which can vary).

    • Multiply by the volume correction factor (1.02264).
    • Multiply by calorific value (~40.0).
    • Divide by kWh conversion factor (3.6).

    The calorific value can change and will be printed on your supplier's bill.


    For example from my last Octopus bill (for Feb 13th until Mar 13th) they included

    Your energy usage is calculated from your gas consumption using a standard industry formula: Units Consumed (Cubic Metres) × Volume Correction (for temperature & pressure) × Calorific Value (energy in each m3 of gas) ÷ 3.6 (convert from joules) ≈ Usage (in kWh)

    For you: 103.5 × 1.02264 × 39.2† ÷ 3.6 = 1152.8

  • Actually, the kWh value for historical consumption ( today, this week and this month ) is normally also available from the smart meter. These are at nodes under 0702->0C ( "alternative historical consumption" ) at 01, 30 and 40 respectively, so they can be used if you wish. I use them to work out the calorific value rather than using them directly, though note that on my smart meter at least the values can go really screwy around midnight at the end/start of a month.

  • Thank you all, this is great.


    All is working like a charm!

    thanks

Sign In or Register to comment.