This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Zwave - Fibaro Motion Sensor
#21
Z-wave logo is shown behind the "RS485 / USB etc." external gateways cube Smile
Meaning, by having for example Serial to Z-wave gateway, it can be easily added through scripting by integrator himself.
Reply
#22
Thumbs Up 
(08.10.2015, 12:48)edgars Wrote: Z-wave logo is shown behind the "RS485 / USB etc." external gateways cube Smile
Meaning, by having for example Serial to Z-wave gateway, it can be easily added through scripting by integrator himself.

Ok, nice to know  Smile
Reply
#23
I am ready for beta testing, Customers are asking for this
Reply
#24
By when can we expect to have a first version of the z-wave gateway and Bluetooth?
Reply
#25
Probably by the end of the year. Which Bluetooth devices are you planning to connect?
Reply
#26
I am planning to use it for a Customer with solar panels, I need to read out the sma inverter

I could find a bypass for now using an open source project domoticz that can handle Bluetooth, z-wave,... The issue that I am facing is easy bridging domoticz or openhab with logic machine. I see two options that open up your platform with other platforms

- mqtt, but then there would be need to easy subscribe to messsage types and handeling of the messsage formats (see node red)
- incomming and ontging rest services calls like you have for knx GROUP adresses with custom scripts behind the services (see weinzierl baos interface)

Is any of the above two options already possible/easy to add?

Adding it through scripts maybe feasible, but seems quite cumbersome
Reply
#27
Do you have full specification of where the inverter data is stored (handle id / uuid) and what is the data type? Our BLE mapper has profiles so end users don't have to write any code, but each profile is basically a script because there's no unified way of storing data in BLE, so each device from each manufacturer requires different approach.

As for remote services you can always add an event script and use standard remote services. It is also possible to use Lua scripts that are accessible through the web server, but we are still preparing full documentation and examples for that.
Reply
#28
Thanks for your reply

I was planning to use the following open source project for the interfacing
https://github.com/ez2X8pk61DHkdztgFT6O/...th-reader2

It seems just like a plain serial protocol

The packet layout can be found here
http://blog.jamesball.co.uk/2013/02/sma-...ormat.html

As for the Remote services, i Will have to dig more into the capabilities of lua.
I hope that you can add something for this in the future like a generic rest interface behind which we could at scripts for example
-Mylogicmachine:80/api/universalInput/1?value=on (http put)
-Mylogicmachine:80/api/universalOutput/1 (http get)
behind the call custom scripts like you have for the universal input/outputs
Reply
#29
Hello

I managed to integrate zwave, rf devices, .... by using domoticz as gateway, for now I only use it for switching zwave and rf devices and it works pretty well

domoticz you find here (I installed it on a synology nas):
https://www.domoticz.com/

below my user library

Code:
DOMOTICZ_IP = '192.168.0.12'
DOMOTICZ_PORT = '8084'
DOMOTICZ_ID_BASEMENT_COMPRESSOR = '23'
DOMOTICZ_ID_LIVINGROOM_READING_LIGHT = '215'
DOMOTICZ_ID_LIVINGROOM_VENTILATOR = '102'

KNX_GROUP_LIVINGROOM_COMPRESSOR_ON_OFF = '8/0/0'
KNX_GROUP_LIVINGROOM_COMPRESSOR_ON_OFF_STATUS = '8/0/1'
KNX_GROUP_LIVINGROOM_READING_LIGHT_ON_OFF = '8/1/0'
KNX_GROUP_LIVINGROOM_READING_LIGHT_ON_OFF_STATUS = '8/1/1'
KNX_GROUP_LIVINGROOM_VENTILATOR_ON_OFF = '8/1/2'
KNX_GROUP_LIVINGROOM_VENTILATOR_ON_OFF_STATUS = '8/1/3'


-- write value to knx only if value changed
function writeKNX(group, value, default, typ)
 local key,time
 
--  time = os.microtime()
--  log('writeKNX(group, value, typ)',group,value,typ)

 key = 'KNX_GRP_' .. string.gsub(group, "/", "_")
--  log('writeKNX(group, value, typ)',key)

 if ((storage.get(key, default)) ~= value) then
--    log('now writing writeKNX(group, value, typ)',key, group, value)
   storage.set(key, value)
   grp.write(group, value, typ)
 end
end

-- toggle on / off
function domoticzSwitch(host, port, domoticzId, value)
 local time

--  time = os.microtime()
--  log('domoticzSwitch(host, port, domoticzId, value)',host, port, domoticzId, value)

 if (value == true) then
   domoticzCmd(host, port, domoticzId, 'switchlight', 'On')
 else
   domoticzCmd(host, port, domoticzId, 'switchlight', 'Off')
 end
 
--  time = os.microtime() - time
--  log('domoticzSwitch(host, port)',host, port, domoticzId, value, time)
end

-- get On Off Status
function domoticzGetSwitchStatus(host, port, domoticzId)
 local time, status

--  time = os.microtime()
--  log('domoticzGetSwitchStatus(host, port, domoticzId)',host, port, domoticzId)

 status = domoticzStatus(host,port,domoticzId)
 result =  (status.result[1].Status == "On")
 
--  time = os.microtime() - time
--  log('domoticzGetSwitchStatus(host, port, domoticzId)',host, port, domoticzId, result, time)
 return result
end

