DSC Binding Question

Hey,

I’m new to openHAB and not a programmer so I’m apologizing in advance if the answer to my question is obvious.

I’ve got a question about the DSC binding. I have the binding up and running but I’m wanting to create a custom sitemap for my wife. She doesn’t want a lot of information but one thing she does want to see is what time a particular zone was last opened or closed. What’s the easiest way for me to do that?

Thanks!

Jesse

Hey Jesse, the approach I’d take is to have rules detect when each zone state is changed and then write that to items which you then show in her custom site map :slightly_smiling:

Thanks for your quick reply!

Like I said I’m a super newbie so can you help walk me through the rules and items.

Here’s the rule I made.

rule "zone7Time"
when
Item ZONE7_GENERAL_STATUS received update
then
postUpdate(ZONE7_TIME, new DateTime()
)end

it gives me this error in the openHAB designer.

“couldn’t resolve reference to Jvm Contructor ‘Date Time’.”

This was what I put for the item.

DateTime ZONE7_TIME “Last Update: [%1$ta %1$tR]” (DSCAlarmZones)

The problem I see with the item is it doesn’t reference a binding but I’m not sure what binding it should reference.

Thanks!

I keep a track of when the status of my internet connection was last updated as “online”… This should give you some pointers on where you are going wrong.

rule "Records last Internet ONLINE time"
when
Item Internet received update
then
if (Internet.state == ON)
{postUpdate(Internet_LastOnline, new DateTimeType())}
end

Although on second look, your rule seems to find when compared to mine…

This is how the item is setup.

DateTime Internet_LastOnline “Internet [%1$ta %1$te %1$tb %1$tR]” (LastUpdated)

I’ll have a go at setting up a new item in my sitemap that shows the last activated PIR and when and see if I can get that going…

Thanks for your help! I figured out it was a problem with the name I gave the item. I think it’s because it was associating it with the DSC binding but there isn’t anything in the binding that it could reference.