MQTT UDP Command Recognition

493 views
Skip to first unread message

sk

unread,
Jan 24, 2023, 5:16:02 PM1/24/23
to Loxone English
I have a glowmarket IHD in the UK.  It picks live power usage from my smart meter via DCC.
The IHD then has an inbuilt MQTT relay which broadcasts the power usage to my loxberry. The loxberry then broadcasts to my miniserver gen2. I can see the live power usage in the miniserver UDP monitor but I can’t figure out the command recognition.  The plan is to plug the live power usage into an energy monitor in Loxone config or using the agile octopus api show the actual current consumption.


Smart Meter —> DCC —> IHD —> Loxberry —> miniserver
Agile octopus —> miniserver virtual input 

I have no idea why this stuff is so hard… smart meters are nearly a decade old now… 


Jonathan Dixon

unread,
Jan 24, 2023, 5:40:48 PM1/24/23
to sk, Loxone English
If you go into the loxberry MQTT "Incoming overview" it gives you the command required for the UDP virtual input in loxone.
(The instructions actually recommend using the HTTP virtual input in preference to it, but I find UDP good enough.)

image.png

It's criminal that Loxone haven't built general purpose MQTT support in still, but there we go


--
You received this message because you are subscribed to the Google Groups "Loxone English" group.
To unsubscribe from this group and stop receiving emails from it, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/b73a57bb-4ad0-4e4e-aa38-63dfcf4cfeccn%40googlegroups.com.

sk

unread,
Jan 25, 2023, 2:29:22 PM1/25/23
to Loxone English
So I tried an exact copy of the command above but it fails to recognise it.  Oddly when I look in the UDP monitor it appears to be receiving two messages per row.
Screenshot 2023-01-25 192601.jpg

Loxberry recommended the command recognition which looks logically correct but doesn't work: 
MQTT:\iglow/xxxxxxxxxx/SENSOR/electricitymeter/electricitymeter_power_value=\i\v

The reason I prefer UDP is that HTTP commands are limited to poll every 10 seconds where as I get messages from MQTT every 3-7 seconds.

Jonathan Dixon

unread,
Jan 26, 2023, 5:18:19 AM1/26/23
to sk, Loxone English
You get multiple data points in a single UDP frame when you have "Expand JSON Data" enabled in loxberry mqtt settings, and the data maybe sent on MQTT as a single JSON object.
This makes sense as it means loxone MS will receive both data values as a single atomic update (so if they're inter-related, like a value and metadata about that value as you appear to have here) it can avoid racing/glitches in the loxone processing of those codependent data.

In the UDP view if you scroll over to the right, what do you see in the "Objects" column? This is where it should show what virtual input rules have matched. Here's an example of a shelly (which also sends updates as JSON)
image.png
(interestingly .. I now see it's rather random, sometimes I get timestamp in the same UDP frame, sometimes in its own one, and there's other values like bat and vibration that never seem to be reported at all, even though loxberry reports them as being sent. So... Hmmm)

Anyway none of that explains why your virtual input match rule isn't working. It's not something silly like the UDP input being set as a Digital input, or on a different port number, or with sender IP address filter? 


sk

unread,
Jan 27, 2023, 2:55:26 AM1/27/23
to Loxone English
So it does match to the object and has a value so I guess the command recognition is working, but for some reason the value is not translating into live view or into the Loxone app when displayed in the UI.  I can't see anything in the property sheet of the virtual UDP input to indicate why its not translating:

command.jpg
object values.jpg

I have tried checking and unchecking "Show status only", removing the sender IP address (i.e. any source) and Monitor Validation and its always zero?









Jonathan Dixon

unread,
Jan 27, 2023, 8:08:29 AM1/27/23
to sk, Loxone English
I'm clutching at straws  here, but note that items will appear in the "Objects" column if you've programmed tham into Config, even if you haven't saved them into the Miniserver yet. So (silly question, sorry) are you sure you have saved this version into MS?

Also I'd be tempted to wire that Virtual input to something else (an analogue output, if nothing else) that you can independently confirm if it is actually getting through the logic, even if not updating in the Live View for whatever reason.

Beyond that no idea. 


sk

unread,
Jan 27, 2023, 8:58:51 AM1/27/23
to Loxone English
Likewise ... Definitely saved to the miniserver.  I think its time for me to raise a ticket with Loxone. 

Tico

unread,
Jan 28, 2023, 7:48:34 AM1/28/23
to Loxone English
I seem to recall that the Miniserver sometimes had issues with the word "value="

This option breaks the value up a bit.

\ielectricitymeter_power_va\i\ilue=\i\v
Reply all
Reply to author
Forward
0 new messages