Creating first ever screen : NullReferenceException

Post here if you are having difficulty getting OSA up and running
Message
Author
tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Creating first ever screen : NullReferenceException

#1 Post by tommysharp » Sun Jun 29, 2014 4:58 pm

I'm a beginner with OSA so please forgive my feeble attempts...

I've managed to get the DSC Alarm plugin up and running and can see events in the log to show that OSA is picking up when someone trips a PIR sensor. Now I wanted to try make it visual using a screen. I created a screen and loaded up a plan of the house. I then tried to add a state image with the default icons for the open and closed lock just for testing. When I did this the screen editor gave a random error and now every time I try open it up I get a NullReferenceError as below...
Attachments
2014-06-30_125806.jpg
2014-06-30_125806.jpg (40.59 KiB) Viewed 3127 times

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: Creating first ever screen : NullReferenceException

#2 Post by Automate » Sun Jun 29, 2014 5:54 pm

tommysharp wrote:I've managed to get the DSC Alarm plugin up and running and can see events
Great, what method are you using to communicate with the DSC Alarm?

For your error see this topic
http://www.opensourceautomation.com/php ... 955&p=7867&

Replace your OSAE.UI.Control.DLL with the one at the bottom.

If you still get errors you may have to manually delete the graphic object using the OSA Web Objects page. Then re-create the graphic object using the Screens app.

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Creating first ever screen : NullReferenceException

#3 Post by tommysharp » Sun Jun 29, 2014 9:09 pm

I'm using the EnvisaLink 3 and ethernet. Been trying to use it with my Vera Lite and I'm actually a bit disappointed in the Vera Lite....

Replaced that DLL and have a slightly different error as below.
Attachments
2014-06-30_170837.jpg
2014-06-30_170837.jpg (35.38 KiB) Viewed 3117 times

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Creating first ever screen : NullReferenceException

#4 Post by tommysharp » Sun Jun 29, 2014 9:11 pm

Deleting the object for the DSC ALARM ZONE on my screen has removed the error.

Any tips on how to put the PIRs onto my house plan screen?

Thanks for your help by the way!

UPDATE : Adding a property label seems to work showing the TEXT status of "CLOSED" or "OPEN"....

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: Creating first ever screen : NullReferenceException

#5 Post by Automate » Mon Jun 30, 2014 1:40 am

You should also be able to use a State Image Control if you would rather see images for open and closed rather than the text.

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Creating first ever screen : NullReferenceException

#6 Post by tommysharp » Mon Jun 30, 2014 1:31 pm

Nah, adding a state image for one of the alarm panel PIRs still crashes the thing...

This is what the object looks like.... I have to delete it and then the screen starts working again.
Attachments
2014-07-01_093254.jpg
2014-07-01_093254.jpg (174.15 KiB) Viewed 3102 times

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: Creating first ever screen : NullReferenceException

#7 Post by Automate » Mon Jun 30, 2014 1:42 pm

Are you sure you loaded the DLL from the last post in the linked topic? There are two different DLL posted in that topic.

Should be able to create something like this
OSA State Image.png
OSA State Image.png (17.53 KiB) Viewed 3098 times

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Creating first ever screen : NullReferenceException

#8 Post by tommysharp » Mon Jun 30, 2014 2:55 pm

Just grabbed the last DLL in that thread again to make sure....

But am not able to select the state like you can :-)
Attachments
2014-07-01_105443.jpg
2014-07-01_105443.jpg (19.08 KiB) Viewed 3096 times

Automate
Posts: 1691
Joined: Sat Dec 11, 2010 1:44 pm
Location: US

Re: Creating first ever screen : NullReferenceException

#9 Post by Automate » Tue Jul 01, 2014 4:24 pm

This is strange. It works for me and the download counter is showing 20 downloads and no one else has mentioned any problems.

Into which directory are you copying the DLL?

tommysharp
Posts: 55
Joined: Thu Jun 12, 2014 1:02 pm

Re: Creating first ever screen : NullReferenceException

#10 Post by tommysharp » Tue Jul 01, 2014 4:34 pm

Copied it into the OSA program files folder and overwrote the existing file.

Sent from my Nexus 5 using Tapatalk

Post Reply