Page 1 of 1

Espeasy et jeedom

Posted: 20 Mar 2016, 17:43
by vinceducat
Bonjour,

a tous merci au createurs de espeasy pour cet excellent travail.

pensez vous qu une intergration de l envoi de valeur de sonde ds18b20 vers un system jeedom https://www.jeedom.com/ soit possible de maniere native ...

serait il possible d integrer cela dans une future version


merci

Re: Espeasy et jeedom

Posted: 20 Mar 2016, 17:49
by vinceducat
here te code i use in my esp with lua

- Creation d'une fonction qui va préparer la requete a envoyer à Jeedom pour mettre notre capteur virtuel à jour.
function build_post_request(path, key, value)
print("Contruction requete HTTP pour Jeedom")
payload = key .. "=" .. tostring(value)

return "POST " .. path .. " HTTP/1.1\r\n" ..
"Host: " .. server_ip .. "\r\n" ..
"Connection: close\r\n" ..
"Content-Type: application/x-www-form-urlencoded\r\n" ..
"Content-Length: " .. string.len(payload) .. "\r\n" ..
"\r\n" .. payload
end

-- Création de la fonction qui envoit la requête à Jeedom
function send_temperature(value)
print("Envoie temperature vers Jeedom")
temp=gettemp(gpio0)
block = true
sk = net.createConnection(net.TCP, 0)

sk:on("connection", function(sck)
request = build_post_request("/jeedom/core/api/jeeApi.php?apikey="..api_key.."&type=virtual&id="..id_capteur.."&", "value", value)
sk:send(request, function()
sk:close()
block = false
end)
end)

sk:connect(server_port, server_ip)
end

Re: Espeasy et jeedom

Posted: 21 Mar 2016, 18:34
by Deennoo
Vince, you have to speak english here.

I think Lunarock already explain how to on jeedom forum, using MQTT (Openhab MQTT protocole). You have to installé MQTT plug in.

Re: Espeasy et jeedom

Posted: 21 Mar 2016, 19:22
by vinceducat
I sorry for my french speeking in the first post.

my goal is to do the same like thinkspeak but with jeedom and without MQTT plugin is it possible to create the http request .. for jeedom ?

Re: Espeasy et jeedom

Posted: 21 Mar 2016, 21:26
by Deennoo
ESP Easy is open source, if you want it : try to do it by your own !

Pas de probleme pour le français tu ne savais pas.

Re: Espeasy et jeedom

Posted: 21 Mar 2016, 21:33
by maluko
hi deennoo, i had sent you a PM.

Re: Espeasy et jeedom

Posted: 22 Mar 2016, 19:37
by vinceducat
@deeno ... i will try it ... it seems that espeasy is based on .ino script is it correct ???

can i change one of them to create the "jeedom" confi in the web interface ?

Re: Espeasy et jeedom

Posted: 22 Mar 2016, 20:21
by vinceducat
can i have to create a new _C00x.ino file for jeedom based on thinspeak model ???

Re: Espeasy et jeedom

Posted: 24 Mar 2016, 15:36
by Deennoo
on beta r91 that done, you have generic http protocole

Re: Espeasy et jeedom

Posted: 25 Mar 2016, 20:02
by vinceducat
i find only r78 ... where to find r91??

Re: Espeasy et jeedom

Posted: 25 Mar 2016, 22:01
by Deennoo
maybe on github ? 2 raw under r78 ?

Re: Espeasy et jeedom

Posted: 26 Mar 2016, 09:24
by vinceducat
I see, but i will say a firmware in r91 version ...

Re: Espeasy et jeedom

Posted: 26 Mar 2016, 18:46
by vinceducat
i find,


compiled and upload r92 in a esp-01 but now ... red and blue are light...


i hope this is only a problen of option with generic esp8266 ... in arduino ide...

i choosse 512k ....

compile without any error...

Re: Espeasy et jeedom

Posted: 26 Mar 2016, 19:02
by vinceducat
@Deennoo

complie and load r92, but i m unable to uses generic hhtp to send value to jeedom....

in generic there is no field to enter api-key needed by jeedom

Re: Espeasy et jeedom

Posted: 26 Mar 2016, 22:58
by Deennoo
I dont use jeedom sorry.

You have to find your way...

Re: Espeasy et jeedom

Posted: 27 Mar 2016, 11:31
by vinceducat
@deenno,


i will try to modify the _c00x.ino thinspeak for jeedom ...

and give this to the community ,,, and sone perhaps could add this in a future release.... R150 :-)