MQTT domoticz/out message size

Others (MiLight, Hue, Toon etc...)

Moderator: leecollings

Post Reply
mikkel75
Posts: 39
Joined: Thursday 08 December 2016 20:50
Target OS: Linux
Domoticz version:
Contact:

MQTT domoticz/out message size

Post by mikkel75 »

Hi,

I'm trying to pass a domoticz/out message from a dummy selector switch in Domoticz.
It's a selector switch with many stages (one for each state/mode of my McLighting).
But it seems like the message is trunkated at around 1000 bytes, it looks like this:

Code: Select all

{
	"Battery" : 255,
	"LevelActions" : "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||",
	"LevelNames" : "Off|TV|CUSTOM WS|Static|Blink|Breath|Color Wipe|Color Wipe Inverse|Color Wipe Reverse|Color Wipe Reverse Inverse|Color Wipe Random|Random Color|Single Dynamic|Multi Dynamic|Rainbow|Rainbow Cycle|Scan|Dual Scan|Fade|Theater Chase|Theater Chase Rainbow|Running Lights|Twinkle|Twinkle Random|Twinkle Fade|Twinkle Fade Random|Sparkle|Flash Sparkle|Hyper Sparkle|Strobe|Strobe Rainbow|Multi Strobe|Blink Rainbow|Chase White|Chase Color|Chase Random|Chase Rainbow|Chase Flash|Chase Flash Random|Chase Rainbow White|Chase Blackout|Chase Blackout Rainbow|Color Sweep Random|Running Color|Running Red Blue|Running Random|Larson Scanner|Comet|Fireworks|Fireworks Random|Merry Christmas|Fire Flicker|Fire Flicker (soft)|Fire Flicker (intense)|Circus Combustus|Halloween|Bicolor Chase|Tricolor Chase|ICU|Fire 2012|Custom 1|Custom 2|Custom 3",
	"LevelOffHidden" : "false",
	"RSSI" : 12,
	"Sel...
Thats what I get in NodeRed, so I assume it doesn't trunkate anything....

Now, why does Domoticz include the complete LevelNames list for every message? I would much rather have a short message with only the current state.

Any suggestions?

/M
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: MQTT domoticz/out message size

Post by waaren »

mikkel75 wrote: Wednesday 29 January 2020 16:48 Why does Domoticz include the complete LevelNames list for every message? I would much rather have a short message with only the current state.
Any suggestions?
My suggestion is to use dzVents or any other script language to produce a tailor made MQTT message. You can send whatever you like and to any topic you like. You can find some example scripts on this forum but I am happy to help if they do not suit your requirements.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
mikkel75
Posts: 39
Joined: Thursday 08 December 2016 20:50
Target OS: Linux
Domoticz version:
Contact:

Re: MQTT domoticz/out message size

Post by mikkel75 »

Hi,

Thanks for the suggestion...

I found out however that NodeRed actually truncates the debug output and that Domoticz actually outputs somethin like:

Code: Select all

{
        "Battery" : 255,
        "LevelActions" : "||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||",
        "LevelNames" : "Off|TV|CUSTOM WS|Static|Blink|Breath|Color Wipe|Color Wipe Inverse|Color Wipe Reverse|Color Wipe Reverse Inverse|Color Wipe Random|Random Color|Single Dynamic|Multi Dynamic|Rainbow|Rainbow Cycle|Scan|Dual Scan|Fade|Theater Chase|Theater Chase Rainbow|Running Lights|Twinkle|Twinkle Random|Twinkle Fade|Twinkle Fade Random|Sparkle|Flash Sparkle|Hyper Sparkle|Strobe|Strobe Rainbow|Multi Strobe|Blink Rainbow|Chase White|Chase Color|Chase Random|Chase Rainbow|Chase Flash|Chase Flash Random|Chase Rainbow White|Chase Blackout|Chase Blackout Rainbow|Color Sweep Random|Running Color|Running Red Blue|Running Random|Larson Scanner|Comet|Fireworks|Fireworks Random|Merry Christmas|Fire Flicker|Fire Flicker (soft)|Fire Flicker (intense)|Circus Combustus|Halloween|Bicolor Chase|Tricolor Chase|ICU|Fire 2012|Custom 1|Custom 2|Custom 3",
        "LevelOffHidden" : "false",
        "RSSI" : 12,
        "SelectorStyle" : "1",
        "description" : "",
        "dtype" : "Light/Switch",
        "hwid" : "3",
        "id" : "000142D4",
        "idx" : 644,
        "name" : "McLighting_Emil_mode",
        "nvalue" : 2,
        "stype" : "Selector Switch",
        "svalue1" : "130",
        "switchType" : "Selector",
        "unit" : 1
}
So I'll handle it in NodeRed....

/M
User avatar
FireWizard
Posts: 1893
Joined: Tuesday 25 December 2018 12:11
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Voorthuizen (NL)
Contact:

Re: MQTT domoticz/out message size

Post by FireWizard »

Hi,

@mikkel75,

You wrote:
I found out however that NodeRed actually truncates the debug output
and also
Thats what I get in NodeRed, so I assume it doesn't trunkate anything....
See the Note at https://nodered.org/docs/user-guide/edi ... ebar/debug

If you expect a large amount of messages, it is better the use a file node instead of the debug node.
Of course you can route the msg.payload also to the console, but reading a file afterwards is easier.

A large amount of data is flooding the debug pane and the information becomes useless.
( I met this problem here: https://www.domoticz.com/forum/viewtopi ... 38&t=29824.)
See:
This will result in a stream of data, to much for the debug pane. I routed it to a file.
Regards
mikkel75
Posts: 39
Joined: Thursday 08 December 2016 20:50
Target OS: Linux
Domoticz version:
Contact:

Re: MQTT domoticz/out message size

Post by mikkel75 »

Hi,

Thanks - yes thats also what I did to find out that my issue wasn't with Domoticz but the way I thought NodeRed worked...
With export til file there is no problem :)

/M
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest