Back then when I built my RS485 network with normal ethernet GW and domoticz I had to define static node id's for all the nodes(except GW) to get RS485 network working. Not sure if thats the case anymore.
#define MY_NODE_ID 123
Back then when I built my RS485 network with normal ethernet GW and domoticz I had to define static node id's for all the nodes(except GW) to get RS485 network working. Not sure if thats the case anymore.
#define MY_NODE_ID 123
How about non blocking interrupt driven stepper library? For example: https://github.com/bjpirt/HotStepper
Take a look at: https://github.com/domoticz/domoticz/blob/a668baf917333e93f92dd9bb7c77eef8e0bc4ce4/hardware/MySensorsBase.cpp#L486
//V_TRIPPED
//V_ARMED
//V_LOCK_STATUS
//V_STATUS
//V_PERCENTAGE
//V_SCENE_ON
//V_SCENE_OFF
//V_UP
//V_DOWN
//V_STOP
//V_RGB
//V_RGBW
@sindrome73 said in Request data from Domoticz:
Hello
So if I understand, a node from domoticz can only ask the status of a sensor connected already him, and not the status of other nodes of the network!
So it is impossible for me to create nodes / displays to display the status of other sensors in the network.
The only way is to use some old mobile phone as a display point
You can directly request data from other node(nothing to do with domoticz).
From documentation: https://www.mysensors.org/download/sensor_api_20#requesting-data
Requests a variable value from gateway or some other sensor in the radio network.
void request(uint8_t childSensorId, uint8_t variableType, uint8_t destination);
childSensorId - The unique child id for the different sensors connected to this Arduino. 0-254.
variableType - The variableType to fetch.
destination - The nodeId of other node to request data from in radio network. Default is gateway.
Other way is that you can present some text sensors in your "screen" node and update those from scripts at domoticz.
Are your lights and temp sensors MySensored or would you like to get status from some random Domoticz devices?
another is having each node listen before transmitting
How would you describe this functionality in MySensors rs485 code?
https://github.com/mysensors/MySensors/blob/f5ed26c778c18107d1516bd86704f8c8f99ff571/hal/transport/RS485/MyTransportRS485.cpp#L246
If I'm reading the code correctly it is exactly reading the bus and making sure no other node is sending before sending anything.
The place where collision can happen is those 5 microseconds what the node is waiting to get driver tx enabled pin up.
So the collision avoidance is already there. So what MyS R485 transport is missing is collision detection and recovery from collision.
CAN bus( a mutli master 485 comaptible bus) is another option.
Its disadvantage is small payload size.
@nofox Its quite like how the Modbus works. By polling.
I think there is some better ways to do that. Check these out from google:
How about presenting additional S_BINARY/V_STATUS in your node. In domoticz when text changes set this to ON/OFF. From there you now its time to request text from domoticz.
@dbemowsk said in Domoticz help using V_VAR1 and S_CUSTOM:
So my questions are, first, are the V_VARx variables working? And if they are working, are they accessible from a device like the irrigation node?
There is the current state of V_VARx variables in domoticz: MySensors set and send V_VAR
And there is what you can store/request: hardware/MySensorsBase.cpp#L2241
@bbrowaros It has happened to me so many times that it was easy to guess
@bbrowaros Have you enabled: "Accept new devices" from settings?
Cannot get the point what you exactly mean but I think you should check for what child the message is for:
if(message.sensor == CHILD_ID_aeg2 && message.type == ...) { ..do suff.. }
@phil2020 try this in your sketch: #define MY_TRANSPORT_WAIT_READY_MS (200ul)
Its the "timeout" for waiting connection to gateway. Default 0 -> wait infinitely(?).
@mick Its still in use. I had one bus freeze since last "update post".
The gateway did pull the line up to 190mV what seems to be enough to get traffic frozen. After "reboot" of the gateway it was still pulling the bus to 160mV so it must be some solder on wrong place and bad chinese pin headers or protoboards.. I have to rebuild the "motherboard" of the gateway..
@dbemowsk there is the same with tensioning with motor: Tevo Tarantula Single Motor Dual Z Axis
@neverdie said in Anyone tried the Creality CR-10 3D printer?:
According to this review of a different printer, the Anet A8's bed doesn't get hot enough to print ABS:
Yes, the heated bed is bit weak but I think its quite weak on most sub 500€ printers having bigger beds than 200x200mm.
There is some help for the problem. See: anet/a8/improvements/understanding_my_heatbed
So you will be wiring all the switches with "0-5v line" to mega? Then just digitalRead all the pins on loop and compare with previous state. Simple as that..
Perhaps some (de)bounce library could be helpfull since the switches can cause a bit of bounce.
Btw. there is also a library to get interrupts from more pins but it wont help too much with Mega(from only 6 to 16 pins interrupt)..
https://github.com/NicoHood/PinChangeInterrupt
I bought Anet A2+ about an year ago and can recommend it only if you have too much time and want to learn how 3d printer exactly works.
The basic assembling took around 5.5hours. Of course it was cheap ~160€ delivered on flash sale at GearBest and was delivered from Europe so no import taxes. But so far I've spent some 50-80€ and X hours for upgrades..
With these upgrades the print quality is now quite ok now.
Btw. Octoprint is quite nice tool to have with 3d printer.
@ZachFlem is the interrupts/interrupt handler the thing you are looking for?
https://www.arduino.cc/reference/en/language/functions/external-interrupts/attachinterrupt/
I think @tekka is the one who can answer that.
I really would love to have RS485 OTA(or would it be OTL: Over The Line) support in bootloader since I have most of nodes using RS845.
Adding the support for HW Serial might be bit easier than for SW serial since no separate library is needed?
I had quite strange problem with my smaller network. There is a nano with enc28j60 shield as gateway and there was 2 relay/fet-nodes for controlling lights. Everything was fine until now I added one light switch node to the network. After that only the light switch was working. Strange...
Disconnected all the nodes from network and checked what is causing the problem. It was the GW. Measured the bus between A and B was ~2.5V. So it was pulling the bus to logical one all the time.
Changed the RS485 module.. no help. Then measured the "MY_RS485_DE_PIN" what I was using pin 2. The enc28j60 shield was pulling the pin to 0.6V and that was causing the RS485 shield to drive bus to ~2.5V. I changed the pin to 3 and now everything is working like a dream. Of course none of these nodes are sending all the time so most likely there wont be any collisions.
So when some node/bus is hanging next time measure the voltage of DE-pin
@rejoe2 how is it going with your RS485 network?
@gbuico That thread is pretty old.
The current(and most likely working) functionality is implemented here:
https://github.com/domoticz/domoticz/commit/2d4e690c82b166ff8597a7deb44be17f3ad2560f#diff-a9f78798ba1bded6b56b3909b2a42848
Are you looking for something like this? Sketch Generator
Looks like it still misses the RS485 option for network. Its already requested.
I think with domoticz its might be enough to call sendHeartbeat() from your gateway every 30 seconds.
It should update the m_LastHeartbeatReceive of the HW and thats what mainworker uses when it defines if the HW should be "rebooted".
Here is a example(NOT TESTED):
#define HEARTBEAT_SEND_FREQUENCY 30000
unsigned long lastHeartBeatSend;
....
void setup()
{
lastHeartBeatSend = 0;
}
...
void loop()
{
unsigned long now = millis();
if(now - lastHeartBeatSend > HEARTBEAT_SEND_FREQUENCY)
{
sendHeartbeat();
lastHeartBeatSend = now;
}
}
See:
https://github.com/domoticz/domoticz/blob/8bb0420c3ba4a10bbacd6f2e2f9b40b06ff0c7ac/main/mainworker.cpp#L12864
https://github.com/domoticz/domoticz/blob/8bb0420c3ba4a10bbacd6f2e2f9b40b06ff0c7ac/hardware/MySensorsBase.cpp#L487
https://www.mysensors.org/download/sensor_api_20
If some node hangs what happens if you recycle the power of rs485 transceiver only?
I'm just thinking could it be the protection of max485 that kicks in if there is two nodes sending exactly the same time.
@gryzli133 said in How can I include MyMessage object in my own class?:
MyMessage msg(child_id, V_LIGHT);
IMO you are trying to initialize MyMessage object before your class has any value for child_id. Can be resolved using object reference.
https://www.embedded.com/electronics-blogs/programming-pointers/4024641/An-Introduction-to-References
So you wont initialize msg variable until when constructing instance of your class..
Declare MyMessage &msg; in your class
and set value for it in your class constructor: msg = MyMessage(child_id, V_LIGHT);
ps. I'm natively writing C# and C++ isnt my strongest language so this might not be right
edit: did read bit more.. you need to init msg before entering inside constructor logic:
class Switch
{
public:
Switch(........ int &child_id ......... ) : msg(child_id, V_LIGHT) {
..................
}
MyMessage &msg;
};
I hope this works
@Cliff-Karlsson said in Is this scenario possible using domoticz?:
I have a sensor whish can output four different values depending on how the sensor is triggered, how do I send four different values to domoticz and what sensor type do I chose? I want in this example be able to light up four different lightbulbs in domoticz depending on the sensoroutput.
I have done this with my heat pump controller. I'm using dimmer and "linking" that to dummy selector what contains the states(0=off, 10=heat by water, 20=heat by room, 30=freeze protection...).
Linking is done with LUA:
--
-- Heat pump mode selector<>dimmer mapping event
--
commandArray = {}
selectorName = 'Pumppu_Mode'
selectorId = '332'
dimmerName = 'Pumppu_ModeSW2'
-- selector -> native
if(devicechanged[selectorName]) then
iDimLevel = tonumber(otherdevices_svalues[selectorName])
commandArray[dimmerName]='Set Level '..iDimLevel
end
-- native -> selector. (not triggering events this way of calling with UpdateDevice)
if (devicechanged[dimmerName]) then
if (devicechanged[dimmerName] == 'Off') then
commandArray['UpdateDevice'] = selectorId..'|0|0'
else
iCurrentDimLevel = 0
if(otherdevices[dimmerName] == 'On') then -- can be "On" or something else
iCurrentDimLevel = tonumber(otherdevices_svalues[dimmerName])
else
iCurrentDimLevel = tonumber(string.match(otherdevices[dimmerName], "Set Level: (%d+) %%"))
end
commandArray['UpdateDevice'] = selectorId..'|'..iCurrentDimLevel..'|'..iCurrentDimLevel
end
end
return commandArray
I would also want to be able to use a local variable and a global variable. Can I somehow "push" a variable from domoticz to the sensor everytime it changes?
Create a device to your sketch and use that to handle the "variable". The rest is just scripting in domoticz after that.
@oleg
There is Daikin ARC433B50 and ARC417IR already in @ToniA 's repository: https://github.com/ToniA/arduino-heatpumpir
Would some of these work?
@Nca78 said in "loosing" sensors over time:
Buy you can also buy your nrf 24 from what seem to be reliable companies like CDEByte on AliExpress, they are only slightly more expensive than he clones and their PA/LNA used in gateways seem to have solved problem for everyone who tried them.
Nice hint, thanks!
Yes it does. Take a look at domoticz source code and you can see there is V_VAR and V_VAR_1-5 implemented:
https://github.com/domoticz/domoticz/blob/development/hardware/MySensorsBase.cpp
There is little description how these are used with domoticz:
E.g. In Domoticz V_VAR is used to store and restore node variables. They are stored in the Domoticz database when send by the node. The node can retrieve a previous stored value from the database. There is no easy way to set the variables. So V_VAR kan be used as remote permanent memory.
@rejoe2 said in RS485 nodes stop sending data after some hours or days:
@pjr As Node_2 was not sending any data some minutes ago: between A+B I measured 2.23V...
Then I depowered everything. Short after repowering, I have around 0.03V.What to do with this info?
+-200mV is the magic number with rs485. rs485 line 3 states:
As I know the line should be in idle state when nobody is sending.
So for me it looks like something is pulling the line constantly to state "1" or "0" depending which way you did measure it. This could be caused by faulty transceiver, bug in library code, bug in your code..
Next time can you measure whats coming from arduino? So measure between GND and TX(or pin 9 if using AltSoftSerial). And of course between GND and DE pin. This way we can resolve if the problem is at arduino side or transceiver side.
Can you measure bus voltage when everything is "dead"?
Is it idle or is some of the nodes pulling it up or down?
@rejoe2 said in RS485 nodes stop sending data after some hours or days:
- The nodes themselfes seem still to work as expected (one has a pir-functionality, so it's easy to test...). But even pressing just the reset button will not bring it back to RS485 communication. So I would bet, the point of failure is the RS485 module/MAX485 IC, that needs to be reset by a complete power-off.
Hmm. I did read the max485 datasheet and there is this text:
Drivers are short-circuit current limited
and are protected against excessive power dissipation by
thermal shutdown circuitry that places the driver outputs into
a high-impedance state. The receiver input has a fail-safe feature
that guarantees a logic-high output if the input is open circuit.
Current-Limiting and Thermal Shutdown for Driver Overload Protection
I'm just wondering if the bus can be in some kinda state that the protection kicks in?
Can you try recycle power from the rs-485 driver only without depowering arduino when the "jam" state happens? Would be interesting to know if it cures the data transmission.
@rejoe2 said in RS485 nodes stop sending data after some hours or days:
So next step will be to apply @pjr's modified version of MyTransportRS485.cpp...
That should only help in case of collisions.
Wondering if you could check if those "dead" nodes are trying to send anything by attaching USB-RS485 adapter to the bus and check if there is any activity after pressing reset on "dead" node.
Other helpful thing could be a "datalogger" for testing nodes that will die eventually: https://forum.mysensors.org/topic/6340/debug-to-a-sd-card-module
Those 20K resistors are so small factor that removing them might not be necessary but removing extra termination is. I'm also using 600ohm pull-ups and pull-downs in the middle of the bus but I think 1k might also be ok and it needs little less juice from vcc.
This might be helpfull: http://alciro.org/tools/RS-485/RS485-resistor-termination-calculator.jsp
@gohan said in Serial RS485 Gateway stops receiving after some hours or days:
I remember there was a suggestion to modify the rs485 library to send 3 times the header message before sending the payload in order to avoid collisions.
For the library code i did this modification to MyTransportRS485.cpp
Added this to beginning of the lib file:
#if !defined(MY_RS485_SOH_COUNT)
#define MY_RS485_SOH_COUNT 3
#endif
And in the sending code:
// Start of header by writing multiple SOH
for(byte w=0; w<1; w++) {
_dev.write(SOH);
}
Changed to this:
// Start of header by writing multiple SOH
for(byte w=0; w<MY_RS485_SOH_COUNT; w++) {
_dev.write(SOH);
}
I did the selector <> dimmer mapping in lua:
--
-- Heat pump mode selector <> dimmer mapping with lua
--
commandArray = {}
selectorName = 'Pumppu_Mode'
selectorId = '332' -- needed for UpdateDevice
dimmerName = 'Pumppu_ModeSW2'
-- selector -> dimmer
if(devicechanged[selectorName]) then
iDimLevel = tonumber(otherdevices_svalues[selectorName])
if(iDimLevel < 60) then -- not needed anymore?
commandArray[dimmerName]='Set Level '..iDimLevel
end
end
-- dimmer-> selector. UpdateDevice is not triggering this script again
if (devicechanged[dimmerName]) then
if (devicechanged[dimmerName] == 'Off') then
commandArray['UpdateDevice'] = selectorId..'|0|0'
else
iCurrentDimLevel = 0
if(otherdevices[dimmerName] == 'On') then -- can be "On" or something else
iCurrentDimLevel = tonumber(otherdevices_svalues[dimmerName])
else
iCurrentDimLevel = tonumber(string.match(otherdevices[dimmerName], "Set Level: (%d+) %%"))
end
commandArray['UpdateDevice'] = selectorId..'|'..iCurrentDimLevel..'|'..iCurrentDimLevel
end
end
return commandArray```
@arduino_89_89 said in Problem with Domoticz:
Hi everyone, I wanted to know how ever whenever the PC reboots, I also change the com port. And why when I break the gateway, are the sensors no longer connected?
What environment? Could this help? https://www.domoticz.com/wiki/Assign_fixed_device_name_to_USB_port
@dbemowsk Yes thats true that domoticz doesnt handle the VARX the way the irrigation code expects. But about the error message written on topic I'm pretty sure it actually is his problem since I'm using domoticz and have faced the same error message..
He stated:
"[Error sending switch command](check device/hardware !)"
"The error comes up when turning on or off."
With default settings RF24_PA_HIGH or RF24_PA_MAX (have to check the default from MyConfig.h) is used and with this setting the radio needs good power source. Especially the clone radios..
So your node can get messages thru to gw but gw cant get them always to node..
Have you added capacitor to your gateway radio? For me this looks like power issue of the radio.
You could try this on your gateway: #define MY_RF24_PA_LEVEL RF24_PA_LOW (or RF24_PA_MIN) before mysensors include.
@kduino said in How to use SoftwareSerial Library?:
Hi PJR,
would you mind explaining me the reason for defining MY_RS485_HWSERIAL?
Thank you,
by kduino
Take a look at MySensors.h:
#elif defined(MY_RS485)
#if !defined(MY_RS485_HWSERIAL)
#if defined(__linux__)
#error You must specify MY_RS485_HWSERIAL for RS485 transport
#endif
#include "drivers/AltSoftSerial/AltSoftSerial.cpp"
#endif
#include "hal/transport/MyTransportRS485.cpp"
..
If I read this correctly it loads also AltSoftSerial if you dont define MY_RS485_HWSERIAL
Of course I can read this wrong..
@user2684 wow, that was fast! Thanks!
@rakeshpai I can understand that. Not sure about the amount of rs485 users but one at least
Just an idea:
I would try adding:
#elif defined(MY_RS485_SWSERIAL)
SoftwareSerial& _dev = MY_RS485_SWSERIAL;
so it looks like this:
#if defined(__linux__)
SerialPort _dev = SerialPort(MY_RS485_HWSERIAL);
#elif defined(MY_RS485_SWSERIAL)
SoftwareSerial& _dev = MY_RS485_SWSERIAL;
#elif defined(MY_RS485_HWSERIAL)
HardwareSerial& _dev = MY_RS485_HWSERIAL;
#else
AltSoftSerial _dev;
#endif
and in your code define:
#define MY_RS485_HWSERIAL
#define MY_RS485_SWSERIAL mySerial
and see what happens
ps. the #define of MY_RS485_HWSERIAL is still there since I'm not sure what will be missing for serial communication if that is not defined.
Feature request: support for RS485 network!
"Writing multiple SOH"
Most likely not the problem what AP has but I think its good to mention also in this thread: https://forum.mysensors.org/post/56960
V_HVAC_FLOW_MODE, V_HVAC_SPEED and V_HVAC_FLOW_STATE handling still missing.
No smartSleep implementation yet.
I think there is couple things you need to tweak if you want to use SoftwareSerial instead of AltSoftSerial since its quite well baked in the default solution.
See these:
Will the result change if you add more sync(SOH) chars?
@kimot what hw you are using? MCP2515 + MCP2551?
@Reza have you tried to use terminating resistors?
And perhaps it could be good to try 1k pull-up and pull-downs at the gateway end. The left diagram:
With these two tricks I got my setup stable.
And a little tweak to transport class could help also..
@Anticimex
Have you measured or know someone who has or can you estimate how much the communication takes time with one "relay on" command for example?
1ms, 10ms or 100ms?
@frazzle said:
Now my questions:
- Can send and receive messages without a controller? How would I go about that?
- How secure is the NRF24 connection? To be clear, I don't mind anybody reading what's being sent, but I don't want someone sending commands to my stations and thus triggering the relays (it's very unlikely, but you never know )
- Is there a way to report signal strength between the gateway and the wireless station?
- Any other tips you can give me?
Thanks for reading
Currently there is no "hw" ack functionlity like the radio has.
You can check out the rs485 transmit code from here.
But you can of course use the ack functionality between controller software and node to make sure message will get to destination.
Good to know. Think then I can throw that away since I'm using domoticz.
@skatun did you got this working?
I faced similar situation when I was accidentally connected rx & tx wrong way around on my GW. The sensor node was constantly polling for parent but got no response.
The "gibberish" on RS485 bus might also be the control chars the transport uses.. SOH, STX, ETX and EOT.
See this post.
In my GW sketch I have these two enabled:
#define MY_INCLUSION_MODE_FEATURE
#define MY_INCLUSION_MODE_DURATION 60
Is the AVOIDANCE part already there?
I think the "HW" CHECKSUM ACK could be nice addition.
2.1.0-beta tested and works between two nanos over altsoftserial
COM6:GW, COM9:Bus monitor and COM5:Node
@napo7 and if we use CAN CONTROLLER it does all the needed collision avoiding, detection and "resending" and it dont need to be written in the transport class? Only the initalization of the CAN CONTROLLER needs to be added?
Is there much difference in communication reliability if we use CAN DRIVER vs. RS485 DRIVER currently without modifying the rs485 transport class?
For me it looks like its Ambient Weather WS-5305.
As I know the WS1080 is using Fine Offset protocol so it could be easily received if this is using the same. There is many blog posts about it.
So we need collision AVOIDANCE and DETECTION for (almost?)perfect solution?
AVOIDANCE:
DETECTION:
With most important nodes I could additionally use controllers ACK functionality.
@kimot Would it be hard to write CANbus version of the transport class based on rs485 implementation? Is there some extra things you need to handle on top of "basic serial communication"?
@kimot @hausinger could you open new topic about can bus transport implementation for MYS? I think there would be a lot of interest about it.
I think V_LEVEL works in domoticz the way you want. You can change the axis label and icon from UI edit button afterwards.
You can use are S_DUST are S_VIBRATION as sensor type.. not the most describing ones for water but both are creating a "custom counter" that can be used to present the "current/instant level".
More info can be found from the source code of domoticz
https://github.com/domoticz/domoticz/blob/master/hardware/MySensorsBase.cpp#L861
Perhaps someone could add handling for pair S_WATER and V_LEVEL to MySensorsBase.cpp. Should be easy
This will be good!
Will it be only time? Could the date information be additional?
"Error sending command, check device/hardware"
I had oxidized dupont wires between radio and arduino. Good thing to check if your sensors lives outside!
Small adjustment, Domoticz has no support for these yet:
V_HVAC_FLOW_STATE
V_HVAC_SPEED
V_HVAC_FLOW_MODE
Hmm. Could this be (ab)used somehow?
https://www.mysensors.org/download/sensor_api_20#requesting-data
@Reza said:
but i think signing is not useful ! until that domoticz have this bug , the theif just need my frequency for add and control my device ! so i must dont use my sensors(relay) for door lock and security!!
No the "domoticz bug" is not a problem since it dont affect your sensor network or the way theif can use your mysensors network.
Domoticz doesnt have anything to do with signing or encrypting. Its just listening and sending readable serial messages to your gateway.
With signing you make thief not able to use(send messages to) your doorlock.
With encryption you make it almost impossible for the thief read RF messages your nodes/gw are transmitting.
There is good reading for you:
https://www.mysensors.org/about/signing
https://forum.mysensors.org/topic/1021/security-introducing-signing-support-to-mysensors
If I'm reading the domoticz codebase correctly there is two problems:
@Reza can you update title of this topic also
For reference: https://www.domoticz.com/forum/viewtopic.php?f=6&t=13481&start=20#p97600
Please correct if I've provided misleading information.
I think normally the controller has all the logic and node behaves more like a sensor/actuator device... but
You could publish fake sensors what you can use at controller level to send information to sensor and handle those on message received.
Some controllers might already support V_HVAC_SETPOINT_HEAT and V_TEXT setting from UI.
Time setpoint sensors would be what you need but it does not exist.
Almost.. some S_HVAC "enum" messages arent supported.
@dbemowsk said:
@pjr OK, that helps me understand your code better. I am assuming that the "onModbusProcessed" method is to process incoming messages sent by the modbus network and sending them to Domoticz, correct?
Thats correct. There I handle the result of a modbus query.
I'm not handling decimals since the heat pump controller supports only full numbers..
@dakipro said:
For me personally the main focus is not fallback as is independency from the controller/domoticz.
Also there is delay when you use domoticz as controller, which annoys me so much. I click on the switch, sometims it is 2s before the light comes on. And there is always "stress" of switch not working, rebooting or what not.
This might help if someone could make it as configurable value and will merge it to codebase: https://www.domoticz.com/forum/viewtopic.php?p=93701#p92910
I've designed my setup another way: The house is divided in 5 areas. Every area has its own relay box where all the actuators of that area are living. So in normal wall boxes I have only weak current. I'll try to implement everything based on rs485. Most of the buttons will be directly tied to actuator and some are action buttons for HA controller. Mainly for scenes I think.
Another solution I was thinking is that as fall back I could use nexa remote to control those actuator-boxes directly since it has ability to control 4x4 devices or 4x8 if you use it for toggle... but the problem might be that the remotes are always lost..
@dbemowsk
These are not supported yet by domoticz:
Thats why I'm using V_LIGHT (ON/OFF) currently at the code.
You can check it from here: https://github.com/domoticz/domoticz/blob/master/hardware/MySensorsBase.cpp#L70
Those are not mentioned anywhere but the one list.
@dbemowsk said:
@pjr said:
I have only one S_HVAC child defined and in my setup it sends ON/OFF state, V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COOL and V_TEMP -messges.
I have a few questions regarding your setup.
- First, what type of thermostat do you run?
So the node integrates my Amitime air source heat pump to domoticz.
gw.present(2, S_HVAC);
- How are you MySensorizing your thermostat?
Its not actually thermostat. Its heat pump. Same way as thermostat is has set point heat, cool and current temp readings.
- Does your thermostat have a single set point, or does it have separate heating and cooling set points?
It has both
- When you set your temp at the thermostat itself, be it the heating or cooling set point, does it report that back to your gateway/Domoticz. If so, How do you have your code set to report that back?
Yes it report back.
Could I possibly see how you have your code set up to compare what I have? I am thinking that it is something in the way that I am reporting back to the gateway. My MySensors bridge that I am building just translates what my thermostat sends for data on the RS485 network and converts that to the MySensors standard that should work with Domoticz. I just can't seem to figure out what I am doing wrong with the cooling set point. Sending the temp and the heating set point values works perfect, just not the cooling set point.
Its very similar setup. Instead of raw rs485 I'm using modbus with my heat pump. I'll send you a PM about the sketch.
@dbemowsk said:
The other problem as I mentioned is that Domoticz is not seeing the incoming V_HVAC_SETPOINT_COOL. I send different values and it displays 190.4 every time (I said 190.2 last time, but it's 190.4). Is there something that I am doing wrong, or is this a limitation in Domoticz?
Works for me Although I'm using celsius scale in my setup.. One direfference we have. I have only one S_HVAC child defined and in my setup it sends ON/OFF state, V_HVAC_SETPOINT_HEAT, V_HVAC_SETPOINT_COOL and V_TEMP -messges. Domoticz registers these separate node-child-sub-devices when it gots first messages from them. But I think this shouldnt be an issue..
You need to create a node that is polling the electricity meter. Its quite simple. I've done a similar thing but a heat pump "integrator" node.
There is some example with Kamstrup meter: http://kildal.dk/?page_id=432
Just remove network stuff and add mysensors instead.
Gree is the most largest manufacturer of AC devices and Tadiran outdoor unit looks quite a lot like Gree.. at least I'd try that first.
e: Oh. Looks like Carrier also has some relation with Tadiran.
Most likely its manufactured by GREE just like most of local branded stuff
@AWI I'm kinda waiting that someone with more skills could implement this. Then I can finalize my functionality and a post project topic about it.
If someone wants to have current version of the source just pm me!
@dbemowsk what protocol your thermostat is "speaking"?
@dbemowsk did you mean setup like this? controller <- usb -> GW <- rf -> "gateway node" <- rs485 -> thermostat network. If so, I have done it with my heat pump. I have "gateway node" that translates modbus to mysensors to/from my heat pump.
@hek do you know anyone who would like to implement this for some "beer"?
Just calculate how much current flow you need and take relays that can handle it.
P=UxI so 9W=240VxI and from there 9W/240V=0.0375A per lamp. With 10A relay you can drive 266 led lamaps
@ahmedadelhosni Its still wery new and the implementation is based on dimmer. This way you can get options from 0 to 100 and also its the reason the selector has separate on/off switch.
The problem is the mobile app. It just dont have proper implementation yet to show selector as buttons or dropdown.
I think those instructions are written for older version of the library. Now you could just copy those examples and try without changing anything.... I think
@hek some new ideas for this:
There is now new switch type(SELECTOR) presented in Domoticz. With that its now possible to handle with V_HVAC enum switches.
I was thinking this functionality and new functionality of MySensors for presenting (enum)switch values would be more than nice. With this the controller could build the switch dynamically with values the HVAC device really has.
For example:
It would be alternative for gw.present(...) or called after?
Keys would be used in UI of contoller and values(list of 8 bit int?) are what is transferred in messages.
For example my air source heat pump has only V_HVAC_MODE modes "Off", "HeatOn", "CoolOn". Values for these could be 0, 1 and 2.
@andriej remember to calculate how much current you can take thru cat5e and how much load there can be with one pair.
From wikipedia: "Maximum current per conductor 0.577A". So this would make P=UxI -> 12Vx0.577A=6.92W. There is calculations where one nano can take max 1.4Watts. You could use more wires of the car5e for power or lift voltage upper. 48Vx0.577A=27.70W
Have you defined using softspi since using those pins?
I'm using different pins with mega and everything started to work after adding capacitor to radio:
GND > GND
3.3 > VCC
52 > SCK
51 > MOSI
50 > MISO
9 > CE
10 > CSN
2 > IRQ