Page 1 of 3

new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 13 May 2015 8:21
by gizmocuz
Since version #2434, Domoticz now supports the KMTronic USB and TCP(Web) relay boards.

They are not expensive, and the hardware devices look very professional

Supported:

USB:
1,2,4 and 8 channels
* needs external 12 Volt power supply with more then 1 channel

TCP(Web)
2 and 8 channels
* needs external 12 Volt power supply

More information is available at:
http://kmtronic.com

Re: new: KMTronic USB/TCP(Web) support

Posted: Wednesday 13 May 2015 23:17
by blackdog65
A quick Fleabay search turned up these too http://www.ebay.co.uk/itm/KMTronic-USB- ... 3f45f29380
Will they run from a rfxtrx? They come with their own little 433mhz transmitter... it all looks promising :)

Re: new: KMTronic USB/TCP(Web) support

Posted: Wednesday 20 May 2015 8:58
by gizmocuz
blackdog65 wrote:A quick Fleabay search turned up these too http://www.ebay.co.uk/itm/KMTronic-USB- ... 3f45f29380
Will they run from a rfxtrx? They come with their own little 433mhz transmitter... it all looks promising :)
Working on this one, i am having issues opening the COM port... still have to do some testing under linux

Once implemented i will send them to RFXCom, maybe they are able/willing to implement it.
They are using a C1101 433Mhz tranciever from Texas Instruments

Re: new: KMTronic USB/TCP(Web) support

Posted: Wednesday 20 May 2015 8:59
by gizmocuz
Now also implemented the RS485 (USB->485) version.
With this you can control up to 48 relays from one converter unit (and 6 devices)

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 20 May 2015 13:16
by blackdog65
Excellent! These look to a very useful set of tools! :D

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Saturday 30 May 2015 21:17
by El Titi
Hello,

I'm just update to v2.2493 and i add my Kmtronic web relay in Domoticz
Before I managed it with lua scripts, php and virtual switches.
My Relay board is used to control my electric heaters.

But the operation is not the one expected :?
If I send the OFF command with JSON, it's toogle to ON if the relay is already OFF
If the relay is ON, the JSON command ON toogle it to OFF

Every Json command (On or Off) toogle the realy...

