Page 6 of 9

Re: PowerShell based cmdlets / Commands

Posted: Thu Jul 19, 2018 9:17 am
by c8h10n4o2
Roger that! :-)

Re: PowerShell based cmdlets / Commands

Posted: Thu Jul 19, 2018 9:33 am
by ArneG
Also good to know regarding this issue: The collecting/maintaining of historydata even for ignored sensors still is working as usual (if the 'Save historydata' is checked). :D

So the "Get-TDSensorHistoryData"-function WILL still get the all historydata for both ignored and not ignored sensors (i.e. for ALL sensors that actually have the 'Save historydata' is checked')

Re: PowerShell based cmdlets / Commands

Posted: Thu Jul 19, 2018 9:38 am
by ArneG
A completely different question: Does anyone know why each sensor has its own 'SensorID' in addition to already having its own unique 'DeviceID'. What is it (or can it be) used for? :?:

Re: PowerShell based cmdlets / Commands

Posted: Tue Oct 09, 2018 7:01 am
by ArneG
Having a problem with renaming a telldus device to a name containing country-spesific charachters (in my case norwegian). Works manually via normal web-input on Telldus Live site, but not when using Rename-TDDevice. I think this used to work just fine on older versions. Or maybe Telldus-site/api has changed something..?

Re: PowerShell based cmdlets / Commands

Posted: Thu Oct 18, 2018 2:37 pm
by c8h10n4o2
Sorry for my late reply, somehow I didn't get any notification about your post, so I just noticed it now.

Anyway, I hope I've fixed that bug now, please update to version 1.1.6 and try again! :) (Update-Module AutomaTD -Force)

Thanks for reporting the bug!

Re: PowerShell based cmdlets / Commands

Posted: Thu Oct 18, 2018 6:34 pm
by ArneG
Same problem with Set-TDSensor and -NewName-switch....

Re: PowerShell based cmdlets / Commands

Posted: Thu Oct 18, 2018 7:33 pm
by c8h10n4o2
Doh! :banghead:

Of course! Fixed in 1.1.7! Thanks again for reporting :-)

Re: PowerShell based cmdlets / Commands

Posted: Tue Oct 23, 2018 4:27 pm
by ArneG
Both works fine now :)

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 8:50 am
by ArneG
Soooo...what about getting sensordata other than temperature and humidity? Is it possible and will you fix it?
You see I got this raincollector-thing from Oregon. It is detected just fine on telldus-web interface and it shows values for both current measurement and an average of rain per hours. Both values in millimeters (mm). It does show up in the lists from the different TD-GetSensor*-functions but reports no values for temperature/humidity (obviously because the sensor does not send that data in the first place:)

Willl you look at it? (Such other sensor data than Temp/Hum may also be an deature to take care of for other kind of sensors that the tellstick supports, for instance wind-speed/direction-sensors...)

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 8:58 am
by c8h10n4o2
If you store the output from Get-TDSensorData and look in the data-property, do you see the values there?

For example:
$Sensor = Get-TDSensorData -DeviceID 123456789
$Sensor.Data

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 9:41 am
by ArneG
Yes I do indeed :)

Data : {@{name=rrate; value=875; scale=0; lastUpdated=1543483566; max=875; maxTime=1543482344},
@{name=rtot; value=19.7; scale=0; lastUpdated=1543483566}}

or,

name : rrate
value : 875
scale : 0
lastUpdated : 1543483566
max : 875
maxTime : 1543482344

name : rtot
value : 19.7
scale : 0
lastUpdated : 1543483566

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 9:52 am
by c8h10n4o2
Great! :D

Does that work for you? :)

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 10:18 am
by ArneG
Well, I can probably pick up the values somehow, but the best would have this intergrated nicely in AutomaTD ?

I use it like this:
$SensorData=Get-TDSensor | Get-TDSensorData
$SensorData | Export-Csv "Sensors.csv" -Encoding utf8

One sensors on each line in sensors.csv. It would have been nice to have the 'rrat' and 'rtot' somewhere in those lines (on the end of each line or something..)

Also the Get-TDSensorHistoryData needs changes to output those 'rrate' and 'rtot'-values, instead of (or in addition to) temperature and humidity ?

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 11:50 am
by c8h10n4o2
I guess that could make sense, I'll try to look into it when I get a chance!

Meanwhile, you could try this:

Code: Select all

$SensorData=Get-TDSensor | Get-TDSensorData
$SensorData | select *, @{N='RainRate';e={ $_.data.where({$_.name -eq 'rrate'}).value }}, @{N='RainTotal';e={ $_.data.where({$_.name -eq 'rtot'}).value }} | Export-Csv "Sensors.csv" -Encoding utf8

Re: PowerShell based cmdlets / Commands

Posted: Thu Nov 29, 2018 12:02 pm
by ArneG
That seems to work...
Quick workaround for the Get-TDSensorHistoryData also ?