Instant messaging ideas?

Functionality and usage of the OpenNethome Server
Post Reply
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Instant messaging ideas?

Post by Nasty76 »

Hey , i have install im service which is nice , you make good job with nethome dont understand wrong , but i have couple idea how we get much better im system. I think how about now we have hardcoded functions , how hard is code like ai-nethome , i mean when u sent im message example,
- somelampname on , nethome parse automatic like if lamp name find nethome items do action = on, and same timers if timer found nethome items , parse string timer name , parse start time and endtime and sent them timer item.
Thank you for make this awesome home automation software for free :P
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Instant messaging ideas?

Post by stefangsbb »

Thanks!
I have actually been thinking about similar ideas. Especially since I realized that my iPhone has voice recognition, so I can actually talk in the commands. I do not really like spoken interfaces, but sometimes it is practical.

One Idea would be to have an Item where you give it a list of lamps to control, and specify phrases for turning on or off (and perhaps dim) the lamp. Then it would be possible to parse the rest of the message as the name of the Lamp and actually perform the task. Is that how you meant?

/Stefan
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Instant messaging ideas?

Post by Nasty76 »

Well not sure my ideas are like lighting first flash and then fix damages :D.
i think something like if i sent im message bedroom,on
now im parser look if item list contains bedroom then parse if there is command on,off,toggle if found execute command bedroom,on
if not maybe im answer no item found.
then if i have timer like wakeup and i sent string wakeup,10:00-11:00
nethome search item list if item called wakeup find if yes then try parse time xx:xx-xx:xx if time found correct format execete command and maybe answer back wakup set 10:00-11:00 and if item not found answer item not found.

i this work realy good in lamps and timers i don't know if there needed control other nethome stuff with im?
so i think that input im string is some how easy to parse and get idea what user want do.
Not sure i m noob coder which can somehow little copy paste code and sometimes get something work :D
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Instant messaging ideas?

Post by stefangsbb »

Ok, I am a bit afraid of the risk of the Item misunderstanding what you want to do, and doing the wrong thing… Also, I don’t want the commands to be too technical for the user.

I put together a simple Item called LampMessageInteractor which does sort of what you suggested. You specify a list of lamps it controls and an “on string” and an “off string”. The rest of the message is interpreted as the name of the Item. So if I have specified the OnString as “turn on”, I can send the message “Turn on Wind”. It will then match the “Turn on” phrase and then try to find a lamp where the name begins with “Wind”, in my case “Window lamp” and turn it on. It is in the nightly build now and you can see the code at: https://github.com/NetHome/NetHomeServe ... actor.java if you want to use it as a base for your own plugin.

/Stefan
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Instant messaging ideas?

Post by Nasty76 »

yeah thanks for fast reply , but I don't realy like I need configurate all lamps and give them commands when nethome have already item name :D.
I m too lazy :P but I test that new feature soon.
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Instant messaging ideas?

Post by Nasty76 »

Ok that lamp item work nice , but but i dont know if i think too hard or something , now i need remember which command i give lamps :D.
thats fine like it is , most of user think that is good way manage lamps via instant message, how about same kind system in timers :P
ps. can I some how sent back message example if I sent lamp1 on , nethome answer $lamp what just finded string and state?
stefangsbb
Site Admin
Posts: 313
Joined: Sun Nov 30, 2014 2:16 pm

Re: Instant messaging ideas?

Post by stefangsbb »

Well, it should not be THAT hard to remember right? I am guessing that instead of "turn on" you would configure the word "Sytytys", or on Swedish I use the word "Tänd" as trigger for turning on the lamp. The problem would be for Germans I guess, since they like to put the verb last in their sentences...

Oh well, I did add the possibility to use the keyword #LAMP in the reply message, which will be replaced with the name of the matching lamp. This also works with the lookup feature, so you can write for example: "Ok, set #LAMP to ${#LAMP.State}" . It is in the nightly...
Nasty76
Posts: 145
Joined: Tue Dec 09, 2014 1:20 am

Re: Instant messaging ideas?

Post by Nasty76 »

Awesome and fast work. Thanks and merry xmas and happy new year.
Post Reply