Cam - Alerts - To Webservices - Script Help

Jul 6, 2016
3
0
Cam - Alerts - To Webservices - Script Help JSON

screenshot.jpg

Im using this feature to hit my TV-Kodi using this address. So when theres motion I have it sliding in the corner of my TV

192.168.1.18:8022/jsonrpc?request={"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam"},"id":"1"}}

But I want to hit more than one IP So I guess I need to make a little batch file or something, Can someone help me out?

Thank you
 
Last edited by a moderator:
1. Download wget.exe ( I use the one from http://gnuwin32.sourceforge.net/packages/wget.htm )
2. Create a text file in the same folder as wget.exe
3. Put the following in it, copy the wget line for each IP
Code:
@echo off
wget -q "http://1.2.3.4[COLOR=#333333]:8022/jsonrpc?request={"jsonrpc":"2.0","method":"Addons. ExecuteAddon","params":{"addonid":"script.security cam"},"id":"1"}}" -O NUL
[/COLOR]wget -q "http://1.2.3.5[COLOR=#333333]:8022/jsonrpc?request={"jsonrpc":"2.0","method":"Addons. ExecuteAddon","params":{"addonid":"script.security cam"},"id":"1"}}" -O NUL[/COLOR]

4. Rename it to .bat (example: kodi_bi_alert.bat)

5. In BI under the Camera Properties -> Alerts tab, choose, Run a program or execute a script, then select your the batch file. Leave parameters blank and Window=Hide.
 
1. Download wget.exe ( I use the one from http://gnuwin32.sourceforge.net/packages/wget.htm )
2. Create a text file in the same folder as wget.exe
3. Put the following in it, copy the wget line for each IP
Code:
@echo off
wget -q "http://1.2.3.4[COLOR=#333333]:8022/jsonrpc?request={"jsonrpc":"2.0","method":"Addons. ExecuteAddon","params":{"addonid":"script.security cam"},"id":"1"}}" -O NUL
[/COLOR]wget -q "http://1.2.3.5[COLOR=#333333]:8022/jsonrpc?request={"jsonrpc":"2.0","method":"Addons. ExecuteAddon","params":{"addonid":"script.security cam"},"id":"1"}}" -O NUL[/COLOR]

4. Rename it to .bat (example: kodi_bi_alert.bat)

5. In BI under the Camera Properties -> Alerts tab, choose, Run a program or execute a script, then select your the batch file. Leave parameters blank and Window=Hide.

Thanks!!! Ill be trying this out very soon!!