PowerShell based cmdlets / Commands

Moderator: Telldus

ArneG
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: PowerShell based cmdlets / Commands

Post by ArneG » Tue Jan 22, 2019 12:24 pm

Tested Oregon windsensor:
Seems to work fine with latest AutomatD, but a tiny little issue (in 'properties to output'): This windsensor sends 3 values to Telldus Live; wavg, wdir and wgust. In current AutomatD wgust is not translated into a friendly name like wavg and wdir is.

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Tue Jan 22, 2019 1:04 pm

Ahh, thanks for reporting back! I've added a fix to the module for that but I'm working a few other changes as well so I'd rather wait and release them all at the same time. Not sure when I'll do the release but I'll post back when I do!

ArneG
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: PowerShell based cmdlets / Commands

Post by ArneG » Tue Jan 22, 2019 2:25 pm

No problem. For a string in Delphi 'wgust' is just as friendly (or not) as 'WindGust' or any other string :D

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Thu Feb 07, 2019 9:23 am

So, I've published a new version (1.4.0) now which should change wgust to WindGust (sorry, I guess this will be a breaking change for you but I hope you can manage :oops: :) ).

I've also added a few new functions/cmdlets as well, one noteworthy function is "Backup-TDAccount" which will store information about the clients/locations, devices, sensors, schedules and events that are associated with Telldus Live! account on local disk. This backup can be used to for example restore events in case they got lost, or as in my case, be used to migrate events from one client (Tellstick) to another (used it when I migrated from Tellstick Net to TellStick ZNet Lite v2).

The actual migration script is not published yet, but if anyone has need for it please ping me and we'll work something out! :wave:

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Wed Mar 06, 2019 10:50 pm

Minor update, seems there have been some intermittent connection issues against the Telldus Live! API lately, I've therefor added "server side retries", ie. the backend service used by the module will automatically perform a few retries (for errors related to the specific connection issues) before giving up.

This could potentially cause a slight delay in the response, but will hopefully improve reliability of the module even when Telldus Live! is a bit shaky :)

Related error message you might have seen in the module:
Telldus Live! API responded with error: "Unable to connect to the remote server"

If you still see this message or something similar, please respond to this thread with the exact error and I'll have a look.

ArneG
Posts: 43
Joined: Thu Jan 18, 2018 11:08 am

Re: PowerShell based cmdlets / Commands

Post by ArneG » Fri Mar 08, 2019 8:22 am

Yes, either you fixed it or Telldus fixed their api.
Not sure, but got lots of those timeouts you refer to during the last week or so, but now it's been 24 hours plus with no timeouts :)
I've noticed that the script execution times is now back to more or less 'normal', so maybe Telldus got their api-things right again...

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Fri Mar 08, 2019 8:31 am

Awesome! Happy to hear that.

I don't think it has been fixed on the Telldus Live side, the app is logging an event every time this happens and it happened quite a few times yesterday as well. Nothing so far today though, but it seems to come in "bursts", where multiple timeouts and connection failures happens within a specific time window.

Anyway, hope this change can fix that at least to some level so it becomes less of a problem from a module usage standpoint :-)

Masonit
Posts: 77
Joined: Thu Jan 18, 2018 11:08 am

Re: PowerShell based cmdlets / Commands

Post by Masonit » Fri Aug 02, 2019 7:00 pm

Hi

Just upgraded to Znet v2 and AutomaTD 1.4. :)

Looking forward to more reliable state value from z-wave device. But does not seem to be able to query the state of z-wave device. Should I just trust the state value I get from get-tddevice? I know this value can't be trusted on 433 devices because of one way communication.

\Masonit

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Fri Aug 02, 2019 7:18 pm

Hmm... That seems weird. What do you mean by not being able to query the state value? Is the value wrong, missing or something else?

The module just gets the data from the Telldus API, hopefully that should be correct. But if not, I'll be happy to take a closer look on what's up!

(I actually don't have any z wave device yet though but we'll figure something out!)

Masonit
Posts: 77
Joined: Thu Jan 18, 2018 11:08 am

Re: PowerShell based cmdlets / Commands

Post by Masonit » Wed Aug 07, 2019 8:10 am

I just thought I should be able to run a commad and refresh status for a specific device. The refresh command would query the physical device status.
But I just did some testing and turned off and turned on the z-wave device on the physical on/off button. And status in telldus live is updated correctly. Seems like state on z-wave device is trustworth in Tellus live. :D

\Masonit

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Wed Aug 07, 2019 8:41 am

Ahh, I get what you mean now.

Just as you said, I guess the status in Telldus Live! is simply kept in sync/updated on an event basis. So as long as the internet connection isn't dropped or there is a service error or similar, the status should be trustworthy I guess :)

Glad it works :D

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Wed Aug 14, 2019 9:33 pm

I was just made aware of a problem with authenticating this module when it's used initially or without using a stored credential that sadly seems to have been going on for a while, my apologies to anyone who's been affected by this (I used a service to provide shortened urls that was depricated this spring).

It should now have been fixed, so if you've experienced an issue related to this, please try again now!

c8h10n4o2
Posts: 84
Joined: Thu Jan 18, 2018 11:08 am
Contact:

Re: PowerShell based cmdlets / Commands

Post by c8h10n4o2 » Thu Sep 05, 2019 12:28 pm

Just wanted to let you know that I've upgraded the "backend part" to newer infrastructure. Shouldn't make any difference whatsoever in terms of how to use the module etc. but hopefully it will be slightly faster now :-)

If you notice something weird then please reach out and I'll have a look ASAP.

Post Reply