# Sensor reading conversion from python to JS?

**URL:** <https://community.homey.app/t/sensor-reading-conversion-from-python-to-js/51061>\
**Category:** Questions & Help\
**Tags:** homeyscript, virtual-device\
**Created:** [September 1, 2021, 5:19pm UTC](https://community.homey.app/t/sensor-reading-conversion-from-python-to-js/51061 "2021-09-01T17:19:56Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Danny](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/danny/32/3331_2.png) [@Danny](https://community.homey.app/u/Danny)\
**Post date:** [September 1, 2021, 5:19pm UTC](https://community.homey.app/t/sensor-reading-conversion-from-python-to-js/51061/1 "2021-09-01T17:19:56Z")

</div>

I have a Edimax sensor i would like to connect to my Homey, but the only info i found is a python script.

I’m not a programmer, although normally i could read the code and sort of understand, and struggling to get it simplified or converted.

is there a way to convert or someone to point me in the right direction?

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [September 2, 2021, 7:38am UTC](https://community.homey.app/t/sensor-reading-conversion-from-python-to-js/51061/2 "2021-09-02T07:38:57Z")

</div>

As far as I am aware, there are no tools to convert between Python and JS. So it is just a case of manually converting, which requires an understanding of the two languages.  
Maybe you could provide a link to the Python code so we can see what is involved?

---

<div class="post-metadata">

**Author:** ![Danny](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/danny/32/3331_2.png) [@Danny](https://community.homey.app/u/Danny)\
**Post date:** [September 2, 2021, 8:24am UTC](https://community.homey.app/t/sensor-reading-conversion-from-python-to-js/51061/3 "2021-09-02T08:24:49Z")

</div>

Ok yes I have seen possible conversions but when I see JS it looks completely different.

Here is the Python code located  
[https://github.com/willmoffat/ParticleSensor/blob/main/edi\_green\_sensor.py](https://github.com/willmoffat/ParticleSensor/blob/main/edi_green_sensor.py)

I figured out some parts of it, but I need a good compiler with debugger or something. The whole searching for the device is too complex for me to understand via notepad++
