Simple wrapper for tdtool; any interest?

Moderator: Telldus

Post Reply
svanstrom.com
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am
Location: Uppsala, Sweden
Contact:

Simple wrapper for tdtool; any interest?

Post by svanstrom.com »

Yesterday I wrote a simple wrapper for tdtool, and thought I'd ask if there'd be any interest in a more feature complete version of it.

http://svanstrom.com/code/tdboss.txt

Basically it treats the description as a list of keywords, allowing for a logic that is a bit closer to natural language.

Arguments are treated as a list of ORs; if preceded with a + it must be part of the description, and preceded with a - it must not be part of the description.

Examples:
"./tdboss on livingroom garden" would switch on any unit with either keyword part of the description.
"./tdboss off +livingroom garden" would switch off any unit with the keyword garden only if it also contains the keyword livingroom.
"./tdboss on -livingroom garden" would switch on any unit with the keyword garden only if it doesn't contain the keyword livingroom.
"./tdboss on -livingroom" would switch on any unit without the keyword livingroom".

You're allowed to use any number of arguments, with or without +/-; making it possible to quickly do logic like: 'switch on all picture lights unless they're in the bedroom', 'switch on lights if they are in the living room and either blue or red, 'switch on all party lights unless they're outdoors' etc.

I mainly use this as a testing tool to speed up development, trying out different groupings of the lights; or if playing around with the controls while not wanting to disturb people in specific areas.

Caveat emptor: I was quite tired when I in the middle of night cleaned up the code; it's an alpha-version, and not what I'd call production level…

Update: It's mainly the functionality that I want to know if people would be interested in; depending on the feedback I get I might keep this as a simple wrapper, or make it a standalone replacement.
# raspberry pi, tellstick classic and (finally!) tellstick duo.
# Varning för ett gott humör och dålig humor… =D
linorgious
Posts: 3
Joined: Fri Mar 17, 2023 9:45 am
Location: Norway

Re: Simple wrapper for tdtool; any interest?

Post by linorgious »

I suppose you retracted this one?
**creativity, philosophy, history, humanity, technology**
svanstrom.com
Posts: 16
Joined: Fri Mar 17, 2023 9:45 am
Location: Uppsala, Sweden
Contact:

Re: Simple wrapper for tdtool; any interest?

Post by svanstrom.com »

Not retracted as much as didn't care about keeping the link alive since no one was interested in using it.
# raspberry pi, tellstick classic and (finally!) tellstick duo.
# Varning för ett gott humör och dålig humor… =D
Post Reply