Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

TellStick Duo

Questions and comments specific to a particular plugin should go here.
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

Up and running again, thanks! Removed the 8020 port and created a new port for 8005 and restarted both EG and NHS, and Bob's your uncle, Fannie's your aunt (wasn't that Jack Sparrow, excuse me, captain Jack Sparrow?)! I can turn on and off stuff as well, so next step will be actually using that for something! That will probably have wait until next time I'm out here, though. Enough to keep me busy the rest of the day and a few hours tomorrow, before we leave for home. Can't wait for the next thing you'll do with this! :mrgreen:
srki76
Posts: 9
Joined: Sat Feb 07, 2015 10:14 am

Re: TellStick Duo

Post by srki76 »

krambriw wrote:...
Hi krambriw,
after humidity now i have a script request for temperature (same sensor), and this time i need a temp range (every value above 31.2C) to execute a macro.
I dont know python at all, but from Your script I learn that it should look someting like this:

Code: Select all

def eventHandler(pload):
    temp_level = int(pload)
    if temp_level => 31.2:
        pass
    else:
        eg.StopMacro()
eventHandler(eg.event.payload)
And ofcorse I got errors in log:

Code: Select all

15:39:39            Traceback (most recent call last):
15:39:39              Python script "23", line 7, in <module>
15:39:39                eventHandler(eg.event.payload)
15:39:39              Python script "23", line 2, in eventHandler
15:39:39                temp_level = int(pload)
15:39:39            ValueError: invalid literal for int() with base 10: '18.2'
Please, can You help me with the code?
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

Well, temperature is a float and humidity an integer so the script should be something like this:

Code: Select all

def eventHandler(pload):
    temp_level = float(pload)
    if temp_level >= 31.2:
        pass
    else:
        eg.StopMacro()

eventHandler(eg.event.payload)
srki76
Posts: 9
Joined: Sat Feb 07, 2015 10:14 am

Re: TellStick Duo

Post by srki76 »

Thanks!
That will do the trick :)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

@Mastiff,
I have uploaded a new beta version of the OpenNetHome plug. I think it is working really nice now

- very fast switching of lamps
- keeps track of sensors and if lost, after 10 minutes you get an event
- monitors and re-connects to OpenNetHome much better (try to disconnect or stop OpenNetHome server and see whats happen)
- first message when socket time out occurs (default around 600 seconds, I have myself lowered this to 120, see setting of the plugin)
- consecutive messages every 25 seconds or so, re-connect or restart NetHomeServer and wait and EG will re-connect
- messages are printed as red error messages, it is easy to create event instead. Advise?
- prepared to give event if TellStick is disconnected/reconnected to NetHomeServer (but this is currently not yet working on-line in NetHome, if you restart NetHome without TellStick connected you will see this)
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

Thanks, man! :D I'm at home now, but I'm going back to the cabin next weekend or the Monday after, so I'll be testing this then! And yes, I would like an event on that timeout. Is it possible to make it wait until the fourth timeout to go event? Then HNS has time to reconnect before I do a reboot. :)
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

Sure, that's easy, I'll add that until next weekend (or earlier) so that the event gets created after 4 reconnection attempts

Best regards
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

Great, thanks! Then I'll tie that to a macro that both sends me an alert mail and reboots the VM! Then I can check if all is well if necessary. Maybe I could even have a macro on startup that sends another E-mail when the first event from the Tellstick comes in!
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

Back at the cabin, and I tested it now. Works as advertised, thanks! Reboots my computer when it looses the connection. I have btw registered at the NetHomeServer forum (takes some time to be activated, it seems to be a manual process). I want to ask if they can put in support for RollerTrol, which is the only thing missing there now, as far as I'm concerned. :) That works for Telldus Center, but not in NetHomeServer.
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

Excellent,

I'm also waiting for Stefan to finish adding the monitoring stuff of device removal so that I can finish the NetHomeServer plug. It is a freeware so I do respect people eventually have other tasks in life :D
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

Well, I find it hard to believe that anybody has more important things to do than to cater to my every whim! But maybe it's all the oil (and gold these days...) that's spoilt us? :mrgreen:
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

and gold these days...
U have done well, but just wait 6 more minute
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

OK, I will give you that Kalla is the favourite today! ;)
Mastiff
Experienced User
Posts: 872
Joined: Thu May 03, 2012 10:43 am

Re: TellStick Duo

Post by Mastiff »

And how... Man the Norwegians had that dyslectic ski man again. The one who keeps mixing up glue and glider!
krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: TellStick Duo

Post by krambriw »

Sorry for that,,,but happy here
Image1.jpg
Post Reply