MySensors - Gateway to Domoticz

Moderator: leecollings

User avatar
blackdog65
Posts: 311
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Norfolk, UK
Contact:

Re: MySensors - Gateway to Domoticz

Post by blackdog65 »

Does anyone use MYSController?

I have it running under Wine on Linux Mint (Domoticz master) with no problems.

I have a serial gateway that will report to Domoticz on my Mint PC. This works fine and MSController connects fine. When I tried to move my gateway to a remote installation of Domoticz on a Raspberry Pi (same network) MSController cannot see it if I try to connect by TCP. I hope it's just something silly like port no. or something, but any ideas?
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
User avatar
blackdog65
Posts: 311
Joined: Tuesday 17 June 2014 18:25
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Norfolk, UK
Contact:

Re: MySensors - Gateway to Domoticz

Post by blackdog65 »

Ah... a little help from the developer... install ser2net and edit the conf file to pipe it across :ugeek: it was actually a lot easier than it sounds and now I can debug MySensors from any pc on my network 8-)
Big thanks to Tekka :D
CubieTruck Master
RasPi slaves
Aeon Labs Z-Stick, multi sensor
Fibaro Dimmers, relays, Universal sensors
EQ3 MAX!
TKB Sockets
RFXCOM
LightwaveRF sockets, switches, relays, doorbell
MySensors
ESPEasy ESP8266-12E
User avatar
bjornhallberg
Posts: 7
Joined: Thursday 29 May 2014 7:37
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta?
Location: Sweden
Contact:

Re: MySensors - Gateway to Domoticz

Post by bjornhallberg »

Any way to get the battery readings to work? I only have the voltage divider (and code) on some of my sensor nodes but it seems the data is getting mixed up when read by Domoticz? I.e. sensors are getting the battery readings of other sensors. Sensors that never report a value get a value anyway.

Fantastic to finally have MySensors and Domoticz working together btw!
Hendrik
Posts: 18
Joined: Saturday 04 January 2014 20:20
Target OS: Raspberry Pi / ODroid
Domoticz version:
Location: Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by Hendrik »

deennoo wrote:Hello,

i try to get Pulsesensor for water and power, using the usb gateway

got this log on domoticz :

2015-02-15 21:55:57.848 MySensors: Node: 69, Sketch Name: Water Meter

but nothing gones on unused device (of course accpet new is active).

I made a temp/hum sensor who works very well.

Any one got an idea ?
I had the same, its in the log, but no new device
do you have this working yet??
CubieTruck with Domoticz
RfxTrx 433Mhz Usb, Rfx Sensor, Z-Wave
Slave Raspberry Pi with Domoticz, Piface, P1 usb
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

Maybe a dumb question, but how do i get the MySensor stuff added in Domoticz?

I have a working setup (gateway + 1 node) lying on my desk. I can read it fine with 'MYSController' in Windows (nice tool btw!) but now want to add it to Domoticz.
Do i add it under Setup > Hardware as a new device or so? I don't see any 'MySensors' device there (v2.2284 on my NAS).
I am not active on this forum anymore.
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

Time to update to the beta ?:)
Quality outlives Quantity!
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

Thanks, already thought that. Not sure if i want to do that on my NAS as i prefer a stable and reliable system.

I have a Pi lying around, will try it there, thanks. I can then add the MySensors stuff like i said? Under setup > hardware ?
I am not active on this forum anymore.
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

Yes thats the way
Quality outlives Quantity!
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

Got it working :)
Quite a nice project, MySensors.

Very easy to build some sensors!

But a weird thing, i have 2x DS18B20 connected to my node, But only one of them is seen by Domoticz (only one device created)....
If i read the gateway with the MYSController i can see that two temperatures are updated every time.

So some translation MySensors <> Domoticz needs to be worked on.
I am not active on this forum anymore.
BluesBro
Posts: 54
Joined: Tuesday 13 August 2013 19:55
Target OS: -
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post by BluesBro »

Built the bh1750 lux sensor. Its registered in domoticz log as lux (unkown). Theres is no device listed in devicelist either.
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

If the log says something like

(MySensors) Lux (Unknown)

this means, it is added internally, and you should be able to find it in the devices tab.

If it is not there, make sure 'accept new hardware' is enabled in the settings
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

ThinkPad wrote:Got it working :)
Quite a nice project, MySensors.

Very easy to build some sensors!

But a weird thing, i have 2x DS18B20 connected to my node, But only one of them is seen by Domoticz (only one device created)....
If i read the gateway with the MYSController i can see that two temperatures are updated every time.

So some translation MySensors <> Domoticz needs to be worked on.
Should be fixed in the latest beta
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

Hendrik wrote:
deennoo wrote:Hello,

i try to get Pulsesensor for water and power, using the usb gateway

got this log on domoticz :

2015-02-15 21:55:57.848 MySensors: Node: 69, Sketch Name: Water Meter

but nothing gones on unused device (of course accpet new is active).

I made a temp/hum sensor who works very well.

Any one got an idea ?
I had the same, its in the log, but no new device
do you have this working yet??
This type of sensor is not yet supported yet.

