Page 1 of 1
Scripting in Java
Posted: Sunday 28 January 2018 14:47
by PatrykMilewski
Hello,
I'm new here and it's my first topic, sorry if I did something wrong
I've installed my Domoticz and trying to make some scripts to make everything work as I want it to. The problem is that I'm not fully satisfied with making scripts in Blockly, LUA, Python etc. Is there any possiblity to make them in Java, or is this bad idea? I'm not talking about programming in Java, because I'm Java Dev, but about problems with performance or something else, that I don't know about. I'm not sure if Raspberry Pi 3 will handle this..
If it's possible, are there any Java libraries for this, or maybe even JavaDocs? Or maybe there is possibility to create it or join the project, if somebody is already making something like this? Is there any documentation about how to add a new languages support for scripting in Domoticz?
Couldn't find anything on forums and Google about it, but found in Wiki, that is possible to create scripts in Java, so that's why I'm asking
Re: Scripting in Java
Posted: Sunday 28 January 2018 19:15
by SweetPants
PatrykMilewski wrote: ↑Sunday 28 January 2018 14:47
Couldn't find anything on forums and Google about it, but found in Wiki, that is possible to create scripts in Java, so that's why I'm asking
Well you have answered your own question. There is no native Java scripting support in Domoticz. However, you can use Java to script against the JSON URL's.
Re: Scripting in Java
Posted: Sunday 28 January 2018 22:38
by PatrykMilewski
SweetPants wrote: ↑Sunday 28 January 2018 19:15
PatrykMilewski wrote: ↑Sunday 28 January 2018 14:47
Couldn't find anything on forums and Google about it, but found in Wiki, that is possible to create scripts in Java, so that's why I'm asking
Well you have answered your own question. There is no native Java scripting support in Domoticz. However, you can use Java to script against the JSON URL's.
Well..
JSONs are going to be probably super slow, so making native support for Java would be the best soultion, however it would be probably really time consuming..
Thank you for your answer!
Re: Scripting in Java
Posted: Sunday 28 January 2018 23:00
by gerardvs
As a former Java developer I would vote strongly against incorporating Java into Domoticz.
May be you don't mean Java but want support for JavaScript. If so, don't mix these two because they have absolutely nothing in common. Unless you think Chinese and Japanese are the same languages too.
About the JSON suggestion, this isn't necessarily slow. The main Domoticz webinterface is doing the same so just see it as an api... which in fact it is, and isn't slow.
Re: Scripting in Java
Posted: Tuesday 20 February 2018 11:32
by JodyScanlon
Hello, I would like to learn Scripting in Java. I'm new here, but if you will share your experience and will help to choose good service for an education I'll be very thankful.
Re: Scripting in Java
Posted: Tuesday 20 February 2018 21:26
by SweetPants
JodyScanlon wrote: ↑Tuesday 20 February 2018 11:32
Hello, I would like to learn Scripting in Java. I'm new here, but if you will share your experience and will help to choose good service for an education I'll be very thankful.
I'm not sure if this is the right site for you to learn Java scripting. See gerardvs comment below on the use of Java
Re: Scripting in Java
Posted: Tuesday 06 March 2018 10:05
by PatrykMilewski
Well going back to this topic, since I learned a lot about how Domoticz and events system works, there is really no point in adding Java support through JSONs.
There is really good Dzvents solution and everyone should stick to it and Python/Bash for OS scripts, to keep them as standard for scripting.
Re: Scripting in Java
Posted: Wednesday 29 August 2018 15:30
by Xiack
Hello! I'm also new here and recently became interested in java and Domoticz. I am very glad that I found training for myself on JAva. Is it possible to have a detailed guide about Domoticz?? I would be very grateful, and in return, I will share with you a very cool site
essaybison.com/college-papers/ where you can find college papers, there can still help with essays and dissertations. Such a variety. Honestly, it was useful to me.
Re: Scripting in Java
Posted: Wednesday 29 August 2018 15:55
by Antori91
Hello,
A short message to let you know that I use mainly Node.JS, i.e. Javascript to write the scripts I use at Domoticz server side. See here the scripts you could use as template >>>
https://github.com/Antori91/Home_Automa ... %20scripts, also an example here >>>
https://github.com/Antori91/Home_Automa ... %20Cluster
These Node.JS scripts use MQTT and/or HTTP/JSON API to communicate with Domoticz.