I finally made it. Here's a picture:
https://i.imgur.com/SAGNol4.jpg
It's a temporary connection. I'll probably switch to a lower power supply because it's less dangerous to manipulate (24/60V or 12V).
What do you think about it ? Anything wrong (unless my picture isn't well taken

) ?
Also I integrated a button on my Domoticz, here's what I did:
(
check this link for more information)
Create a virtual button (type Dummy) in Hardware
Create your button, name it how you want to, and choose the right type (switch...)
Then go to your Shelly settings -> Device Info, and take note of the Device ID and the channel.
Next go to settings user, and get your authorization key (bottom of the page). Take note of the server adress too.
Be sure to be on the
http://my.shelly.cloud dashboard and not on the 192.168.xx.xx local adress of your Shelly, or you won't have all of the informations.
Next go to your Domoticz gui, Settings -> More options -> Events and create a LUA event (be sure to enable it).
Put this script in:
Code: Select all
if (devicechanged['NAME_OF_YOUR_VIRTUAL_BUTTON'] == 'ACTION_TO_DETECT') then
os.execute ('curl --data "POST_DATA" SHELLY_SERVER_ADRESS)
end
In my example, I only need to detect the On position for my gate because it's a push button so it's state change every time I push it.
The POST_DATA needed are:
turn: [on/off]
channel: the channel you saw in shelly settings
id: id of your device
auth_key: the key you got in your settings user
The SERVER_ADRESS is the adress you saw under you auth_key + /device/relay/control. For me it is
https://shelly-10-eu.shelly.cloud so I will use
https://shelly-10-eu.shelly.cloud/device/relay/control
A script example:
Code: Select all
if (devicechanged['Gate'] == 'On') then
os.execute ('curl --data "turn=on&channel=0&id=MY_DEVICE_ID&auth_key=MjMz[...]9BD0" https://shelly-10-eu.shelly.cloud/device/relay/control')
end
It might not be the fastest way to control the Shelly but it works perfectly. Hope it can help someone.
Domoticz v4.9700 on NAS Synology DS115j, RFLink on Arduino Mega 2560 (nodo-shop.nl) controlling Somfy RTS blinds, Shelly 1