after rel.20211005 Domoticz MQTT Helper doesen't work

Moderators: grovkillen, Stuntteam, TD-er

Post Reply
Message
Author
Andy_68
New user
Posts: 5
Joined: 29 May 2022, 09:28

after rel.20211005 Domoticz MQTT Helper doesen't work

#1 Post by Andy_68 » 29 May 2022, 10:38

Hi.
I'm using EspEasy with domoticz to control mine home.

I am trying to build a custom PWM for an electric boiler using an esp 12F for control, an SSR (zero cross) as a pwm element and a PZEM-004T V3 to control consumption.
In Domoticz I use a switch / dimmer and with the cursor I send information about the desired percentage that I capture in Esp with MQTT-Helper.
From versions after 20211005, this plugin is no longer able to return what was happening up until now.
Is it a deliberate thing?
Donw here mine setup.
Clipboard02.jpg
Clipboard02.jpg (71.85 KiB) Viewed 3633 times
And rules that i use till now.

Code: Select all

[On System#Boot do
  looptimerset_ms,1,1000
endon

On Rules#Timer=1 do
  looptimerset_ms,1,1000
  if %v1%<1
    GPIO, 13, 0
  elseif %v1%>99
    GPIO, 13, 1
  else
    let 1,[var#1]*10
    LongPulse_mS,13,1,[var#1]
    let 1,[var#1]/10
  endif
endon

On Up#State=0 do
 if %v1%<=90
  let 1, %v1%+10
 else
  let 1, 100
 endif
  event,newpwm=[var#1]
endon

On Down#State=0 do
 if %v1%>10
  let 1, %v1%-10
 else
  let 1, 0
 endif
  event,newpwm=[var#1]
endon

on Boiler_PWM#Output do
 let 1, [Boiler_PWM#Output]/10
 TaskValueSet,1,1,[var#1]
endon

On newpwm do
  let 1,%eventvalue1%
  TaskValueSet,1,1,[var#1]
  // SendToHTTP 192.168.0.100,8080,/json.htm?type=command&param=switchlight&idx=42&switchcmd=Set%20Level&level=[var#1]
  Publish domoticz/in,'{"idx":42,"nvalue":2,"svalue":"[var#1]"}'
endon]

What should I do if I intend to use the new releases?
Attachments
Clipboard04.jpg
Clipboard04.jpg (143.32 KiB) Viewed 3633 times

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#2 Post by TD-er » 29 May 2022, 11:45

You have extra [ and ] wrapping the rules, is that while posting here on the forum or is it in your rules too?

I first thought it may have to do with the taskvalueset command only being allowed on dummy tasks, but you're using it on a dummy, so that's probably not it.

One thing I do see is that you are not really consistent in the use of the parameter separators.
<comma> , <comma><space>, <space>
The rules parser should be able to handle it, but maybe better to also test with only using a comma?

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#3 Post by TD-er » 29 May 2022, 11:54

Another thing is that you start a looptimer and the first thing you do when handling the loop timer is to set the loop timer.
That is not needed as it is a loop already.

TD-er
Core team member
Posts: 8643
Joined: 01 Sep 2017, 22:13
Location: the Netherlands
Contact:

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#4 Post by TD-er » 29 May 2022, 11:59

What I don't understand is, you do set a value to the dummy, but you don't seem to be using it.

Apart from this all, I don't know what may be wrong with the Domoticz MQTT helper, have to check the source (and code changes) for it.
But I can't imagine what deliberate change there may have been to that plugin what breaks your setup.

Andy_68
New user
Posts: 5
Joined: 29 May 2022, 09:28

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#5 Post by Andy_68 » 29 May 2022, 15:14

TD-er wrote: 29 May 2022, 11:45 You have extra [ and ] wrapping the rules, is that while posting here on the forum or is it in your rules too?

I first thought it may have to do with the taskvalueset command only being allowed on dummy tasks, but you're using it on a dummy, so that's probably not it.

One thing I do see is that you are not really consistent in the use of the parameter separators.
<comma> , <comma><space>, <space>
The rules parser should be able to handle it, but maybe better to also test with only using a comma?
Hi, square [rules] are only here on post, sorry.

Andy_68
New user
Posts: 5
Joined: 29 May 2022, 09:28

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#6 Post by Andy_68 » 29 May 2022, 16:07

TD-er wrote: 29 May 2022, 11:59 What I don't understand is, you do set a value to the dummy, but you don't seem to be using it.

Apart from this all, I don't know what may be wrong with the Domoticz MQTT helper, have to check the source (and code changes) for it.
But I can't imagine what deliberate change there may have been to that plugin what breaks your setup.
I have no idea why. What I see is that I use the same configuration and the same rules, in the releases up to 20211005 they work,
but in newer the mqtt helper output is not updated.
Below the payload that is emitted by domoticz and captured with MQTT explorer.

{
"Battery" : 255,
"LastUpdate" : "2022-05-29 15:52:54",
"Level" : 60,
"RSSI" : 12,
"description" : "",
"dtype" : "Light/Switch",
"hwid" : "7",
"id" : "0001407D",
"idx" : 42,
"name" : "Boiler_PWM",
"nvalue" : 2,
"stype" : "Switch",
"svalue1" : "60",
"switchType" : "Dimmer",
"unit" : 1
}

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#7 Post by Ath » 29 May 2022, 16:44

That bug has been fixed in the current code-base via #4044 as was reported in #4043, but has not seen a release yet. Can you download from a recent Github Actions build, here? (You will need a Github account to be able to download)
/Ton (PayPal.me)

Andy_68
New user
Posts: 5
Joined: 29 May 2022, 09:28

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#8 Post by Andy_68 » 29 May 2022, 21:58

Ok dear I have a gitHub account i'll try to download. Thanks

Andy_68
New user
Posts: 5
Joined: 29 May 2022, 09:28

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#9 Post by Andy_68 » 29 May 2022, 22:59

Ath wrote: 29 May 2022, 16:44 That bug has been fixed in the current code-base via #4044 as was reported in #4043, but has not seen a release yet. Can you download from a recent Github Actions build, here? (You will need a Github account to be able to download)
I tried the code fixed in issuses #4044 as indicated which is dated 20220506 and in this release the MQTT helper is back in perfect working order.
Thanks for reporting, I will update at the next tag.

User avatar
Ath
Normal user
Posts: 3417
Joined: 10 Jun 2018, 12:06
Location: NL

Re: after rel.20211005 Domoticz MQTT Helper doesen't work

#10 Post by Ath » 29 May 2022, 23:25

Great, thanks for the confirmation ;)
/Ton (PayPal.me)

Post Reply

Who is online

Users browsing this forum: No registered users and 28 guests