david@berto.co.uk
-
Posts
234 -
Joined
-
Last visited
-
Days Won
1
Content Type
Profiles
Forums
Blogs
Gallery
Downloads
Events
Posts posted by david@berto.co.uk
-
-
Good news.
Out of interest what are the lights/system you are controlling?
-
Christophe,
Update the MQTT Bridge driver and see if a new variable NUMBER appears. You may need to restart director/reboot.
Thanks
David
-
Ah, because MESSAGE is a string and not an integer!!!
2 mins.
-
Christophe,
The variables UPDATE, TOPIC and MESSAGE should get set when a message in received so you should be able to set LIGHT_LEVEL to the value of MESSAGE.
-
Christophe,
How are you controlling the dimmer?
Can you give me examples of the messages that you are sending/receiving?
Thanks
David
-
1 hour ago, muchachico said:
What is the model of the Sonoff Relay? There was an issue with the single channel relays which is now fixed.
If you have no authentication on your broker then make sure the username and password are blank.
Thanks
David
-
I'm putting together a PI setup with MQTT broker and FLIC server plus any other services I write. One gateway to cover all integrations.
If you would like to test get a PI 3 B+ and I'll send you the SD image.
-
1 hour ago, Amr said:
This worth trying David thanks, can't we use any of the commercially available BLE solutions like Flic Hub or Xiaomi, or whatever instead of using the Pi?
Not sure about Xiamoi but the Flic hub has does not have a open API as far as I can find hence why I used the PI. The install ins simple but a PI and insert the SD card with the software on it and all done. I'll publish the SD image with the drivers.
From Control4 you can then Identify buttons which allows you to pair the Flic button to the PI and then associate it to the Flic Button driver in Control4.
The setup is as simple as the Flic app.
-
Amr,
I now have Flic buttons working direct wit Control4, no IFTTT or Internet access required, thanks to https://github.com/50ButtonsEach/fliclib-linux-hci
I've got the setup working on a Raspberry Pi 3 B+ which acts as the BLE hub.
I've then used my MQTT Bridge to manage the messages between the Flic buttons, the Pi and Control4.
Communication is virtually instant.
Works a treat.
Thanks
David
-
If you need some help email me.
Cheers
David
-
Without playing with the kit I can not say for certain but I strongly suspect that there are different MQTT publish topics/messages per load.
-
If they run Tasmota or ESPurna then yes they will work. Look like nice switches.
-
Sorry not used Torch Light switches.
Are they wifi? Do they use MQTT?
-
Zuhair,
You only need one instance of the Cloud driver installed.
When this is installed you will be able to install the MQTT Bridge from the properties page, you need an instance of this per MQTT broker you want to connect to, normally one.
You then install the Sonoff Relay driver, one per 4 way relay unit. Set the Topic name to be the same that you set in the Tasmota or ESPurna config page on the Sonoff.
Thanks
David
-
Luis,
This looks correct and is the same way that I trigger things. See enclosed.
I have used my IFTTT driver to send a message when the light is turn on or off and all appears to work fine.
The only thing I can think of is that the variables in programming do not match the ones being updated which can sometimes happen when adding/deleing variables when the driver is loaded.
May be worth clearing the current programming, rebooting and trying again.
-
Amr,
I believe Flic buttons use BLE to communicate, not sure if they are iBeacon, Eddystone or proprietary.
I have just put some BLE drivers up at https://github.com/davidmassot/Berto which allow advertisements from iBeacon devices to be used in Control4. I'm using this for proximity.
If Flic advertisements can be received by a standard BLE receiver eg. https://blog.aprbrother.com/product/ab-ble-gateway-4-0, then this would be relatively easy to implement.
David
-
The DEVICE messages are those messages received from subscribed topics associated to connected drivers to the bridge ie. those with a link the the MQTT_LINK connection. I have a Sonoff _Relay and Homekit driver that talk directly to the bridge.
The GENERAL messages are those that are received against topics that you specify in the Topics field on the properties page.
Cheers
David
-
-
4 hours ago, NOS4A2 said:
David,
Would you have a sample code of how to send a mqtt message?
I am planning to send the status of my switches and dimmers to Home Assistant every time they change the state.
I believe it won't be much different of how you send messages to Sonoff/Tasmota.
Thanks in advance
You can publish messages to topics from my MQTT Bridge driver. The bridge needs to be registered to your MQTT broker, I use Mosquitto on a local Raspberry Pi but any platform will do, you could use AWS IoT services but then your going out to the Internet etc.
Once the bridge is setup and logged into a broker you can publish messages from programming, I have enclosed screenshots.
If on the other hand you would like to write your own Control4 drivers to interface with my MQTT Bridge then I can send you a sample driver that links to the bridge.
Thanks
-
Lukas,
I'm just using GitHub purely to allow downloading and updating/installing the drivers rather than my own private web server.
Will have a look Mi Lamp and see how easy the dimming would be to do for a new driver.
Thanks
David
-
5 minutes ago, Zuhair said:
This is really interesting! I installed Mosquitto broker on my Ubuntu home server, my dealer will install the drivers this week, USB adapter is on the way!
I'm planning to test the Sonoff smart switches to light up the backyard when there is a motion and the system is armed. And maybe few beeps or a siren on the outdoor speakers!
Great.
You only need to install the Berto_Clould driver from GitHub, https://raw.githubusercontent.com/davidmassot/Berto/master/c4z/Berto_Cloud.c4z. You can install the remaining drivers from the Berto Cloud properties page. I've made some updates so make sure your dealer downloads the latest one when he goes to install.
Have fun.
-
I have a full MQTT driver that supports SSL. I use the driver to control Sonoff kit but also it can send and receive any MQTT messages which can be used for programming.
If you would like to help me beta test then give me your email address and I will send you the drivers.
Thank you
David
Control4 and MQTT?
in General Control4 Discussion
Posted
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.