Hey guys,
first of: I am a long time NodeRED user but the JS curse aka. dependency hell finally caught up to me. Playing around with a bunch of alternatives Domoticz looked very promising with its batteries included philosophy which is the exact opposite of NodeRED. For me another bonus point is the fact that rules/automations are written in Lua - understanding code is way easier for me than a screen of nodes which tell me nothing connected by wires.
However I am running a MySensors network alongside a bus system called PJON. This system is layed out in a star topology connected to a cental Arduino Uno since the clock of a Rapsberry is not reliable enough. I have this Arduino hand all readings via USB to my Raspberry. When I was looking for how to setup this solution in Domoticz I could not find a generic serial hardware component which would allow me to listen to a serial device and send those readings to an event handler.
tl;dr: what is the correct way to have a serial communication between Domoticz and an Arduino connected via USB/GPIO?
Generic serial communication
Moderators: leecollings, remb0
-
- Posts: 7
- Joined: Tuesday 25 February 2020 21:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Generic serial communication
Thank you for that link, this looks not too shabby 
As far as I can tell this relies on an ESP8266 which in turn is bond to WiFi? I have my bus PJON setup because I do not care if a temp reading via MySensors gets missing since 5 minutes later the next one might get through. But when my switches do not work because my WiFi is down I would be in a world of pain with my family
. Plus I think some things are to important to have them run via radio.

As far as I can tell this relies on an ESP8266 which in turn is bond to WiFi? I have my bus PJON setup because I do not care if a temp reading via MySensors gets missing since 5 minutes later the next one might get through. But when my switches do not work because my WiFi is down I would be in a world of pain with my family

-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: Generic serial communication
I have only 2 devices hard wired. My P1 and heating measurement via USB to the Raspberry.
Rest is all radio, most of it Wifi and some cheap ass 433 Kaku.
Not sure in which part of the world you live but my Wifi is stable and 99% available. Ok, I have a proffesional Access Point
but before that it was almost same.
By the way, have a look at IoT-land and see how much is wireless
I do not understand your question. Are you looking at a layer 1 or 5-7 ?
You have your raspberry connected to the Arduino. That is your serial conversion already.
With MQTT you could read your serial with Node-Red and pass it over to Domoticz via MQTT.
Again, no clue what you are looking for.
Rest is all radio, most of it Wifi and some cheap ass 433 Kaku.
Not sure in which part of the world you live but my Wifi is stable and 99% available. Ok, I have a proffesional Access Point
but before that it was almost same.
By the way, have a look at IoT-land and see how much is wireless

I do not understand your question. Are you looking at a layer 1 or 5-7 ?
You have your raspberry connected to the Arduino. That is your serial conversion already.
With MQTT you could read your serial with Node-Red and pass it over to Domoticz via MQTT.
Again, no clue what you are looking for.
-
- Posts: 7
- Joined: Tuesday 25 February 2020 21:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Generic serial communication
Well for me 99% is not enough for a light switch. Plus I do have my access control running ever this bus as well and I do not feel comfortable to do this wireless.
Yes, I do have a serial connection but I need domoticz to use this Arduino like it uses a MySensors gateway so it can communicate with my already existing bus.You have your raspberry connected to the Arduino. That is your serial conversion already.
-
- Posts: 7
- Joined: Tuesday 25 February 2020 21:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Generic serial communication
@freijn I did some more reading on your link and I think I did a poor job explaining what I was looking for.
My current setup is like this:
Code: Select all
<---PJON---> Arduino1 (Client)
Raspberry <---USB---> Arduino (Master) <---PJON---> Arduino2 (Client)
<---PJON---> Arduino3 (Client)
My data is a custom string formatted like this:
Code: Select all
key1:value1;key2:value2
I hope this clarifies my intentions better than before, it seems I did not even know, what I was asking

-
- Posts: 536
- Joined: Friday 23 December 2016 16:40
- Target OS: Raspberry Pi / ODroid
- Domoticz version: Stable
- Location: Netherlands Purmerend
- Contact:
Re: Generic serial communication
Hi Mirodin
Much much better explanation !
Have a look at this one.
https://www.raspberrypi.org/forums/view ... p?t=106468
Grab the first example and run it and see if you get data.
If this runs, you need to map the data to an idx ( sensor target ) and do a json call to the domoticz.
However , search on python as well , I do see some PJON stuff but no PJON serial reciever.
Much much better explanation !

Have a look at this one.
https://www.raspberrypi.org/forums/view ... p?t=106468
Grab the first example and run it and see if you get data.
If this runs, you need to map the data to an idx ( sensor target ) and do a json call to the domoticz.
However , search on python as well , I do see some PJON stuff but no PJON serial reciever.
-
- Posts: 7
- Joined: Tuesday 25 February 2020 21:47
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Generic serial communication
Thank you, I will check out your link. Unfortunately though I will not have time to try this until Friday next week but I will let you know how it went.
Who is online
Users browsing this forum: No registered users and 1 guest