Jump to content
C4 Forums | Control4

Control4 and MQTT?


zaphod

Recommended Posts

23 hours ago, david@berto.co.uk said:

Thanks David,

That's seems to have done the trick. Didn't see in documentation (which means it may be obvious and I'm dumb), what is the difference between DEVICE MESSAGE and GENERAL?

Cheers.

Link to comment
Share on other sites


3 hours ago, NextGenAV said:

Thanks David,

That's seems to have done the trick. Didn't see in documentation (which means it may be obvious and I'm dumb), what is the difference between DEVICE MESSAGE and GENERAL?

Cheers.

Great.

 The GENERAL_MESSAGE_RECEIVED event is fired when a message is received on the one of the topics specified in the Topics property whilst the DEVICE_MESSAGE_RECEIVED is fired when a message is received on the topic from a specific bound device such as the Berto Sonoff Relay.

Link to comment
Share on other sites

Brilliant!

Thanks again David, This driver has opened up so many possibilities for Control4. I dislike using cloud based services and a Pi running Mosquitto and Node-RED give C4 access to so much IoT content.

You need to have a 'Donate a beer button' ... if I use the driver on a project I will charge them a 'quality beer' fee and pass it on. You already have one in the tap!

👍

Link to comment
Share on other sites

2 hours ago, christophe@soundimage.be said:

Hi David,

Not Loosing MQTT connection anymore, but still loosing my programmation under "When A General Message is Received"... really don't know why...

Outgoing programmation stay ok

Thanks

Mmm, not sure what would cause programming to disappear, that's a new one on me.

How are you updating the driver?

Link to comment
Share on other sites

18 hours ago, christophe@soundimage.be said:

came back really late from a job... everything seems working👍

Hi David,

Everything is doing fine on my MQTT Driver. Thank you so much for your great job!

I wanted to know a little more about the other drivers you made... especially the Berto Hub...

when you have some time, you already have done so much😉

Link to comment
Share on other sites

Hey David,

I am loving your drivers! Really awesome work! I have just setup the MQTT Bridge which is working great with my Sonoff devices and Mosquitto Broker running on a Raspberry Pi.

Is the "KeepAlive Age" suppose to count up beyond 60 if no packet is received? I'm sure I saw it count up beyond 60 once but it now seems to reset to 0 when a KeepAlive packet is sent even if no response is received.

I wanted to send a push notification to my phone via the C4 app if the C4 loses connection with the Broker. I was hoping to use the "KeepAlive" variable and send a message if KeepAlive > 300 for example. However when I watch debug the "KeepAlive Age" always resets to 0 after each "Keepalive Packet Sent" even if it doesn't receive a "KeepAlive Packet Received".

Is this how you intended it?

 

Link to comment
Share on other sites

6 hours ago, AdamD said:

Hey David,

I am loving your drivers! Really awesome work! I have just setup the MQTT Bridge which is working great with my Sonoff devices and Mosquitto Broker running on a Raspberry Pi.

Is the "KeepAlive Age" suppose to count up beyond 60 if no packet is received? I'm sure I saw it count up beyond 60 once but it now seems to reset to 0 when a KeepAlive packet is sent even if no response is received.

I wanted to send a push notification to my phone via the C4 app if the C4 loses connection with the Broker. I was hoping to use the "KeepAlive" variable and send a message if KeepAlive > 300 for example. However when I watch debug the "KeepAlive Age" always resets to 0 after each "Keepalive Packet Sent" even if it doesn't receive a "KeepAlive Packet Received".

Is this how you intended it?

 

Adam, 

I'll look at changing this to update on receipt of last PINGRESP packet. That makes more sense.

Thanks

David

Link to comment
Share on other sites

  • 2 weeks later...
1 hour ago, Pounce said:

@david@berto.co.uk

 

I'm preparing to try out your driver along with https://github.com/Koenkk/zigbee2mqtt

I'm curious if  you have seen anyone go down this path or if you have tried it yourself. My objective is to interface with a wide range of Zigbee devices without additional hubs.

Vert interesting! 

Will take a look.

Link to comment
Share on other sites

On 2/24/2019 at 12:37 AM, AdamD said:

Hey David,

I am loving your drivers! Really awesome work! I have just setup the MQTT Bridge which is working great with my Sonoff devices and Mosquitto Broker running on a Raspberry Pi.

Is the "KeepAlive Age" suppose to count up beyond 60 if no packet is received? I'm sure I saw it count up beyond 60 once but it now seems to reset to 0 when a KeepAlive packet is sent even if no response is received.

I wanted to send a push notification to my phone via the C4 app if the C4 loses connection with the Broker. I was hoping to use the "KeepAlive" variable and send a message if KeepAlive > 300 for example. However when I watch debug the "KeepAlive Age" always resets to 0 after each "Keepalive Packet Sent" even if it doesn't receive a "KeepAlive Packet Received".

Is this how you intended it?

 

Adam,

V4 available and working as you suggest.

Thanks

David

Link to comment
Share on other sites

Just discovered something odd with the RelayLight driver, it doesn't show up as a load in the Advanced Lighting Agent when setting up scenes.

I'm not sure why that would happen as I thought any driver running through the light proxy would be available in advanced lighting. If you are struggling I will gladly take a look at your driver if you like and compare it against a couple i have written in the past.

Link to comment
Share on other sites

  • 2 months later...
On 2/10/2019 at 11:27 PM, david@berto.co.uk said:

Thanks Christophe/NextGenAV.

Sometimes I've noticed that the MQTT bridge can lose subscriptions when drivers are added/updated. I'll look into this but in the mean time will add an Action option to refresh subscriptions to see if this sorts the issue next time you have the problem.

Dear David, am having your latest version 7 and I noticed after my dealer pushed the latest update my MQTT lost subscription to all me shellys, I had to rescan them all again to identify them correctly in each room with each Shelly driver, do u have an idea why is that and what are the cases where this will repeat?

Link to comment
Share on other sites

  • 4 months later...

Hi all. So what is the max count of devices or rather lets say a comfortable count that won't bring the system down. So far got it running with 1 device perfectly. Small hiccup pi3b+ goes black screen and unresponsive requiring a reboot every 2-3 days. Going to do an os reload. Anyone had solid experience with the mqtt. Any chance of pulling variables ie a real number weight from a gas bottle to warn when its running low? This driver could be cool to tie into industrial devices like the siemens as that has mqtt capabilities. Any ideas on what can be done? Id like to get some cool ideas.cheers

Link to comment
Share on other sites

Hi all. So what is the max count of devices or rather lets say a comfortable count that won't bring the system down. So far got it running with 1 device perfectly. Small hiccup pi3b+ goes black screen and unresponsive requiring a reboot every 2-3 days. Going to do an os reload. Anyone had solid experience with the mqtt. Any chance of pulling variables ie a real number weight from a gas bottle to warn when its running low? This driver could be cool to tie into industrial devices like the siemens as that has mqtt capabilities. Any ideas on what can be done? Id like to get some cool ideas.cheers


Number of devices will not add or affect the Pi load or performance. All your devices will be in listening mode. MQTT broker role is publishing the messages, it doesn't know how many device is connected.
Link to comment
Share on other sites

Had presumed so but for some reason thought i had read someone having an issue after count > 1 on the c4 controller. Also i havent bought into the shelly brand yet but i see they have a unit capable of ir to aircons tvs etc. Seems a cheap way to gain some functionality. Its also mqtt so presume there must be a way to incorporate.

Anyone know a way to get data back to the controller for real numbers?

Link to comment
Share on other sites

  • 2 months later...

Having an issue with the programming of the MQTT bridge not firing when a message is received.

I can see the 'Last Message' being successfully received by the bridge in the 'Properties' tab.

However my programming (under 'General Message Received') only works if I press the 'Execute' button at the top of the page in Composer. It does not fire when the MQTT bridge receives the message.

Any clues appreciated!

 

Link to comment
Share on other sites

Well, after a whole year of testing with Shelly’s 1 and 2.5, I came across multiple issues, from continues dropping from WiFi network to some of them just fried with no reason, I had moved entirely to Sonoff Mini, much robust and stable hardware and even cost less ... 

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.