MySensors - Gateway to Domoticz

Moderator: leecollings

alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: MySensors - Gateway to Domoticz

Post by alexsh1 »

gizmocuz wrote:No... not really

You can remove both nodes... does it come back twice?
Yes, it does come back. I have similar problem with the Serial GW (childs are duplicated).
User avatar
gizmocuz
Posts: 2352
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 »

Do you have 2 gateways ?
Quality outlives Quantity!
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: MySensors - Gateway to Domoticz

Post by alexsh1 »

gizmocuz wrote:Do you have 2 gateways ?
Yes, I have two, but only one is working at all times - I have some spare hardware and experimenting a bit
Nodes and Childs are messed up
How do I manually assign a node Nr please?
darknico31
Posts: 10
Joined: Saturday 17 October 2015 10:01
Target OS: Linux
Domoticz version: 2.4347
Location: France
Contact:

Re: MySensors - Gateway to Domoticz

Post by darknico31 »

Hi,

Could it be the same problem I described here ?
http://www.domoticz.com/forum/viewtopic.php?f=6&t=8848
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: MySensors - Gateway to Domoticz

Post by alexsh1 »

darknico31 wrote:Hi,

Could it be the same problem I described here ?
http://www.domoticz.com/forum/viewtopic.php?f=6&t=8848

Yes, it is the same problem. I have Childs duplicated as well.
User avatar
gizmocuz
Posts: 2352
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 »

It is not really a duplicate, it is displayed double in the node list.
the latest beta should now solve this (i forgot to query twice with the hardware id included, so on both hardware/gateways, you had node 10)
Quality outlives Quantity!
darknico31
Posts: 10
Joined: Saturday 17 October 2015 10:01
Target OS: Linux
Domoticz version: 2.4347
Location: France
Contact:

Re: MySensors - Gateway to Domoticz

Post by darknico31 »

If you refer to this commit "MySensors better support for multiple gateways".

I only have one gateway and I have the "duplication" problem.

I will test to recompile tomorrow and test if anything change.
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: MySensors - Gateway to Domoticz

Post by alexsh1 »

gizmocuz wrote:It is not really a duplicate, it is displayed double in the node list.
the latest beta should now solve this (i forgot to query twice with the hardware id included, so on both hardware/gateways, you had node 10)
I still have the same issue in v.3586
User avatar
gizmocuz
Posts: 2352
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 »

Hmmmm....

I send you a PM

the function that adds a new node to the database is

MySensorsBase::InsertNode

and is called when the node can not be found

the nodes are loaded at startup with

MySensorsBase::LoadDevicesFromDatabase

while typing, i see this is only done for the serial gateway!

Please check beta #3587
Quality outlives Quantity!
darknico31
Posts: 10
Joined: Saturday 17 October 2015 10:01
Target OS: Linux
Domoticz version: 2.4347
Location: France
Contact:

Re: MySensors - Gateway to Domoticz

Post by darknico31 »

It's ok for me.
2.3589 / 371d507
Thanks Gizmocuz
alexsh1
Posts: 169
Joined: Wednesday 30 September 2015 11:50
Target OS: Raspberry Pi / ODroid
Domoticz version: v3.8975
Location: United Kingdom
Contact:

Re: MySensors - Gateway to Domoticz

Post by alexsh1 »

Thanks for your help.
Fixed for the ethernet gateway now :D

gizmocuz wrote:Hmmmm....

I send you a PM

the function that adds a new node to the database is

MySensorsBase::InsertNode

and is called when the node can not be found

the nodes are loaded at startup with

MySensorsBase::LoadDevicesFromDatabase

while typing, i see this is only done for the serial gateway!

Please check beta #3587
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: MySensors - Gateway to Domoticz

Post by fets »

Hello,
I would to know a few things on domoiticz :
1- is it possibile to check (log) every incoming/outgoing message to/from gateway. Cause I have a strange behavior with a multisensor node and want to be sure everything sent is received.

