[mh] Fwd: One Wire sensors

Giles Godart-Brown <[email protected]>
Newsgroups gmane.comp.misc.misterhouse.user
Message-ID <[email protected]>
Steve

I'm currently using 20 DS18B20 1-wire temperature sensors

BUT - I connect them to 3 wemos d1 minis 
(https://www.wemos.cc/en/latest/d1/d1_mini.html) powered by  old usb 
chargers.

The Wemos D1 is flashed with a stock image of Tasmota 
(https://tasmota.github.io/docs/), this can support up to 8 1wire 
sensors out of the box, more if you mess with the code).

You can either read the temps by sending an html request to its web page 
(see attached) , or every 5 minutes it publishes the readings via mqtt 
as a topic like tele/Roof_1_temperatures/SENSOR and a JSON message like;

<snip>

{"time":"2020-12-26t14:59:11","ds18s20-1":{"id":"0008019f913c","temperature":16.9},"ds18s20-2":{"id":"0008019faadb","temperature":15.1},"ds18s20-3":{"id":"000801b89032","temperature":17.0},"ds18s20-4":{"id":"000801f5af58","temperature":19.2},"ds18b20-5":{"id":"0000026b4c3f","temperature":18.1},"ds18b20-6":{"id":"000002e07aee","temperature":13.1},"tempunit":"c"}

</snip>

So using the MH mqtt gateway 
(https://github.com/hollie/misterhouse/wiki/Tasmota) and a bit of 
json-decode you can easily extract the temps to populate your own MH 
objects.

Hope this helps

Giles

On 26/12/2020 14:02, Stephen Switzer wrote:
> Several years ago, I ordered a serial to RJ11 adapter from 
> ibutton(something), called the link 12, and a few temperature sensors 
> that look like the standard TO-92 transistor package. I connected it 
> to MH, added one sensor to the network and tried to see if it worked. 
> I had plans to place sensors all around the house.
>
> However, I hadn't ever seen any response from the serial port and 
> shelved the project. I decided to look at it again yesterday and 
> discovered how it worked... sort of:
>
>
> f=First     \=Snif
> n=Next      |=Thru
> r=Reset     l=Level
> b=Byt(NN+)  ^=57600
> j=Bit(N+)   `=38400
> p=BytW/P    ,=19200
> ~=BitW/P    x=BusLo
> d=Aux+      $=Scan
> z=Aux-      *=List
> &=Aux?      h=Help
> (=Extend
> t=Type      "=Iso
>
>
> 420008003BE45B10
> !,420008003BE45B10
>
> I found that at 9600 baud I can press h to see the help, and *, $ will 
> also return data about the sensor that I have on the network. Wow! I 
> finally have something to work with, but I can't figure out where to 
> get the readings from. Pressing p, j or b all give a 1. One time I saw 
> a B3, but it doesn't seem to be repeatable. It's 179 anyway... my 
> server room rack better not be that temperature!!
>
> So, I continued and looked for some MH code to read the serial port 
> data. I found several examples, but none of them seemed to be for 
> reading the OW data directly from a serial port. All seemed to read a 
> dump from an external program - and all from Windows. I'm running Linux.
>
> So, I looked a owfs: installed it, configured it the best that I could 
> figure out and poked around the /run/owfs filesystem...
>
> root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 43.1086root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 91.3275root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 14.4802root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 94.4001root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 46.0749root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/latesttemp
> 90.8667root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
> 36.8015root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
> 1.73821root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
> 31.6712root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
> 65.0987root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
> 27.7991root@avalanche:~# cat /run/owfs/bus.0/10.67C6697351FF/temperature
>
> Every time I checked values, it was something different. Perhaps this 
> is because I twisted the sensors onto the wires, instead of a more 
> secure connection?
>
> Either way, I'm getting SOMETHING... so I think it's time to ask: how 
> do YOU gather OW data? Is there a module for MH to tread it directly, 
> or should we use something external?
>
> Thank you all!
>
> -- 
> Best regards,
> Steve Switzer
>
> ---
> Get world-class business I.T. services and a phone system with awesome features that won't challenge your budget!
> http://www.sbsROC.com  <http://www.sbsROC.com>
>
>
> ________________________________________________________
> To unsubscribe from this list, go to:https://lists.sourceforge.net/lists/listinfo/misterhouse-users
>

________________________________________________________
To unsubscribe from this list, go to: https://lists.sourceforge.net/lists/listinfo/misterhouse-users
Screenshot 2020-12-26 at 15.03.01.png (image/png, 121.9 KB) - not displayed
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.