"Error sending command, check device/hardware"
I had oxidized dupont wires between radio and arduino. Good thing to check if your sensors lives outside!
"Error sending command, check device/hardware"
I had oxidized dupont wires between radio and arduino. Good thing to check if your sensors lives outside!
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.
@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.
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);
}
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.
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
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.
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.