2- is it possible using a dummy sensor or a lua script to directly send mysensor formatted message to the gateway ?
User avatar
gizmocuz
Posts: 2352
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 »

1) if you compile from source and set breakpoints (in debug mode a lot more is logged), and to debug your nodes, just plug them in and open a serial monitor (like in the ardiono ide)
2) no, but there is a new V_CUSTOM type, that you can use to request sensor values of domoticz, and send them to the node
Quality outlives Quantity!
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: MySensors - Gateway to Domoticz

Post by fets »

Thanks for your answer
gizmocuz wrote:1) if you compile from source and set breakpoints (in debug mode a lot more is logged) ! I using domoticz on raspberry pi 2, how do I debug ?
, and to debug your nodes, just plug them in and open a serial monitor (like in the ardiono ide) : I already used serial monitor to debug my node. But I have a multisensor node among with 2 S_DOOR sub sensor : the state is sent from sensor to gateway but I don't see anything on domoticz : contact never changed state and nothing in the log.

2) no, but there is a new V_CUSTOM type, that you can use to request sensor values of domoticz, and send them to the node I saw your topic on this new type, but for now I am still running mysensors 1.5 API
User avatar
gizmocuz
Posts: 2352
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 »

You could also compile under windows with visual studio, and plug in the gateway in a usb port
Quality outlives Quantity!
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: MySensors - Gateway to Domoticz

Post by fets »

Difficult for the moment to get a windows machine.
Do you know if somebody report issues with multisensensor node (in my case 8 : S_TEMP + S_HUM + 2 * S_LIGHT + 2 * S_LOCK + 2 * S_DOOR) ?
User avatar
gizmocuz
Posts: 2352
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 »

i have some multisensors made (temp+hum+baro) without problems
Quality outlives Quantity!
fets
Posts: 21
Joined: Monday 21 September 2015 20:10
Target OS: Raspberry Pi / ODroid
Domoticz version: 2.2969
Contact:

Re: MySensors - Gateway to Domoticz

Post by fets »

I experinced several strange behaviour :

S_LIGHT actuator receive type 36 wich is V_LOCK_STATUS. This is normally associated with my other sensors S_LOCK. So in my node I don't check anymore the incoming type for those actuator.

S_DOOR sensor send notification but are not managed by domoticz 2.3563. But I'm pretty sure I saw it working with a previous version.
User avatar
gizmocuz
Posts: 2352
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 »

fets wrote:I experinced several strange behaviour :

S_LIGHT actuator receive type 36 wich is V_LOCK_STATUS. This is normally associated with my other sensors S_LOCK. So in my node I don't check anymore the incoming type for those actuator.

S_DOOR sensor send notification but are not managed by domoticz 2.3563. But I'm pretty sure I saw it working with a previous version.
i did some changes indeed, but it should work, this is whats changed:

Code: Select all

				std::string lState = (light_command == light2_sOn) ? "1" : "0";
				if (pChild->presType == S_LOCK)
				{
					//Door lock
					return SendNodeSetCommand(node_id, child_sensor_id, MT_Set, V_LOCK_STATUS, lState, pChild->useAck);
				}
				else if (pChild->presType == S_SCENE_CONTROLLER) 
				{
					//Scene Controller
					return SendNodeSetCommand(node_id, child_sensor_id, MT_Set, (light_command == light2_sOn) ? V_SCENE_ON : V_SCENE_OFF, lState, pChild->useAck);
				}
				else
				{
					//normal
					return SendNodeSetCommand(node_id, child_sensor_id, MT_Set, V_STATUS, lState, pChild->useAck);
				}
could you check in the hardware setup of mysensors if the presentation types are correct for your nodes?
Quality outlives Quantity!
User avatar
gizmocuz
Posts: 2352
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 »

Okey, tested....

could you also test with the mysensors example sketch called 'MockMySensors' ?
Quality outlives Quantity!
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests