DIY 1-Wire stuff (CO2, UDP interface)

1,158 views
Skip to first unread message

Rob_in

unread,
Feb 3, 2018, 4:59:33 PM2/3/18
to Loxone English
Hi all,

Today I stumbled across a couple of videos discussing 1-Wire integration with Loxone. I am specifically interested in CO2 monitoring (because want to turn our HVAC off from time to time) which led me here:


The same guy has a very interesting video on using an Arduino to create a 1-Wire to UDP gateway:


He say that this works much better for him than the regular Loxone module when many 1-Wire devices are present.

Thought some here might find it interesting.

Robin

Andrew B

unread,
Feb 3, 2018, 8:41:07 PM2/3/18
to Loxone English
I had zero success with the Loxone 1-wire extension. I also struggled with OWFS. I ended up with two of these and am very happy with them:

https://www.embeddeddatasystems.com/OW-SERVER-1-Wire-to-Ethernet-Server-Revision-2_p_152.html

Will be at 44 sensors soon.

Duncan

unread,
Feb 4, 2018, 2:01:00 AM2/4/18
to Loxone English
i think success with 1-wire depends on NOT following loxones suggested star wiring.

im using loxones extension with around 30 chinese temperature sensors (around $1 each from aliexpress) without any problems, but i have a separate screened cat5 screened cable that goes point to point, following Maxims own guidance.

other solutons such as the embeddeddatasystems server or pokeys57e potientially offer a better provision for a wider range of services, but i would suggest you still get  your 1-wire wiring correct from the start.

Andrew Brownsword

unread,
Feb 4, 2018, 10:50:24 AM2/4/18
to Duncan, Loxone English
Completely agree that the wiring topology is first priority.  Even then I had little success with loxone’s unit.  If anyone wants to buy mine, let me know.   :)
--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/ai7KA4ZlbJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/loxone-english/a91914f3-43da-443b-9c84-8952aa81d536%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Deac99

unread,
Feb 4, 2018, 8:37:38 PM2/4/18
to Loxone English
@ Andrew B - I'm surprised that you are having trouble with the 1-wire.  I too had trouble but I had about 30 sensors all wired in a mish-mash of star and linear topography not realizing the limitation to 24 sensors.  As soon as I split the groups and added a second 1-wire extension my system has been working rock solid  (controlling the  heating) for 6 months now.  I also am using cheap waterproof sensors (about 1 Euro each from Amazon) but in the future I will be sure to wire in a linear scheme.

The OW Server that you referenced looks interesting though for a better price.  I'm curious, do you have this integrated into the Loxone?  How are you dealing with the communication?  My place is only starting and I'll end up with many more sensors so I may consider this for future expansion.

Andrew Brownsword

unread,
Feb 4, 2018, 10:06:43 PM2/4/18
to Deac99, Loxone English
I couldn’t get more than one sensor working with the extension reliably.  And even then I didn’t much like the LoxoneConfig UI for managing the sensors.  My approach uses a spreadsheet which is easy to edit and manipulate.

I had the EDS units integrated with Loxone via picoC.  The program queried the EDS every two seconds and did a simple text search of the XML.  This did expose a Loxone tcp bug, but the work around wasn’t really a problem — just meant that I didn’t get every sensor on every iteration, which I wasn’t anyhow due to noise on the network.  My picoC read the values and set them to a set of virtual inputs so they were available in LoxoneConfig.  All the sensor IDs and names came from that spreadsheet (well, csv really).  Worked like a charm.

(I have since moved most of my logic off of the Loxone onto a $50 ARM based Linux server, so it is reading from the EDS and sending to the Loxone to update the UI.)

The EDS device also has the advantage of having three electrically separate buses, and it presents a web server interface so you can inspect it from any web browser without having to go through the Loxone.
--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/ai7KA4ZlbJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.

Deac99

unread,
Feb 6, 2018, 1:09:50 PM2/6/18
to Loxone English
That is interesting - so if I am interpreting correctly the ARM based Linux server could be a simple raspberry Pi correct?  I may have to start messing with that again!

Andrew Brownsword

unread,
Feb 6, 2018, 4:24:21 PM2/6/18
to Deac99, Loxone English
I’m using an odroid HC-1, but any Linux SBC could work.  My program currently maxes out at around 12% of one of the 8 cores.  That handles sensors, light switches, ArtNet, writing to time series database, a web server dashboard and a few other bits and bobs.  The time series database and Grafana are a lot more processor intensive, and I have grandiose ambitions for using really heavy compute on the GPU to accomplish sophisticated HVAC control.  I’m also going to start using HomeBridge to get HomeKit integration and thereby Siri support, as soon as I get a good RPC solution between c++ and JavaScript.  The $50 odroid can handle all of that with aplomb, and only the loxone UI will remain on the miniserver.

Andrew Brownsword

unread,
Feb 6, 2018, 6:46:42 PM2/6/18
to Deac99, Loxone English
Yeah, pretty much.  It’s going to depend on your software and programming language, but my experience using c++ and my software is that I’m only using about 0.15Ghz so far.  I tend to be performance obsessed, but even so...


On Feb 6, 2018, at 10:09 AM, Deac99 <dea...@gmail.com> wrote:

Mark Deacon

unread,
Feb 6, 2018, 7:31:17 PM2/6/18
to Andrew Brownsword, Loxone English
Thanks

To unsubscribe from this group and all its topics, send an email to loxone-english+unsubscribe@googlegroups.com.

Rob_in

unread,
Feb 7, 2018, 2:58:01 AM2/7/18
to Loxone English
On Tuesday, 6 February 2018 22:24:21 UTC+1, Andrew B wrote:
... time series database and Grafana ...