-- send command to domoticz
function domoticzCmd(host, port, domoticzId, domoticzCmd, cmdParam)
 local http, request,r, c, h

--  time = os.microtime()
--  log('domoticzCmd', host, port, domoticzId, domoticzCmd, cmdParam)

    -- load the http module
    local http = require("socket.http")
 request = "http://" .. host .. ":" .. port .. "/json.htm?type=command&param=" .. domoticzCmd .. "&idx=" .. domoticzId .. "&switchcmd=" .. cmdParam
--  log('domoticzCmd', host, port, domoticzId, domoticzCmd, cmdParam, request)

    -- connect to server
 r, c, h = http.request (request)

--  time = os.microtime() - time
--  log('domoticzCmd', host, port, domoticzId, domoticzCmd, cmdParam, r, c, h, time)
end

-- retrieve a status from domoticz
function domoticzStatus(host, port, domoticzId)
 local http, request,r, c, h

--  time = os.microtime()
--  log('domoticzStatus', host, port, domoticzId)

 -- build the http request
    local http = require("socket.http")
 request = "http://" .. host .. ":" .. port .. "/json.htm?type=devices&rid=" .. domoticzId--
--  log('domoticzStatus', host, port, domoticzId, request)
 -- execute the http request
 r, c, h = http.request (request)

--  time = os.microtime() - time
--  log('domoticzStatus', host, port, domoticzId, r, c, h, time)
 -- decode the json object
 local json = require("json")  
 local statusobject = json.pdecode(r)
 return statusobject
end

here a trigger to switch a device based a knx event
Code:
SCRIPT = 'user.library'
lib = require(SCRIPT)
if not lib then alert('Event ' .. event .. ' not handled: script ' .. SCRIPT .. ' missing') os.sleep(60) return end

-- object mapped to this event must have its data type set
value = event.getvalue()

-- toggle on/off
domoticzSwitch(DOMOTICZ_IP, DOMOTICZ_PORT, DOMOTICZ_ID_LIVINGROOM_VENTILATOR, value)

-- only write on changed data
writeKNX(KNX_GROUP_LIVINGROOM_VENTILATOR_ON_OFF_STATUS, value, false, dt.bool)

finally my deamon script to ensure that the knx status is correctly set even if I use domoticz or my zwave remote

Code:
SCRIPT = 'user.library'
lib = require(SCRIPT)
if not lib then alert('Event ' .. event .. ' not handled: script ' .. SCRIPT .. ' missing') os.sleep(60) return end


-----------------------------------
-- determine the domticz status
-----------------------------------
-- basement
bStatus = domoticzGetSwitchStatus(DOMOTICZ_IP, DOMOTICZ_PORT, DOMOTICZ_ID_BASEMENT_COMPRESSOR)
writeKNX(KNX_GROUP_LIVINGROOM_COMPRESSOR_ON_OFF, bStatus, false, dt.bool)

-- livingroom
-- reading light
bStatus = domoticzGetSwitchStatus(DOMOTICZ_IP, DOMOTICZ_PORT, DOMOTICZ_ID_LIVINGROOM_READING_LIGHT)
-- only write on changed data
--writeKNX(KNX_GROUP_LIVINGROOM_READING_LIGHT_ON_OFF, bStatus, false, dt.bool)

-- ventilator
bStatus = domoticzGetSwitchStatus(DOMOTICZ_IP, DOMOTICZ_PORT, DOMOTICZ_ID_LIVINGROOM_VENTILATOR)
-- only write on changed data
--writeKNX(KNX_GROUP_LIVINGROOM_VENTILATOR_ON_OFF, value, false, dt.bool)

I am sure code could be cleaner but I am still learning lua

Enjoy Smile

Next step let a mobotix cam trigger the opening/closing of doors, but manage the opening hours per user through logic machine
Reply
#30
This line will do nothing because if require fails it produces an error and script execution stops.

Code:
if not lib then alert('Event ' .. event .. ' not handled: script ' .. SCRIPT .. ' missing') os.sleep(60) return end
Reply
#31
(26.11.2015, 07:02)admin Wrote: This line will do nothing because if require fails it produces an error and script execution stops.

Code:
if not lib then alert('Event ' .. event .. ' not handled: script ' .. SCRIPT .. ' missing') os.sleep(60) return end

ok thanks
Reply
#32
(11.11.2015, 07:07)admin Wrote: Probably by the end of the year. Which Bluetooth devices are you planning to connect?

And? can we get this as a christmas present? Smile
Reply
#33
Is there already more information? when can we expect it and use this nice feature?
Reply
#34
Hello

Any info regarding the new firmware?

When can we expect it?

Thanks
Nicky
Reply
#35
it is planned for FEB 2016.
Sorry for delay.
Reply
#36
(19.01.2016, 09:00)edgars Wrote: it is planned for FEB 2016.
Sorry for delay.

is the new firmware planned for feb 2016 or the zwave support, or both Smile ?
Reply
#37
ZWave is planned to come on FEB.
New firmware (at least beta version) is planned for JAN Smile
Reply
#38
Thanks for the update

As you notice we look forward to it :-)
Reply
#39
Some screenshots while waiting for the final release of ZWave app for LogicMachine Wink

Attached Files Thumbnail(s)
       
Reply
#40
(29.01.2016, 11:49)edgars Wrote: Some screenshots while waiting for the final release of ZWave app for LogicMachine Wink

i can't wait Smile
Reply


Forum Jump: