ARDUINO DOWNLOAD

Plugin to facilitate the communication (read/write/set PIN config) between INDIGO and an ARDUINO through WiFi/ETHERNET. Included is an example “SKETCH” for an ARDUINO that should work without modifications.
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

posted v 7.9.10

fixed "key error mrk1000"

now on plugin store w link to GitHub for plugin source

Karl
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

posted v 7.9.11

fixed "bad indent line 35"


Karl
slackman1
Posts: 52
Joined: Mon Jun 20, 2011 3:52 am

Re: ARDUINO DOWNLOAD -> where is arduino.ino sketch?

Post by slackman1 »

Hi Karl,

Can't seem to find the arduino.ino sketch in the downloaded zipfile, also checked older downloads...

Thanks for your help.

Best regards, Gerrit Jan
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

ARDUINO DOWNLOAD

Post by kw123 »

wackena
Posts: 31
Joined: Fri Jan 07, 2022 10:29 am

Re: ARDUINO DOWNLOAD

Post by wackena »

I got the Arduino Plugin connected to Arduino ESP16 board. Indigo can read sensor value from Arduino. Can Indigo write sensor values to Arduino? I'm using a z-wave temp sensor on Indigo and want to. display on Arduino TM1637 digital display. If possible, please advise.
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

the plugin can send commands to the arduino to set GPIOs up / down, amps up down, pulse etc.

you could use that to send other data, but then you will need to really change the receiving pgm on the arduino.

Karl
wackena
Posts: 31
Joined: Fri Jan 07, 2022 10:29 am

Re: ARDUINO DOWNLOAD

Post by wackena »

I have a Fibaro FGBS-222 smart implant (z-wave) connected to DHT-22 Temp/Humidity device. Because the smart implant does not auto update Temp and Humidity values to Indigo app, I used a "Schedule" to set frequency to "send update request".

This code send temperature value to IndigoArduino script and is displayed on a TM1637.

Thanks

Code: Select all

import time

indigo.device.statusRequest(552277016) #DHT-22 Temperature
indigo.device.statusRequest(1982059710) #DHT-22 Humidity
time.sleep(1)

tempDev = indigo.devices[552277016].states["sensorValue"] # "055 - Sensor 1"
humidDev = indigo.devices[1982059710].states["sensorValue"] # "055 - Sensor2"

Fahrenheit = round((tempDev * 1.8) + 32,1)

indigo.variable.updateValue(85670234, value=unicode(Fahrenheit))

tempSensor = indigo.variables[85670234]
if tempSensor > 0:
        sensorLog = "OK"

indigo.server.log("Updated varibale tempVar to "+str(tempDev) +" ºC - " + str(round(Fahrenheit,1)) + " ºF - "+sensorLog+" - Humidity - "+str(humidDev)+"%")

plug = indigo.server.getPlugin("com.karlwachs.arduino")
plug.executeAction("setPins" ,  #send temp value to IndigoArduino script
   props ={
    "CMD":"analogWrite"
   ,"Pin" :"D3"    
   ,"aValue": tempDev  # DHT-22 temp value
   ,"device": "Arduino Test"}  # indigo  device name
   ) 
reugster
Posts: 14
Joined: Thu Mar 24, 2016 9:48 pm

Re: ARDUINO DOWNLOAD

Post by reugster »

Ive tried the links in these messages but cannot find the arduino.ino file. The only thing i ever get is the plugin and i cant find the .ino file anywhere.
Robert
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

arduino.ino file(s) are in first post in viewtopic.php?f=178&t=14043 ~ 20 lines from top
reugster
Posts: 14
Joined: Thu Mar 24, 2016 9:48 pm

Re: ARDUINO DOWNLOAD

Post by reugster »

Well, I figured out the problem, the instructions say arduino.ino but the file in the links is indigo.ino
Ive been looking for arduino.ino the whole time..


Setup Steps:
0.You must download the arduino.ino sketch attached in the zip file to your UNO/MEGA+ethernet/WIFI or ESP board . .. and set the proper IP number (and MAC# for ethernet) and or Wifi SSID/password in the sketch
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

added features / changes in v2022.9.11 @ 2023-06-25
===================================================

1. converted code to py3
replaced urllib with requests, changed exceptions

it compiles and runs, but not tested.
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

added features / changes in v2022.9.12 @ 2023-06-26
===================================================
fixed some execption handling and read http response
User avatar
kw123
Posts: 8421
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: ARDUINO DOWNLOAD

Post by kw123 »

Code: Select all

dded features / changes in v2022.9.16 @ 2023-08-03
===================================================
1.  added in parse from arduino:
  - response from arduino; b’>>rd:S1=xxx&rd:S2=xxx& … &S7=xxx’  in python3 
  - remove b (byte indicator)
  - remove >> at beginning of string
  - use last 2 char for command id as all cmds are only 2 char long.
2. reduced the error log dump when connection to arduino fails.
Post Reply

Return to “ARDUINO Plugin”