MySensors - Gateway to Domoticz
Moderator: leecollings
-
- Posts: 12
- Joined: Sunday 11 January 2015 16:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: MySensors - Gateway to Domoticz
Thx for the implementation! I was all excited when i just learned about Domoticz, until i saw that there was no support for mysensors (i was still excited, but just a little bit less ). But now there is!
Just want to say: Thanks for all the hard work.
Just want to say: Thanks for all the hard work.
Re: MySensors - Gateway to Domoticz
Howis this connected to domoticz? I'm using raspberry pi.
Do I connect the arduino nano directly to the rpi via USB or do i hardware connect the NRF24L01+ directly to the IO-ports on the rpi?
Do I connect the arduino nano directly to the rpi via USB or do i hardware connect the NRF24L01+ directly to the IO-ports on the rpi?
-
- Posts: 49
- Joined: Monday 07 October 2013 10:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: MySensors - Gateway to Domoticz
For the connection question : Connection is to the Arduino via a serial USB interface.
As for RFXcom devices, it is convenient to make a persistent device name that Domoticz can read and write also for the MySensors gateway connection. Use the lsusb command to display the vendor and product id, then use these as in the following udev rule example.
Here is my /etc/udev/rules.d/71-mysensors.rules. Domoticz will find the Mysensors serial gateway via ttyUSB31
As for RFXcom devices, it is convenient to make a persistent device name that Domoticz can read and write also for the MySensors gateway connection. Use the lsusb command to display the vendor and product id, then use these as in the following udev rule example.
Here is my /etc/udev/rules.d/71-mysensors.rules. Domoticz will find the Mysensors serial gateway via ttyUSB31
Code: Select all
#
# idVendor 0x1a86 QinHeng Electronics
# idProduct 0x7523 HL-340 USB-Serial adapter
#
SUBSYSTEM=="tty", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", SYMLINK+="ttyUSB31", MODE="0666", SYMLINK+="mysensors"
#
# Tests:
# udevadm info --query=all --name ttyUSB0
# udevadm test $(udevadm info --query path --name ttyUSB0 )
#
-
- Posts: 12
- Joined: Sunday 11 January 2015 16:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Belgium
- Contact:
Re: MySensors - Gateway to Domoticz
gizmocuz,are you planning to implement the Ethernet Gateway?
- gizmocuz
- Posts: 2350
- 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
If this works the same as connecting the usb via ser2net, then this will be included in the next version.
(Tested here, and working)
But it could take a few days because currently domoticz is undergoing some changes that needs to be tested good
(Tested here, and working)
But it could take a few days because currently domoticz is undergoing some changes that needs to be tested good
Quality outlives Quantity!
-
- Posts: 36
- Joined: Tuesday 23 December 2014 16:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: MySensors - Gateway to Domoticz
Have added a lux sensor. It's working if the value is < 1000
If the value is greater then 1000 it's displayed as 1000.
This is a copy of the serial gateway output.
Another issue is all mysensors values are (mostly) listed under utilitys.
A barometer isn't listed under weather, while a mysensors temperature is listed under temperature.
If the value is greater then 1000 it's displayed as 1000.
This is a copy of the serial gateway output.
Code: Select all
0;0;3;0;9;read: 3-3-0 s=2,c=1,t=23,pt=3,l=2:3494
3;2;1;0;23;3494
A barometer isn't listed under weather, while a mysensors temperature is listed under temperature.
-
- Posts: 8
- Joined: Wednesday 04 February 2015 22:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: MySensors - Gateway to Domoticz
You just have to comment MySensorBase.cpp line 829 until 831 change to this and makertenklooster wrote:Have added a lux sensor. It's working if the value is < 1000
If the value is greater then 1000 it's displayed as 1000.
This is a copy of the serial gateway output.Another issue is all mysensors values are (mostly) listed under utilitys.Code: Select all
0;0;3;0;9;read: 3-3-0 s=2,c=1,t=23,pt=3,l=2:3494 3;2;1;0;23;3494
A barometer isn't listed under weather, while a mysensors temperature is listed under temperature.
Code: Select all
case V_LIGHT_LEVEL:
pSensor->floatValue = (float)atof(payload.c_str());
//convert percentage to 1000 scale
/*
pSensor->floatValue = (1000.0f / 100.0f)*pSensor->floatValue;
if (pSensor->floatValue > 1000.0f)
pSensor->floatValue = 1000.0f;
*/
bHaveValue = true;
break;
-
- Posts: 784
- Joined: Wednesday 10 December 2014 13:06
- Target OS: Linux
- Domoticz version: beta
- Location: Bordeaux France
- Contact:
Re: MySensors - Gateway to Domoticz
Hello,
i try to plug on my Sensor etherrnet gateway i just made.
i got this error on log :
2015-02-06 17:24:29 Error: MySensors: Error: Connection refused
2015-02-06 17:24:29 Error: TCP: Error: Connection refused
i try to plug on my Sensor etherrnet gateway i just made.
i got this error on log :
2015-02-06 17:24:29 Error: MySensors: Error: Connection refused
2015-02-06 17:24:29 Error: TCP: Error: Connection refused
Domoticz stable 3.5877 for real & Domoticz beta for test
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
Rfxtrxe / RFLink / Milight / Yeelight / Tasmota / MQTT / BLE / Zigate
http://domo-attitude.fr
-
- Posts: 8
- Joined: Wednesday 04 February 2015 22:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: MySensors - Gateway to Domoticz
another issue, Domoticz doesn't create device for relayactuator. it's only create device for relaywithbuttonactuator skecth. I think because RelayActuator only send sketch once while domoticz will add device after few reading.gizmocuz wrote:Will be fixed in next beta
-
- Posts: 36
- Joined: Tuesday 23 December 2014 16:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: MySensors - Gateway to Domoticz
Thanks, it did the trick!rachmat wrote: You just have to comment MySensorBase.cpp line 829 until 831 change to this and make
Another issue; the battery percentage of sensors is reported as 100% while the percentage being send is 93%
My guess is the battery level is being ignored / not implemented yet?
-
- Posts: 49
- Joined: Monday 07 October 2013 10:51
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: MySensors - Gateway to Domoticz
Mine has battery levels reported as sent (svn revision 2252)
-
- Posts: 36
- Joined: Tuesday 23 December 2014 16:20
- Target OS: Linux
- Domoticz version:
- Contact:
Re: MySensors - Gateway to Domoticz
Thanks for letting me know.hansrune wrote:Mine has battery levels reported as sent (svn revision 2252)
i've checked my code and it appears i used a sketch witch reported the battery level as a custom variable instead of
Code: Select all
gw.sendBatteryLevel(batteryPcnt);
Update: another small issue:
The only unit reporting battery states, is unit 4.
The battery percentage of unit 1 is also updated with unit 4's percentage.
It would be nice to be able to set notifications when a bettery level drops below xx, and show a graph of the battery level.
-
- Posts: 8
- Joined: Wednesday 04 February 2015 22:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: MySensors - Gateway to Domoticz
Issue: Dimmable Led also not showing off at devices list, it show on log only this
Code: Select all
2015-02-08 21:06:38 MySensors: Node: 33, Sketch Name: DimmableLED
2015-02-08 21:06:38 MySensors: Node: 33, Sketch Version: 1.1
2015-02-08 21:06:52 MySensors: Node: 33, Sketch Name: DimmableLED
2015-02-08 21:06:52 MySensors: Node: 33, Sketch Version: 1.1
2015-02-08 21:07:00 Hardware Monitor: Fetching data (System sensors)
2015-02-08 21:07:30 Hardware Monitor: Fetching data (System sensors)
-
- Posts: 8
- Joined: Wednesday 04 February 2015 22:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: MySensors - Gateway to Domoticz
Anyone here interesting to implement pushbullet notification? it's free and I think better than the others
Re: MySensors - Gateway to Domoticz
Is there a list of Domoticz supported devices or is every device on http://www.mysensors.org/build/ list supported?
- gizmocuz
- Posts: 2350
- 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
If possible could you keep talking in mySensors terms ?rtenklooster wrote:Thanks for letting me know.hansrune wrote:Mine has battery levels reported as sent (svn revision 2252)
i've checked my code and it appears i used a sketch witch reported the battery level as a custom variable instead ofUpdated my sketch and it's working fine now! ThanksCode: Select all
gw.sendBatteryLevel(batteryPcnt);
Update: another small issue:
The only unit reporting battery states, is unit 4.
The battery percentage of unit 1 is also updated with unit 4's percentage.
It would be nice to be able to set notifications when a bettery level drops below xx, and show a graph of the battery level.
Unit = Node_ID ? or Unit = Child_ID ?
What (i tried) todo, when you receive a battery status on for example Node_ID=2, then all sensors of this Node with ID=2 will get the battery status
Quality outlives Quantity!
- gizmocuz
- Posts: 2350
- 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
Most sensors are implemented, but i could not test them all.BluesBro wrote:Is there a list of Domoticz supported devices or is every device on http://www.mysensors.org/build/ list supported?
If you find a problem, let me know
Quality outlives Quantity!
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: MySensors - Gateway to Domoticz
Nice work!!gizmocuz wrote:Most sensors are implemented, but i could not test them all.
If you find a problem, let me know
I did already order hw for mysensors controlling venetian blinds tilt angle with servo actuator
A small question:
Does anyone know if there Is any good or what is the best concept of making rgb controller with arduino and mysensors? Or will it currently be just 3 sub-dimmers?
All I found from the wonderland of internet was these:
http://forum.mysensors.org/topic/816/se ... sensors/17
http://forum.pidome.org/viewtopic.php?id=58
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
-
- Posts: 8
- Joined: Wednesday 04 February 2015 22:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Location: Germany
- Contact:
Re: MySensors - Gateway to Domoticz
Basically it just 3 sub dimmer, then the controller will manipulate it. I tried with openhab and it works just fine with rgb color picker/slider. here is openhab rules and items https://github.com/openhab/openhab/wiki ... led-stripepj-r wrote:Nice work!!gizmocuz wrote:Most sensors are implemented, but i could not test them all.
If you find a problem, let me know
I did already order hw for mysensors controlling venetian blinds tilt angle with servo actuator
A small question:
Does anyone know if there Is any good or what is the best concept of making rgb controller with arduino and mysensors? Or will it currently be just 3 sub-dimmers?
All I found from the wonderland of internet was these:
http://forum.mysensors.org/topic/816/se ... sensors/17
http://forum.pidome.org/viewtopic.php?id=58
I don't know will it works on Domoticz or not. but until now Domoticz need to read node more than once before adding to devices while some some of Mysensors devices only send information once on startup
here is RGB Sketch :
Code: Select all
#define SN "RGB DIMMER"
#define SV "1.1"
#include <MySensor.h>
#include <SPI.h>
#include <MyConfig.h>
#define RED_PIN 3 // Arduino pin attached to MOSFET Gate pin
#define GREEN_PIN 5
#define BLUE_PIN 6
MySensor gw(9,10);
void setup()
{
Serial.println( SN );
gw.begin(incomingMessage, 31, true);
gw.sendSketchInfo(SN, SV);
gw.present(RED_PIN, S_DIMMER);
gw.present(GREEN_PIN, S_DIMMER);
gw.present(BLUE_PIN, S_DIMMER);
pinMode(RED_PIN, OUTPUT);
pinMode(GREEN_PIN, OUTPUT);
pinMode(BLUE_PIN, OUTPUT);
analogWrite(RED_PIN, 255 * gw.loadState(RED_PIN) / 100); //Get value from RAM and write to output
analogWrite(GREEN_PIN, 255 * gw.loadState(GREEN_PIN) / 100);
analogWrite(BLUE_PIN, 255 * gw.loadState(BLUE_PIN) / 100);
// Pull the gateway's current dim level - restore light level upon sendor node power-up
/*
gw.request(RED_PIN, V_DIMMER );
gw.request(GREEN_PIN, V_DIMMER );
gw.request(BLUE_PIN, V_DIMMER );
*/
}
void loop()
{
gw.process();
}
void incomingMessage(const MyMessage &message) {
if (message.type == V_DIMMER)
{
uint8_t incomingDimmerStatus = message.getByte();
// Change Dimmer level
analogWrite(message.sensor, 255 * incomingDimmerStatus / 100);
gw.saveState(message.sensor, message.getByte()); //Save value to RAM
// Write some debug info
//Serial.print("Incoming change for dimmer on pin:");
//Serial.print(message.header.childId);
//Serial.print(", New status: ");
//Serial.println(incomingDimmerStatus);
}
}
-
- Posts: 140
- Joined: Wednesday 17 December 2014 17:30
- Target OS: Linux
- Domoticz version: V3.8650
- Location: Jyväskylä, Finland
- Contact:
Re: MySensors - Gateway to Domoticz
Thanks! I'll give it a try.
LXC(x64 Ubuntu Xenial), RFXtrx433E, MySensors
Who is online
Users browsing this forum: No registered users and 1 guest