I guess I still need to use the script for Security Can Overlay http://forum.kodi.tv/showthread.php?tid=182540
I had hoped something like homeseer would be possible

Moderator: leecollings
Code: Select all
print('------------------------------------')
print('this will end up in the domoticz log')
print('------------------------------------')
commandArray = {}
commandArray['Studeerkamer Kodi']='Execute script.securitycam'
-- commandArray['SendNotification']='Send Alarm Message to everything!'
return commandArray
Code: Select all
2015-12-20 10:47:00.223 LUA: ------------------------------------
2015-12-20 10:47:00.223 LUA: this will end up in the domoticz log
2015-12-20 10:47:00.223 LUA: ------------------------------------
Code: Select all
-- commandArray['SendNotification']='Send Alarm Message to everything!'
Code: Select all
2015-12-20 11:11:15.623 Kodi: (Studeerkamer) Handling message: '{"id":1007,"jsonrpc":"2.0","result":{"canhibernate":true,"canshutdown":true,"cansuspend":true}}'.
2015-12-20 11:11:15.623 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetActivePlayers","id":1005}'
2015-12-20 11:11:15.624 Kodi: (Studeerkamer) Handling message: '{"id":1001,"jsonrpc":"2.0","result":"pong"}'.
2015-12-20 11:11:15.624 Kodi: (Studeerkamer) Handling message: '{"jsonrpc":"2.0","method":"Input.OnInputRequested","params":{"data":{"title":"Port","type":"number","value":"9090"},"sender":"xbmc"}}'.
2015-12-20 11:11:15.624 Kodi: (Studeerkamer) Message warning, unhandled method: 'Input.OnInputRequested'
2015-12-20 11:11:15.624 Kodi: (Studeerkamer) Handling message: '{"jsonrpc":"2.0","method":"Input.OnInputFinished","params":{"data":null,"sender":"xbmc"}}'.
2015-12-20 11:11:15.624 Kodi: (Studeerkamer) Message warning, unhandled method: 'Input.OnInputFinished'
2015-12-20 11:11:15.628 Kodi: (Studeerkamer) Handling message: '{"id":1005,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}'.
2015-12-20 11:11:15.628 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetItem","id":1003,"params":{"playerid":1,"properties":["artist","album","year","channel","showtitle","season","episode","title"]}}'
2015-12-20 11:11:15.671 Kodi: (Studeerkamer) Handling message: '{"id":1003,"jsonrpc":"2.0","result":{"item":{"album":"","artist":[],"episode":1,"id":7885,"label":"The Locomotion Interruption","season":8,"showtitle":"The Big Bang Theory","title":"The Locomotion Interruption","type":"episode","year":0}}}'.
2015-12-20 11:11:15.671 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2015-12-20 11:11:15.676 Kodi: (Studeerkamer) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":27.37359619140625,"speed":1}}'.
2015-12-20 11:11:15.681 Kodi: (Studeerkamer) Event: 'Video - The Big Bang Theory [S8E1], The Locomotion Interruption'.'
Code: Select all
commandArray['Studeerkamer Kodi']='Pause'
Code: Select all
2015-12-20 11:14:52.765 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"playpause"},"id":1006}'
2015-12-20 11:14:52.765 Kodi: (Studeerkamer) Sent command: 'Input.ExecuteAction playpause'.
2015-12-20 11:14:52.766 Kodi: (Studeerkamer) Handling message: '{"id":1006,"jsonrpc":"2.0","result":"OK"}'.
Any possibility we can track this problem? Its still a problem...Brutus wrote:It still will not work as I install Domoticz as a service...Dnpwwo wrote:I uploaded a new version that has a change to the multicast to force messages to loopback and be visible to the machine that sends them. That should help people who run Kodi and Domoitcz on the same server.
Also added some logic to push the correct device icon with the message. Custom icons will be in the next version.
Code: Select all
commandArray = {}
commandArray['Lounge']='Execute weather.ozweather'
return commandArray
Code: Select all
2015-12-22 07:09:00.799 Kodi: (Lounge) Sent command: 'Execute Addon weather.ozweather'.
2015-12-22 07:09:00.802 Kodi: (Lounge) Executed Addon OK.
Dnpwwo wrote:@sincze, firstly thanks for putting together a really good post. Trouble shooting is so much easier when people take the time to post the detail of their issue.![]()
Code: Select all
commandArray = {}
commandArray['Studeerkamer']='Execute script.securitycam'
commandArray['Studeerkamer']='Execute weather.ozweather'
return commandArray
Code: Select all
2015-12-21 21:58:05.447 Kodi: (Studeerkamer) Connected to '*.*.*.*:9090'.
2015-12-21 21:58:05.450 Kodi: (Studeerkamer) Event: 'On'.
2015-12-21 21:58:05.579 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"System.GetProperties","params":{"properties":["canhibernate","cansuspend","canshutdown"]},"id":1007}'
2015-12-21 21:58:05.778 Kodi: (Keuken) Connected to '*.*.*.*:9090'.
2015-12-21 21:58:05.781 Kodi: (Keuken) Event: 'On'.
2015-12-21 21:58:06.579 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"JSONRPC.Ping","id":1001}'
....
....
2015-12-21 22:00:29.366 Kodi: Restarting I/O service thread.
Code: Select all
2015-12-21 22:01:00.382 EventSystem: Script event triggered: /home/linaro/domoticz/scripts/lua/script_time_kodi.lua
Code: Select all
2015-12-21 22:02:35.086 Kodi: (Studeerkamer) Event: 'Off'.
2015-12-21 22:02:35.215 Kodi: (Studeerkamer) Disonnected.
2015-12-21 22:02:35.266 Kodi: (Studeerkamer) Connected to '*.*.*.*:9090'.
2015-12-21 22:02:35.268 Kodi: (Studeerkamer) Event: 'On'.
2015-12-21 22:02:35.391 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"System.GetProperties","params":{"properties":["canhibernate","cansuspend","canshutdown"]},"id":1007}'
2015-12-21 22:02:35.399 Kodi: (Studeerkamer) Handling message: '{"id":1007,"jsonrpc":"2.0","result":{"canhibernate":true,"canshutdown":true,"cansuspend":true}}'.
2015-12-21 22:02:35.399 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetActivePlayers","id":1005}'
2015-12-21 22:02:35.401 Kodi: (Studeerkamer) Handling message: '{"id":1005,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}'.
2015-12-21 22:02:35.401 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetItem","id":1003,"params":{"playerid":1,"properties":["artist","album","year","channel","showtitle","season","episode","title"]}}'
2015-12-21 22:02:35.531 Kodi: (Studeerkamer) Handling message: '{"id":1003,"jsonrpc":"2.0","result":{"item":{"album":"","artist":[],"episode":9,"id":7893,"label":"The Septum Deviation","season":8,"showtitle":"The Big Bang Theory","title":"The Septum Deviation","type":"episode","year":0}}}'.
2015-12-21 22:02:35.531 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2015-12-21 22:02:35.534 Kodi: (Studeerkamer) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":53.261528015136719,"speed":1}}'.
2015-12-21 22:02:35.537 Kodi: (Studeerkamer) Event: 'Video - The Big Bang Theory [S8E9], The Septum Deviation'.
2015-12-21 22:02:36.392 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2015-12-21 22:02:36.393 Kodi: (Studeerkamer) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":53.342601776123047,"speed":1}}'.
2015-12-21 22:02:37.312 Kodi: (Studeerkamer) Handling message: '{"jsonrpc":"2.0","method":"Input.OnInputRequested","params":{"data":{"title":"Port","type":"number","value":"9090"},"sender":"xbmc"}}'.
2015-12-21 22:02:37.312 Kodi: (Studeerkamer) Message warning, unhandled method: 'Input.OnInputRequested'
..
..
2015-12-21 22:02:40.773 Kodi: (Studeerkamer) Handling message: '{"jsonrpc":"2.0","method":"Input.OnInputFinished","params":{"data":null,"sender":"xbmc"}}'.
2015-12-21 22:02:40.773 Kodi: (Studeerkamer) Message warning, unhandled method: 'Input.OnInputFinished'
..
..
2015-12-21 22:03:00.409 EventSystem: Script event triggered: /home/linaro/domoticz/scripts/lua/script_time_kodi.lua
2015-12-21 22:03:00.970 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"weather.ozweather"},"id":1010}'
2015-12-21 22:03:00.970 Kodi: (Studeerkamer) Sent command: 'Execute Addon weather.ozweather'.
2015-12-21 22:03:00.975 Kodi: (Studeerkamer) Handling message: '{"error":{"code":-32602,"message":"Invalid params."},"id":1010,"jsonrpc":"2.0"}'.
2015-12-21 22:03:00.975 Error: Kodi: (Studeerkamer) Code -32602 Text 'Invalid params.' ID '1010' Request '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"weather.ozweather"},"id":1010}'
The problem is when you install Domoticz as a service in Windows the notifications don't reach the Kodi Media player. When you install Domoticz as a program they work.Dnpwwo wrote:
@Brutus, I need details to help you.
Can you post the Kodi notification config and the Windows Firewall config for Domoticz.
Let's see if I can solve my first problem (Kodi remote) if I open the above ports combined with the links below:Brutus wrote:
Firewall Rules:
Port 8080 open (Domoticz webport)
Port 9090 open (Remote control)
Port 8085 open (Hardware monitor)
Port 9777 open (Notification port Kodi)
All Ports UDP and TCP for Kodi.exe
Code: Select all
commandArray = {}
commandArray['Studeerkamer']='Execute script.securitycam'
commandArray['Studeerkamer']='Execute weather.ozweather'
return commandArray
Code: Select all
commandArray = {}
commandArray['Studeerkamer']='Execute script.securitycam'
return commandArray
Muchas gracias Dnpwwo.Dnpwwo wrote: The Bad news:
Although I develop on Windows I don't really use it and I have no idea why you would need to fiddle with the settings post reboot. What I do know is that the Kodi Web Server settings and http have nothing to do the Kodi interface that Domoticz uses. I only use Kodi on RPi.
Code: Select all
Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Input.ExecuteAction","params":{"action":"pause"},"id":1006}'
Kodi: (Studeerkamer) Sent command: 'Input.ExecuteAction pause'.
Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Addons.ExecuteAddon","params":{"addonid":"script.securitycam"},"id":1010}'
Kodi: (Studeerkamer) Sent command: 'Execute Addon script.securitycam'.
Code: Select all
2015-12-22 18:25:48.631 Kodi: (Studeerkamer) Event: 'Off'.
2015-12-22 18:25:49.127 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"System.GetProperties","params":{"properties":["canhibernate","cansuspend","canshutdown"]},"id":1007}'
2015-12-22 18:25:49.130 Kodi: (Studeerkamer) Handling message: '{"id":1007,"jsonrpc":"2.0","result":{"canhibernate":true,"canshutdown":true,"cansuspend":true}}'.
2015-12-22 18:25:49.130 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetActivePlayers","id":1005}'
2015-12-22 18:25:49.132 Kodi: (Studeerkamer) Handling message: '{"id":1005,"jsonrpc":"2.0","result":[{"playerid":1,"type":"video"}]}'.
2015-12-22 18:25:49.132 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetItem","id":1003,"params":{"playerid":1,"properties":["artist","album","year","channel","showtitle","season","episode","title"]}}'
2015-12-22 18:25:49.204 Kodi: (Studeerkamer) Handling message: '{"id":1003,"jsonrpc":"2.0","result":{"item":{"album":"","artist":[],"episode":3,"id":7728,"label":"The Fuzzy Boots Corollary","season":1,"showtitle":"The Big Bang Theory","title":"The Fuzzy Boots Corollary","type":"episode","year":0}}}'.
2015-12-22 18:25:49.204 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2015-12-22 18:25:49.205 Kodi: (Studeerkamer) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":65.3211669921875,"speed":1}}'.
2015-12-22 18:25:49.212 Kodi: (Studeerkamer) Event: 'Video - The Big Bang Theory [S1E3], The Fuzzy Boots Corollary'.
2015-12-22 18:25:50.128 Kodi: (Studeerkamer) Sending data: '{"jsonrpc":"2.0","method":"Player.GetProperties","id":1002,"params":{"playerid":1,"properties":["live","percentage","speed"]}}'
2015-12-22 18:25:50.129 Kodi: (Studeerkamer) Handling message: '{"id":1002,"jsonrpc":"2.0","result":{"live":false,"percentage":65.398414611816406,"speed":1}}'.
Code: Select all
commandArray['Studeerkamer']='Pause'
or
commandArray['Studeerkamer']='Execute script.securitycam'
Code: Select all
System -> Settings -> Services -> Web Server,
- disable the Allow remote control via HTTP when it was switched of disabling HTTP 9090
Code: Select all
C:\>netstat -an |find /i "listening"
Code: Select all
....
TCP 0.0.0.0:9090 0.0.0.0:0 LISTENING
TCP 0.0.0.0:9090 0.0.0.0:0 LISTENING
....
TCP [::]:9090 [::]:0 LISTENING
TCP [::]:9090 [::]:0 LISTENING
Code: Select all
....
TCP 0.0.0.0:9090 0.0.0.0:0 LISTENING
....
TCP [::]:9090 [::]:0 LISTENING
....
Code: Select all
C:\>netstat -an |find /i "listening"
Code: Select all
...
TCP 0.0.0.0:8080
TCP 0.0.0.0:9090
...
TCP [::]:8080
TCP [::]:9090
....
I'm glad to hear someone else has the same problem as me. The problem itself is not of course.MarcelMAH wrote:I am running Kodi and Domoticz on Windows 8.1 x64 and also have the problem that Kodi does not respond on my notifications when I start Domoticz as a service.
When I stop the service and start Domoticz manually the notifications work. The log says they always work (even when started as a service, they just don't show). In all cases the broadcast does NOT work. I enter my Kodi IP.
Any thoughts?
Always better not to be the only oneBrutus wrote:I'm glad to hear someone else has the same problem as me. The problem itself is not of course.MarcelMAH wrote:I am running Kodi and Domoticz on Windows 8.1 x64 and also have the problem that Kodi does not respond on my notifications when I start Domoticz as a service.
When I stop the service and start Domoticz manually the notifications work. The log says they always work (even when started as a service, they just don't show). In all cases the broadcast does NOT work. I enter my Kodi IP.
Any thoughts?![]()
So I think as mentioned before it's related to the "service" part of Domoticz.
Users browsing this forum: No registered users and 1 guest