Support Forum

Share your projects and post your questions

Register   or   Sign In
The Forum

1 Wire & my Devices

The 1 Wire Pi Plus and 1 Wire Pi Zero are a 1 Wire interface for the Raspberry Pi

02/02/2018

Posted by:
Clownfishy

Clownfishy Avatar

Has anyone managed to get their 1 Wire Pi posting data into https://mydevices.com/cayenne/signin/. They state that as long as the devices are using pin 4, they should just be recognised. I am in no way an expert on GPIO and how just fumbling around with minimal knowledge using the PI but would really like to get the 1wire temperature sensors hanging off the 1 wire reporting into my Devices. I have them all working locally using owfs and the fantastic documentation found on this site so I know everything works.

Any pointers would be gratfully received

02/02/2018

Posted by:
andrew

andrew Avatar

After looking through the cayenne website it looks like the DS2482-100 chip used in the 1 Wire Pi isn't supported at the moment. I found this forum post on their support forum from December 2016 where there is a mention of adding support for the DS2484 to their roadmap but I couldn't find any other mention of whether or not it has been added as a supported device.

I will have a dig through their API to see if it is possible to add our boards to their system but in the meantime, it may be worth posting a message on their forums to see if they have any plans to add support for the DS2482-100.

02/02/2018

Posted by:
Clownfishy

Clownfishy Avatar

Wow, what a very fast response, thank you :-) I have now logged a question on their message board so I will ask teh question. I really am a novice but thanks to your board, I have 4 temperature 1 wire sensors hanging off of it and was hoping I can push this data to Cayenne. It would be awesome to see your board listed on there :-) I started looking at their option to add an "app" but I am getting way beyond my knowledge of code writing. My thought process was that if the board is not supported by Cayenne, maybe I could push the data from OWFS using curl or something but as I said, I am strugging to know where to start let alone learn how to do this!!!

Thanks again for your help as I am trying to reserect the buiding of an aquarium monitor listed below and was hoping to use Cayenne to display the data.

On other question, can this same 1 Wire Pi board be used in some way to connect to the ph altas scientifc circuit

02/02/2018

Posted by:
Clownfishy

Clownfishy Avatar

Updating this thread with the thread on Cayenne's support forum asking when Cayenne will support DS2482-100

http://community.mydevices.com/t/ab-electronics-1-wire-pi/7553/2

02/02/2018

Posted by:
andrew

andrew Avatar

The Ezo PH board does not support 1 Wire so you can not connect it to the Raspberry Pi through the 1 Wire Pi but it does support I2C and UART so you can connect it directly to the GPIO header on your Raspberry Pi.

The easiest way to connect the board would be to use the UART bus which is pins 8 and 10 on the GPIO header. You will need to connect the Vcc pin on the board to pin 1 or 3.3V on the Raspberry Pi GPIO, GND connects to pin 6 on the GPIO header, RX goes to pin 8 and TX goes to pin 10. You can find a list of the GPIO pins at Pinout.xyz/

Just make sure you are powering the board from the 3.3V pin and not 5V otherwise you could damage the UART pins on the GPIO header.

To use the UART bus on your Raspberry Pi you will first need to enable it and disable the console mode which is what Raspbian Linux is set to by default. We have a tutorial in our Knowledge Base for setting up the serial port on a Raspberry Pi.

03/02/2018

Posted by:
andrew

andrew Avatar

I have had some success after playing with the mydevices.com system. You can connect custom devices using the Python Cayenne MQTT client so I wrote a basic python script which connects to mydevices.com using the MQTT client and uploads the temperature for any connected 1-Wire devices every 10 seconds.

You can find the script at cayenne_1wire_temperature.py

To get the script working you will first need to install the Cayenne system on your Raspberry Pi if you haven't done so already. You can do this on the Cayenne dashboard by clicking "Add new...", selecting Raspberry Pi and following the instructions.

Next, install the python MQTT library with the command below on your Raspberry Pi.


pip install cayenne-mqtt

To add the 1-Wire sensors click the "Add new..." button, select "Devices & Widgets" and then "Bring Your Own Thing". A page will load with a list of SDKs on the left and the device details on the right. You will need to copy the MQTT username, password and client ID into the python script I wrote, replacing the "USERNAME", "PASSWORD", and "CLIENT_ID" strings on lines 8, 9 and 10. Now run the python script with:


python cayenne_1wire_temperature.py

If the script works correctly you should get a list of the available 1-Wire devices that appear on the screen and then it will start uploading the temperatures from each sensor every 10 seconds.

Hopefully, this will help you get your sensors onto the Cayenne system.

Sign in to post your reply


Note: documents in Portable Document Format (PDF) require Adobe Acrobat Reader 5.0 or higher to view.
Download Adobe Acrobat Reader or other PDF reading software for your computer or mobile device.

Home

Shop

Learn

Forum

FAQ

Contact

0 item

Your cart is empty

Please browse our shop to order from the wide range of Raspberry Pi boards and accessories.

Subtotal:£0.00
View Basket Continue to Checkout