Oooh... please do tell. 

I find Loxone's graphing pretty much useless because you can't even view multiple graphs together, let alone mixed data sets on the same graph.

There is a RRDTool plugin thingo for Lxoberry but that whole thing is in German and the RRDTool part is marked as unstable.

Before I go installing Cacti or similar, would be interesting to hear other options.

Cheers,

Robin

Andrew Brownsword

unread,
Feb 7, 2018, 8:30:15 AM2/7/18
to Rob_in, Loxone English
Well I started with influxdb and tried that for a few months but had problems with data retention and how it is supposed to index and compress files.  My suspicion is that it has issues with small memory 32bit platforms, but otherwise seems like a good solution.  Since it doesn’t work for me, I switched to TimescaleDB and have been running since Jan1.  It is built on Postgres and is only version 0.8.0, and took a bit more work to get it up and running.  The code is a bit more involved but not too bad.  So far so good.

Grafana was a bit of a pain to build for ARM, but now it is running well.  Can be a bit slow on my hardware but turned down the priority to ensure it doesn’t interfere with real time code, and it’s fine.  Sometimes takes a bit longer to load data than I’d like, but I’m also pulling a lot of data into quite dense graphs.  I should probably have more but simpler graphs then it would be much faster... but I like seeing all ~30 sensors or all 31 circuit power draws at once.

What else would you like to hear?
--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/ai7KA4ZlbJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.

Rob_in

unread,
Feb 8, 2018, 12:53:08 PM2/8/18
to Loxone English
Cool. Thx.

Do you have any screenshots, etc. so we can see what all this looks like? Is the code anywhere public (Github, etc) or would you not want to share?

Also curious as to why you went this way over using something like Cacti/MRTG/etc.

Cheers,

Robin

Andrew Brownsword

unread,
Feb 8, 2018, 1:13:34 PM2/8/18
to Rob_in, Loxone English
Not sure if the screenshots will come through when attached, but I’ll give it a shot.  This is just one of two dashboards — the other is power consumption.  I envision creating more graphs which have less overlaid at once when more detail is needed.  I’m also trying to work out some fancier SQL queries to do things like differences between time series (e.g. Outlet - Inlet = Lift).  This is trickier than you might naively think because not all time series have data points at the same points in time, so it is necessary to look for the chronologically previous value.  My SQL-fu is weak so its slow going.   :)

My own code I’m not prepared to share, at least at present.  Maybe bits and pieces of it to someone able to write c++ code who just needs a leg up but no support.

Other conventional round-robin and similar based time series systems seemed to be lacking.  Their query mechanisms are poor, their schemas static or nearly so, and their disk management weak.  A proper RDBMS does those things and more very well, but tends to have some shortcomings when dealing with high volume nearly continuous inserts and (almost) no deletes.  InfluxDB and TimescaleDB are purpose-built for this sort of data.  InfluxDB attempts to be RDBMS-like but specialized.  TimescaleDB literally *is* Postgres — it is implemented as an extension that maps their ‘hypertables’ onto chunked conventional Postgres tables.  Grafana recently added Postgres support, so it seems to have become a good alternative to InfluxDB + Chronograf/Grafana.  Happy with it so far.

At my current data collection rate, my SSD will be full in about 9 years.



--
You received this message because you are subscribed to a topic in the Google Groups "Loxone English" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/loxone-english/ai7KA4ZlbJc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to loxone-englis...@googlegroups.com.

Rob_in

unread,
Mar 30, 2018, 1:19:01 PM3/30/18
to Loxone English
Quick update as I actually got round to setting this up today (as opposed to having it sitting connected to my laptop occasionally under test).

Works like a charm but things to note:

- The OP on YouTube had enhanced the OneWireHub library so don't go 'Doing the right thing'(TM) and fetching the latest source for that - won't work ;)

- The OP on YouTube used some overly complicated (IMHO) stuff to get the values into Loxone. The Arduino ADC has a 10 bit resolution and the VAD voltage sensor in the DS2438 protocol also has a 10 bit resolution so why bother? I just pumped the value form the ADC into the OneWire library and that's that. This way you can ditch the MQ135 library in the Arduino and the complex stuff in Loxone (I just scaled the 0-10v value in the Loxone input properties). Of course the number that comes out of this is a bit arbitrary, but it does move and gives you a relative idea of any nasties in the room which is all I was looking for.

- Don't try and put this MQ135 sensor in the same wall box as a temperature monitor because the MQ135 has a little heater in it which will cause the other one to read too high. Oops ;)

Hope someone finds this useful.

Cheers,

Robin

Rob_in

unread,
Sep 13, 2018, 8:17:50 AM9/13/18
to Loxone English
Hi again,

As a follow up, I stumbled across the BME680 sensor today. This is a tiny detector that communicates via I2C:


The actual sensor is the tiny silver thing sticking out of this board. These are more expensive than the MQ135 (I can find them around 14EUR online) but that's still pretty cheap and they can monitor:


- Temperature
- Humidity
- Barometric pressure
- VOC gas

This looks like a very interesting option when combined with an Arduino to present these readings on 1-Wire or other bus. This could easily fit in a wall box and has much lower power consumption that the MQ135. Maybe you could get away with using the standard 1-Wire extension supply - I don't recall what current it can supply.

Cheers,

Robin

David Wallis

unread,
Sep 13, 2018, 9:03:15 AM9/13/18
to Loxone English
@AndrewB - you mentioned if anyone wanted to buy your 1 wire ext..

Did you ever choose to part with it, or do you want to? if so mail me at da...@wallis2000.co.uk
Reply all
Reply to author
Forward
0 new messages