![Smile :-)](./images/smilies/icon_e_smile.gif)
PowerShell based cmdlets / Commands
Moderator: Telldus
Re: PowerShell based cmdlets / Commands
Roger that! ![Smile :-)](./images/smilies/icon_e_smile.gif)
![Smile :-)](./images/smilies/icon_e_smile.gif)
Re: PowerShell based cmdlets / Commands
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).
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')
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
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
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? ![Question :?:](./images/smilies/icon_question.gif)
![Question :?:](./images/smilies/icon_question.gif)
Re: PowerShell based cmdlets / Commands
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
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!
Anyway, I hope I've fixed that bug now, please update to version 1.1.6 and try again!
![Smile :)](./images/smilies/icon_e_smile.gif)
Thanks for reporting the bug!
Re: PowerShell based cmdlets / Commands
Doh!
Of course! Fixed in 1.1.7! Thanks again for reporting![Smile :-)](./images/smilies/icon_e_smile.gif)
![Bang Head :banghead:](./images/smilies/icon_banghead.gif)
Of course! Fixed in 1.1.7! Thanks again for reporting
![Smile :-)](./images/smilies/icon_e_smile.gif)
Re: PowerShell based cmdlets / Commands
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...)
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
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
For example:
$Sensor = Get-TDSensorData -DeviceID 123456789
$Sensor.Data
Re: PowerShell based cmdlets / Commands
Yes I do indeed ![Smile :)](./images/smilies/icon_e_smile.gif)
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
![Smile :)](./images/smilies/icon_e_smile.gif)
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
Great!
Does that work for you?![Smile :)](./images/smilies/icon_e_smile.gif)
![Very Happy :D](./images/smilies/icon_e_biggrin.gif)
Does that work for you?
![Smile :)](./images/smilies/icon_e_smile.gif)
Re: PowerShell based cmdlets / Commands
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 ?
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
I guess that could make sense, I'll try to look into it when I get a chance!
Meanwhile, you could try this:
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
That seems to work...
Quick workaround for the Get-TDSensorHistoryData also ?
Quick workaround for the Get-TDSensorHistoryData also ?