Flic Hub and Internet Request
-
Hi,
I'am new and just had deliverd my starterpack, I installed all and it works. I also run Domoticz on my NAS. I want Flic to change virtual-switches. I think that i need Internet Request, only I don't know how. I'am not a specialist and i really don't know how i can arrange that. I search on internet , but didn't find any sollution.
Can someone help me with this?
-
Hi there Stefan.
What you're asking should be fairly simple though may require a bit of work to find out the ID's of everything that you are going to trigger.What you are going to do is make an Internet Request (usually a POST) to your Domoticz . So the URL to select will be:
Where 192.168.0.12 will be replaced by the IP address of your NAS. You can find this by looking at the 'connected devices' page on your router. 8080 is the port that Domoticz listens to. If you haven't changed this it should stay the same.
The 'Headers' and 'Body' of the Internet Request will then depend up the authentication that you've set up and the device and command that you want to control.This link API should be useful.
For example: to toggle a switch with an id of 99 you would sent the command in json of:
type=command¶m=switchlight&idx=99&switchcmd=Toggle
I'm still learning myself but hope this helps