El Titi

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Thursday 12 November 2015 14:23
by hasan
Hi,
I`m using USB > RF433MHz > 8 Channel Relay Board http://kmtronic.com/usb-rf433mhz-8-chan ... board.html it is working, but if there is no activity for some time, command is not done and I have to send command twice. It looks that there is so "stanby" mode, if device is not used. Do you have any idea how to solved it?

Thanks

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Monday 04 April 2016 15:02
by pavo325
Hi,
I'm also having this same issue, it seems to go to sleep after a while, would using the data time out be of any use for this issue or is that for some thing else, i'm also having a problem using the on off delay as they don't seem to work on the kmtronic stuff, works fine on the lightwaverf stuff.

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Tuesday 05 April 2016 14:55
by RATA1
Hello,
Any plans to support the KMTronic LAN DS18B20 WEB Temperature Monitor too?
Thanks

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 13 April 2016 18:29
by RATA1
RATA1 wrote:Hello,
Any plans to support the KMTronic LAN DS18B20 WEB Temperature Monitor too?
Thanks
I have written a little LUA script to read the temperature values and put them into virtual temperature sensors now if it is of some use to someone.
It is my first attempt at LUA so let me know if you think it can be modified/improved on.

Runs several times at once (from what I see in the log file) and I don't know why. If you do let me know.

Thanks

Code: Select all

------------------------------------------------------------------------------
--
--
-- Domoticz lua script to convert XML output from KMTronic DS1820 LAN module
-- Reads the temperature based on the unique ID of the sensor and passes it 
-- back to a virtual temperature sensor(s)
-- sensors in Domoticz
--
------------------------------------------------------------------------------
-- Rob Allen 12/04/2016
------------------------------------------------------------------------------

commandArray = {} 
 


function XML_Capture(cmd,flatten)
   local f = assert(io.popen(cmd, 'r'))
   local s = assert(f:read('*a'))
   f:close()
   if flatten  then 
      s = string.gsub(s, '^%s+', '')
      s = string.gsub(s, '%s+$', '')
      s = string.gsub(s, '[\n\r]+', ' ')
   end
   return s
end

--set to true to print to log file.
debug = false

--define the idx of your temperature sensors - i.e. what you have called your sensors and their IDX numbers 

HWTemp_Flow = 108
HWTemp_Return = 109
HWTemp_Tank_Top = 110
HWTemp_Tank_Bottom = 111

--define temperature sensor UID's - i.e. the DS1820 serial number 
--up to 4 per DS1820 LAN interface

sensorID_1 = "28006D2307000061"
sensorID_2 = "28AC0924070000C8"
sensorID_3 = "28FA1B24070000AB"
sensorID_4 = "28B30924070000B7"


-- Define your device IP@

Device_IP = "172.16.227.201"

if debug == true then
        print("Reading values from: 'http://"..Device_IP.."/status.xml'")
end

-- Read the XML data from the device 

XML_string=XML_Capture("curl -s 'http://"..Device_IP.."/status.xml'",1)

 
valid = string.find(XML_string, "<response>")    -- check we are looking in the right place

    if debug == true then
        print(XML_string)
    end
    
    if valid == nil then 
        print ("Bad XML status read - temperatures NOT updated")
    else
  
--Find the first sensor based on its UID
    
    i = string.find(XML_string,sensorID_1)          -- find the unique ID of the sensor
    p = string.find(XML_string,"<temp>",i)          --look for the next occurrence of <temp> after ID
   
    HWTemp_Flow_Temperature=string.sub(XML_string,p+6,p+10)  --temperature is the 5 characters after <temp> - i.e. 6-10 
     
    commandArray[1] = {['UpdateDevice'] = HWTemp_Flow.."|0|"..HWTemp_Flow_Temperature} --send updated values to Domoticz
       
        if debug == true then
            print("temp returned = ".."'"..HWTemp_Flow_Temperature.."'")
        end
       
        
        
-- Second sensor based on its UID      
      
    i = string.find(XML_string, sensorID_2)         -- find the next unique ID of the sensor
    p = string.find(XML_string,"<temp>",i)          --look for the next occurrence of <temp> after ID
    
    HWTemp_Return_Temperature=string.sub(XML_string,p+6,p+10) --temperature is the 5 characters after <temp> - i.e. 6-10
   
    commandArray[2] = { ['UpdateDevice'] = HWTemp_Return.."|0|"..HWTemp_Return_Temperature } --send updated values to Domoticz

        if debug == true then
            print("temp returned = ".."'"..HWTemp_Return_Temperature.."'")
        end
      
-- Third sensor based on its UID


    i = string.find(XML_string, sensorID_3)         -- find the next unique ID of the sensor
    p = string.find(XML_string,"<temp>",i)          --look for the next occurrence of <temp> after ID
   
    
    HWTemp_Tank_Top_Temperature=string.sub(XML_string,p+6,p+10) --temperature is the 5 characters after <temp> - i.e. 6-10
      
    commandArray[3] = {['UpdateDevice'] = HWTemp_Tank_Top.."|0|"..HWTemp_Tank_Top_Temperature } --send updated values to Domoticz

        if debug == true then
            print("temp returned = ".."'"..HWTemp_Tank_Top_Temperature.."'")
        end

        
-- Fourth sensor based on its UID

    i = string.find(XML_string, sensorID_4)         -- find the next unique ID of the sensor
    p = string.find(XML_string,"<temp>",i)          --look for the next occurrence of <temp> after ID
    
    HWTemp_Tank_Bottom_Temperature=string.sub(XML_string,p+6,p+10) --temperature is the 5 characters after <temp> - i.e. 6-10
    
    commandArray[4] = { ['UpdateDevice'] = HWTemp_Tank_Bottom.."|0|"..HWTemp_Tank_Bottom_Temperature } --send updated values to Domoticz

        if debug == true then
            print("temp returned = ".."'"..HWTemp_Tank_Bottom_Temperature.."'")
        end
      

    end  
     


  
return commandArray

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Tuesday 19 April 2016 14:37
by hasan
Hi Rata,

thanks for script, I'l try during week and let you know ;)

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Saturday 30 April 2016 7:31
by Mazzokun
Hi all,
I have RS485 (USB->485) 16 relay . The software recognize them and I can manual on/off the single light, but timers, group on/off, blocky etc. doesn't work anymore.
Tried with raspberry pi or mac stable/beta but doesn't work anymore.
Is there some bug for RS485 (USB->485) ?? :cry:
Thanks

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Saturday 09 July 2016 8:35
by jono
Morning im new to Domoticz

i have a KMtronic Lan Web 8ch relay connected to my Broadband router domoticz is operated on raspberry pi 2

i have set it up in hardware and i can see the relays in switches

but the problem is when i switch the switch the relays dont operate ?? any ideas

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Tuesday 12 July 2016 20:21
by paulpatta86
Hi.
sorry for my english. i am italian.
i have kmtronic temperature.

I created the script in the events of domoticz
replaced ip, id and name of sensor
but script rata1 don't work.
please help me.
thi is my xml

<response>
<sensor>
<id>28FF864615150226</id>
<name>cantina</name>
<temp>21.43</temp>
</sensor>
<sensor>
<id>28FF2A085415025B</id>
<name>esterna</name>
<temp>19.81</temp>
</sensor>
<sensor>
<id>----------------</id>
<name> </name>
<temp>---</temp>
</sensor><sensor>
<id>----------------</id>
<name> </name>
<temp>---</temp>
</sensor>
<version>
<model>KMtronic DS1820 Temperature Monitor</model>
<ver>1.0</ver>
</version>
</response>

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Tuesday 02 August 2016 8:15
by miroslavpetrov
Mazzokun wrote:Hi all,
I have RS485 (USB->485) 16 relay . The software recognize them and I can manual on/off the single light, but timers, group on/off, blocky etc. doesn't work anymore.
Tried with raspberry pi or mac stable/beta but doesn't work anymore.
Is there some bug for RS485 (USB->485) ?? :cry:
Thanks
Have you managed to fix this issue? I am currently looking at these boards to use in a project.

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 03 August 2016 13:34
by Mazzokun
miroslavpetrov wrote:
Mazzokun wrote:Hi all,
I have RS485 (USB->485) 16 relay . The software recognize them and I can manual on/off the single light, but timers, group on/off, blocky etc. doesn't work anymore.
Tried with raspberry pi or mac stable/beta but doesn't work anymore.
Is there some bug for RS485 (USB->485) ?? :cry:
Thanks
Have you managed to fix this issue? I am currently looking at these boards to use in a project.

in the beta release it works without any issue :D

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Thursday 18 August 2016 13:09
by miroslavpetrov
I received the RS485 boards and tested them using the latest Raspberry image and as Mazzokun said groups, scenes and blockly doesn't work with the boards. However I wrote simple bash scripts that send serial commands to the boards which fixed the problem.

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Tuesday 23 August 2016 16:40
by ceetn
Is the RS485 board an easy and suitable solution to control the lights in my garden? How easy is it to get this working on a raspberry pi with domoticz? Can somebody show me what the config looks like for the board?

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 07 September 2016 7:08
by miroslavpetrov
ceetn wrote:Is the RS485 board an easy and suitable solution to control the lights in my garden? How easy is it to get this working on a raspberry pi with domoticz? Can somebody show me what the config looks like for the board?
Hi,

In the current stable version of domoticz, when you add the RS485 board in hardware, blockly, timers and some other things stop working...However, if you write simple bash scripts and assign them to a virtual switch, everything is fine. And for ease of use, they are plug ang play. You get a USB ->RS485 converter which is recognized automatically from the Rpi, for windows you have to install drivers.

Re: new: KMTronic USB/485/TCP(Web) support

Posted: Wednesday 07 September 2016 9:11
by gizmocuz
@miroslavpetrov, dont know why this is happening to you, but it does not make any sense, as these are out-side processes, nothing todo with any hardware.
So this should not happen
And you should also try the beta version then