Could you PM me your sketch ?
Quality outlives Quantity!
BluesBro
Posts: 54
Joined: Tuesday 13 August 2013 19:55
Target OS: -
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post by BluesBro »

gizmocuz wrote:If the log says something like

(MySensors) Lux (Unknown)

this means, it is added internally, and you should be able to find it in the devices tab.

If it is not there, make sure 'accept new hardware' is enabled in the settings

I got it in the dveice tab no, but it does not update Lux value. Its static on 1000 Lux
BluesBro
Posts: 54
Joined: Tuesday 13 August 2013 19:55
Target OS: -
Domoticz version:
Contact:

Re: MySensors - Gateway to Domoticz

Post by BluesBro »

I found the error.
Domoticz add 1 zero on every reading. 10 lux in the arduino log is 100 in domoticz. And domoticz readings dont go higher than 1000 lux.
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

gizmocuz wrote:
ThinkPad wrote:Got it working :)
Quite a nice project, MySensors.

Very easy to build some sensors!

But a weird thing, i have 2x DS18B20 connected to my node, But only one of them is seen by Domoticz (only one device created)....
If i read the gateway with the MYSController i can see that two temperatures are updated every time.

So some translation MySensors <> Domoticz needs to be worked on.
Should be fixed in the latest beta
I have installed v2.2329 on the Pi, but unfortunately still only one temperaturesensor is shown under devices and in the log.
I am not active on this forum anymore.
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

ThinkPad wrote:
gizmocuz wrote:
ThinkPad wrote:Got it working :)
Quite a nice project, MySensors.

Very easy to build some sensors!

But a weird thing, i have 2x DS18B20 connected to my node, But only one of them is seen by Domoticz (only one device created)....
If i read the gateway with the MYSController i can see that two temperatures are updated every time.

So some translation MySensors <> Domoticz needs to be worked on.
Should be fixed in the latest beta
I have installed v2.2329 on the Pi, but unfortunately still only one temperaturesensor is shown under devices and in the log.
Please try with the below sketch:

Code: Select all

#include <SPI.h>
#include <MySensor.h>  

#define TEMP1_CHILD_ID 0
#define TEMP2_CHILD_ID 1
#define TEMP3_CHILD_ID 2

#define SLEEP_TIME 30000

#define SN "Multi temp test"
#define SV "1.1"

MySensor gw;

MyMessage temp1Msg(TEMP1_CHILD_ID, V_TEMP);
MyMessage temp2Msg(TEMP2_CHILD_ID, V_TEMP);
MyMessage temp3Msg(TEMP3_CHILD_ID, V_TEMP);

void setup()  
{ 
  gw.begin(NULL, AUTO, false);

  // Send the Sketch Version Information to the Gateway
  gw.sendSketchInfo(SN, SV);

  gw.present(TEMP1_CHILD_ID, S_TEMP);
  gw.present(TEMP2_CHILD_ID, S_TEMP);
  gw.present(TEMP3_CHILD_ID, S_TEMP);
}

void loop()      
{
  // Process incoming messages
  gw.process();

  float temperature_1 = 19.5;
  float temperature_2 = 23.4;
  float temperature_3 = 4.8;
  
  Serial.print("Temperature_1 = ");
  Serial.println(temperature_1);
  Serial.print("Temperature_2 = ");
  Serial.println(temperature_2);
  Serial.print("Temperature_3 = ");
  Serial.println(temperature_3);

 gw.send(temp1Msg.set(temperature_1,2));
 gw.send(temp2Msg.set(temperature_2,2));
 gw.send(temp3Msg.set(temperature_3,2));
  
  //Sleep
  gw.sleep(SLEEP_TIME);
}

Quality outlives Quantity!
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

I'm sorry, i responded too fast i think. The second temperature sensor just popped up under devices :) Just had to wait some longer i think?
Nice :)

Now on to the watermeter sketch: http://www.mysensors.org/build/pulse_water , been wanting that for a long time. Can i help in some way? Providing some testdata or so?
I am not active on this forum anymore.
User avatar
gizmocuz
Posts: 2541
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: MySensors - Gateway to Domoticz

Post by gizmocuz »

ThinkPad wrote:I'm sorry, i responded too fast i think. The second temperature sensor just popped up under devices :) Just had to wait some longer i think?
Nice :)

Now on to the watermeter sketch: http://www.mysensors.org/build/pulse_water , been wanting that for a long time. Can i help in some way? Providing some testdata or so?
Working on it as we speak....

The pulsemeter (water) example on the mysensors website has a serious bug!
If the requested value (VAR_1) is not received from the main software (domoticz in my case), then it will send requests as fast as it can, endlessly

Anyway, i am trying to create a new sample, and implementation... can take some time
Quality outlives Quantity!
ThinkPad
Posts: 890
Joined: Tuesday 30 September 2014 8:49
Target OS: Linux
Domoticz version: beta
Location: The Netherlands
Contact:

Re: MySensors - Gateway to Domoticz

Post by ThinkPad »

I think i am already seeing that. Connected 'MYSController' to the Ethernet gateway i made, and i see the application constantly scrolling, only thing it displays is:

RECV REQ VAR1

Nice, looking forward to it! Let us know if we can help in any way :)
I am not active on this forum anymore.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest