MQTT Hub/Gateway

How do I device this value by /1000? I have the following:

  "meter_power": {
    "capability": "meter_power",
    "stateTopic": "go-eController/906464/cec",
    "setTopic": "",
    "valueTemplate": "$.0.0",
    "outputTemplate": "",
    "displayName": "Energy"
  }

From this JSON
[ [ 136654.7, 0 ], [ 136654.7, 0 ], [ 52456.23, 0.118438 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ], [ 0, 0 ] ]

I tried the simple
"valueTemplate": "$.0.0 / 1000"

But this didn’t seem to do the trick.

Some help would be awesome!

I have multiple crashes a day, can you see why?
It is with the https://www.nrgwatch.nl/product/itho-cve-rft-wifi-add-on/ Itho Daalderop Wifi Module

Crashreport:
1eddd9f2-3f18-40c4-a750-aad3ee16d576

Is this app stil supported or developed in any way?

According to the app store there has not be any update in years…

If the app is no longer developed maybe someone else could take it over?

2 Likes

And what exactly is your problem B3rt? I’ve no issues at all with MQTT Hub on my Pro 2019.
It seems something’s changed for apps @ Pro 2023.

no feature request (or response on any request or reports via github) and it keeps crashing after disabling (or enabling) a device and the try to broadcast again. I think it runs out of memory… (>95mb usage)

I thought exactly the same as B3rt. I think MQTT Hub is a very important app that hasn’t been developed further for so long. I still have the problem with the double names, a fix for this problem would be so great.

Guys, the crashing problems seems related to this issue (and only to the Pro 2023)

It would be cool if @HarriedeGroot could approve the PR on Github. Then anyone could adjust the delay to prevent crashes caused by CPU usage.

4 Likes

Can someone help me with the issue below that I can’t seem to resolve?

I am using the NRGwatch add-on print for the ITHO mv, and I have added it to Homey following the instructions. This reads the following values through an MQTT Hub device and adds a dim function:

{
  "dim": {
    "capability": "dim",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "round((value / 255) * 100)",
    "outputTemplate": "round((value / 100) * 255)",
    "displayName": "Dim level" 
  },
  "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['temp']",
    "outputTemplate": "",
    "displayName": "Temperature"
  },
  "measure_humidity": {
    "capability": "measure_humidity",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['hum']",
    "outputTemplate": "",
    "displayName": "Humidity"
  }
}

However, now I would like the button to function in Homey as an on/off switch. So when the button is on, the ventilation turns on, and when off, it turns off. Presets for this are available in the add-on print. The latter works, but when turned on, the status is not remembered. So, if I turn it on, the button lights up, but after a few seconds, it goes off again. If I then turn it on again, it stays on.

Now, I would like the on/off button to display the status as on when it is greater than 0 and off when it is exactly 0. In the example below, I am currently using the value of 220, but it seems not to work correctly. Perhaps the value itho/state = 220 is coming in too late. No idea.

Hopefully, someone can tell me how to achieve this and explain what I am doing wrong.

{
  "dim": {
    "capability": "dim",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "round((value / 255) * 100)",
    "outputTemplate": "round((value / 100) * 255)",
    "displayName": "Dim level" 
  },
 "measure_temperature": {
    "capability": "measure_temperature",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['temp']",
    "outputTemplate": "",
    "displayName": "Temperature"
  },
  "measure_humidity": {
    "capability": "measure_humidity",
    "stateTopic": "itho/ithostatus",
    "setTopic": "",
    "valueTemplate": "$['hum']",
    "outputTemplate": "",
    "displayName": "Humidity"
  },
  "onoff": {
    "capability": "onoff",
    "stateTopic": "itho/state",
    "setTopic": "itho/cmd",
    "valueTemplate": "value == '220' ",
    "outputTemplate": "value ? '220' : '0' ",
    "displayName": "Turned on"
  }
}

No clue about the functioning, but I noticed an inconsistency: you used single quotes for the values, and you don’t use that anywhere else?
Try without those single quotes:

(And please edit your post and translate into English, this is an English language topic. Thx)

I remove the single quotes and still the same issue.

I was using the quotes because I saw that in previous posts.

And translated the text from Dutch to English.
Thank you

1 Like

This morning my MQTT broker (Version V3.0.2) stopped working. Based on the review of the logs it seems to stopped at the moment of the last Homey update to version 10.3.2. Anyone else experiencing the same type of issues?

1 Like

What’s displayed as reason? CPU usage?
Then it’s perhaps caused by the initial sync.

If @HarriedeGroot could merge the PR and provide a test version, all affected users could try the delay option.

Perhaps you can post your question in this topic MQTT Broker for Homey

Just posted the same question in MQTT Broker for Homey. Thanks. Untill now now no clear information found in the logs of Homey and the related apps. Will check it later today.

Edit 1:
Earlier this morning I did a soft restart of Homey. But no response. Pull The Plug (on Homey) did work. Thanks for this simple and easy solution from robertklep

Just as addition… For me the high CPU load has crashed the Hub and in the same time the Broker crashed caused by memory usage. That’s why I suggested the PR because it can be related.

4 Likes

…and this is REALLY annoying, that the devices is send back to HA through MQTT! :-/

True that. And I always forget to disable MQTT hub before adding devices to Homey :joy:
I hope @HarriedeGroot is still OK, if so, a bit of his time for some PR’s, might bring us further here :pray:

3 Likes

No update for 3 years and it would be wonderful with another update so that even users of the new Homey Pro can use it or if someone else takes over the development as Harrie de Groot does not seem active or has responded to any comments about the app.

My problem is with high CPU load that crashes the Hub and i know there is some kind of workaround but then you need to know what to do and how to do it in each step :frowning:

I’m using MQTT Hub on Homey early 2023 from beginning with ~150 devices - I have no major issues.

Only issue that MQTT devices are not working on stable version. They however works on beta - but this can be easily workaround by flow subscribed to channel.

I have one other flow which restarts client and hub every night at 1:00 - this is however recommended by Harrie.