theovassiliou / hc2-tools Goto Github PK
View Code? Open in Web Editor NEWCommand line tools to interact with a Fibaro HC2 system
License: MIT License
Command line tools to interact with a Fibaro HC2 system
License: MIT License
Normally if you are providing a Makefile people do not read to much documentation but make just use of the normal make approach. So checking the requiered golang version would be very conventient.
On Upload hc2UploadScene expands via the require() statment included libraries.
So for a full round-trip engineering it would be beneficial to "deflate" the included libraries again.
In other words to replace code like
--^ require('library/Debug');
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
...
-- LIBRARY END -------------------------
back to
require('library/Debug');
It would be in some situations helpful if we could identify when the scene in the Fibaro HC2 system has been uploaded. A timestamp would be beneficial.
A related but perhaps different feature could be, to include the commit code in case it has been uploaded via a pre-commit hook. So the status of the uploaded scene could be visualised very easy.
It seems to be a common problem, that multiple libraries import the same libraries. For example a "debug" library can be imported multiple times. As a result only one expanded import should be used. The othe required() should be just commented.
Example
file1.lua
require('libary/debug')
require('library/hueLights')
libary/debug.lua
...
--- Print an error message in the console
Error = function ( message )
Debug("red", "error: " .. message )
end
...
And finally
library/hueLights.lua
require('libary/debug')
.....
Currently we get an expanded file1.lua as
file1.lua
--^ require('libary/debug')
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
...
--- Print an error message in the console
Error = function ( message )
Debug("red", "error: " .. message )
end
...
-- LIBRARY END -------------------------
--^ require('library/hueLights')
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
--^ require('libary/debug')
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
...
--- Print an error message in the console
Error = function ( message )
Debug("red", "error: " .. message )
end
...
-- LIBRARY END -------------------------
-- LIBRARY END -------------------------
This is definitely not what we want.
Instead
file1.lua
--^ require('libary/debug')
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
...
--- Print an error message in the console
Error = function ( message )
Debug("red", "error: " .. message )
end
...
-- LIBRARY END -------------------------
--^ require('library/hueLights')
-- LIBRARY BEGIN -------------------------
-- DO NOT MODIFY THE CODE
--^ require('libary/debug')
-- LIBRARY END -------------------------
Or something similiar would be required.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.