Hi
Does anyone know if there is any bashscript to read sensors from tellstick net? or does anyone have one that they could share? I need to be able to read temp and humidity from telldus live with some sort of bashscript from commandline / crond.
I have spent days trying to figure out how to do it, but have not managed.. I really need help
Looking forward to your replies!
Best regards
/M
Bashscript to read sensors from tellstick net?
Moderator: Telldus
Bashscript to read sensors from tellstick net?
Now using Tellstick NET + NEXA & PLUGWISE
http://homeauto.does-it.net powered by gadgets from m.nu
http://homeauto.does-it.net powered by gadgets from m.nu
Re: Bashscript to read sensors from tellstick net?
Hi! if you supposed to wrote Batch...
I have a Duo, not the Net, but in telldus center they are stored in registry and you can get them with batch commands like this:
In windows, both the values for temperature and humidity is stored in registry.
You can get the temperature value from a batch/cmd file like this:
for /f "tokens=2,*" %%a in ('reg query HKCU\Software\Telldus\TelldusCenter\com.telldus.sensors\sensors\22\values\values\1\values /t REG_SZ /v value ^| findstr value') do echo %%b
The first value "22" (starts with 0,1,2) in the path is the number for the sensor, and the second "1" is for the temperature.
The value for the humidity is stored under \values\values\0\values... you can get it like this:
for /f "tokens=2,*" %%a in ('reg query HKCU\Software\Telldus\TelldusCenter\com.telldus.sensors\sensors\22\values\values\0\values /t REG_SZ /v value ^| findstr value') do echo %%b
In the examples above, the values vil be put in the %%b variable.
Important! if you run this in a batch file, use two (double) %% for the variables, if you just want to test it from a commandprompt window (cmd), then use just one percent character.
You can echo the values to textfile or something, i run scripts from eventghost and them change the values in a web page to display them on my intranets smarthome site.
Hope this helps
Regards
Egil
I have a Duo, not the Net, but in telldus center they are stored in registry and you can get them with batch commands like this:
In windows, both the values for temperature and humidity is stored in registry.
You can get the temperature value from a batch/cmd file like this:
for /f "tokens=2,*" %%a in ('reg query HKCU\Software\Telldus\TelldusCenter\com.telldus.sensors\sensors\22\values\values\1\values /t REG_SZ /v value ^| findstr value') do echo %%b
The first value "22" (starts with 0,1,2) in the path is the number for the sensor, and the second "1" is for the temperature.
The value for the humidity is stored under \values\values\0\values... you can get it like this:
for /f "tokens=2,*" %%a in ('reg query HKCU\Software\Telldus\TelldusCenter\com.telldus.sensors\sensors\22\values\values\0\values /t REG_SZ /v value ^| findstr value') do echo %%b
In the examples above, the values vil be put in the %%b variable.
Important! if you run this in a batch file, use two (double) %% for the variables, if you just want to test it from a commandprompt window (cmd), then use just one percent character.
You can echo the values to textfile or something, i run scripts from eventghost and them change the values in a web page to display them on my intranets smarthome site.
Hope this helps
Regards
Egil
Re: Bashscript to read sensors from tellstick net?
Hello
When using a tellstick net all values and sensors are stored on the live.telldus.com webpage unfortunately.
Thats why I need to find a way how to "fetch" those
Best regards.
When using a tellstick net all values and sensors are stored on the live.telldus.com webpage unfortunately.
Thats why I need to find a way how to "fetch" those
Best regards.
Now using Tellstick NET + NEXA & PLUGWISE
http://homeauto.does-it.net powered by gadgets from m.nu
http://homeauto.does-it.net powered by gadgets from m.nu
-
- Site Admin
- Posts: 2243
- Joined: Fri Mar 17, 2023 9:45 am
- Location: Lund
- Contact:
Re: Bashscript to read sensors from tellstick net?
You could extend our python example to support temperatures as well:
http://developer.telldus.com/blog/new-p ... lldus-live
http://developer.telldus.com/blog/new-p ... lldus-live
Micke Prag
Software
Telldus Technologies
Software
Telldus Technologies