ASP.NET MVC 5 C# project to build my own GUI on Telldus Live

Moderator: Telldus

Post Reply
RickardP
Posts: 55
Joined: Fri Mar 17, 2023 9:45 am
Location: Nyköping, Sweden
Contact:

ASP.NET MVC 5 C# project to build my own GUI on Telldus Live

Post by RickardP »

After hours of testing and testing i now got a good proof of conecpt project to work with Telldus Live from own GUI.

I started a project using ASP.NET MVC 5 with Restsharp and Newtonsoft JSON and i have put on Github for everyone to use or se examples, i going to work more with it forward but i know people searching for this kind of solutions: https://github.com/RickardPettersson/TelldusLive-MVC

It is in C# and Razor views but for they looking for C# code only look at the AuthController.cs and TelldusLiveController.cs for code examples.

Right now its list all devices and all sensors and devices you can turn on and of and learn.

Next step is to get sensor values and show in realtime updated every x time unit.

Then maybe get it more functionality but i whant to get a mobile GUI that works fine, i really dont like Telldus own web GUI and i going to use this code for another project working with more home automation things later.
fingalo
Posts: 53
Joined: Fri Mar 17, 2023 9:45 am

Re: ASP.NET MVC 5 C# project to build my own GUI on Telldus

Post by fingalo »

Hello,
I tested the code but get a crash. Seem that
JsonConvert.DeserializeObject
cannot convert "statevalue":null to int32 from the telldus string

{"id":"565672","clientDeviceId":"13","name":"Fuktlarm","state":0,"statevalue":null,"methods":0,"type":"group".....

Any idea how to fix this?
kastebo
Posts: 26
Joined: Fri Mar 17, 2023 9:45 am
Location: Jönköping

Re: ASP.NET MVC 5 C# project to build my own GUI on Telldus

Post by kastebo »

fingalo wrote:Hello,
I tested the code but get a crash. Seem that
JsonConvert.DeserializeObject
cannot convert "statevalue":null to int32 from the telldus string

{"id":"565672","clientDeviceId":"13","name":"Fuktlarm","state":0,"statevalue":null,"methods":0,"type":"group".....

Any idea how to fix this?
You try to deserialize your string to an object with a property named statevalue but the poroperty is an int and the statevalue in your jsonstring har value null and you can't convert the to an int.
"statevalue":null,"
Post Reply