Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change channel sysDate to to sys_date #101

Open
boc-tothefuture opened this issue Nov 8, 2017 · 5 comments
Open

Change channel sysDate to to sys_date #101

boc-tothefuture opened this issue Nov 8, 2017 · 5 comments

Comments

@boc-tothefuture
Copy link

All of the other channels are snake_case sysDate appears to be the only one that is lowerCamelCase.

@craigham Are you OK with this proposal?

@craigham
Copy link

craigham commented Nov 8, 2017

totally ok

@boc-tothefuture
Copy link
Author

Do you have an example of how we use that channel? Now that I am not restarting my driver all that often I need to get the time update into a cron rule.
I have tried to define the thing like this:
DateTime System_Date "Omni Date [%s]" { channel="omnilink:controller:home:sysDate" }
With the following rule:

//Set the time on the omnilink
rule "Set omnilink time"
when
	System started or
    Time cron "0 0/1 * 1/1 * ? *"
then
	sendCommand(SystemDate, new DateTime())
end

And I get the following error message:

So I assume my thing is defined incorrectly, but I have never defined a thing on a bridge before as most of the other item types we have are their own type_ids (console, zone, etc).

@craigham
Copy link

craigham commented Nov 8, 2017

I have a rule like this.

rule "sync omnilink time"
when
Time cron "0 34 3 * * ?"
then
logInfo("Rules","Syncing omnilink clock")
omnilink_omnilinkBridge_omni_sysdate.postUpdate( new DateTimeType() )
end

looks like only diff is I am using the openhab date time type instead of the java.

let me know if you need more info.

@boc-tothefuture
Copy link
Author

What is omnilink_omnilinkBridge_omni_sysdate or where does that get defined?

@craigham
Copy link

craigham commented Nov 8, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants