Page 19 of 28

Re: TellStick Duo

Posted: Sun Feb 08, 2015 5:03 pm
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:

Re: TellStick Duo

Posted: Mon Feb 09, 2015 2:20 pm
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?

Re: TellStick Duo

Posted: Mon Feb 09, 2015 3:34 pm
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)

Re: TellStick Duo

Posted: Mon Feb 09, 2015 7:28 pm
by srki76
Thanks!
That will do the trick :)

Re: TellStick Duo

Posted: Fri Feb 13, 2015 12:11 pm
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)

Re: TellStick Duo

Posted: Fri Feb 13, 2015 12:17 pm
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. :)

Re: TellStick Duo

Posted: Fri Feb 13, 2015 12:27 pm
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

Re: TellStick Duo

Posted: Fri Feb 13, 2015 12:30 pm
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!

Re: TellStick Duo

Posted: Tue Feb 24, 2015 8:27 am
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.

Re: TellStick Duo

Posted: Tue Feb 24, 2015 10:06 am
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

Re: TellStick Duo

Posted: Tue Feb 24, 2015 10:13 am
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:

Re: TellStick Duo

Posted: Tue Feb 24, 2015 11:54 am
by krambriw
and gold these days...
U have done well, but just wait 6 more minute

Re: TellStick Duo

Posted: Tue Feb 24, 2015 11:57 am
by Mastiff
OK, I will give you that Kalla is the favourite today! ;)

Re: TellStick Duo

Posted: Tue Feb 24, 2015 1:29 pm
by Mastiff
And how... Man the Norwegians had that dyslectic ski man again. The one who keeps mixing up glue and glider!

Re: TellStick Duo

Posted: Tue Feb 24, 2015 1:50 pm
by krambriw
Sorry for that,,,but happy here
Image1.jpg