kolarcz / node-w1temp

Measure temperature through DS18B20 sensor connected to 1wire to Raspberry PI with node.js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How do I reference dummy sensors for development purposes?

pulsating-brain opened this issue · comments

Loving your work!

I'm developing on Raspberry Pi for an aquarium. The aquarium must be rock-solid production code at all times - I don't want my fish to die. For this reason I'm going to use a 2nd Pi Zero with nothing plugged into it to develop the code.

How do I 'fool' the development code into thinking it's got sensors plugged into it? I've got a config.js file with separate staging and production parameters. Here's the staging object:
`
environments.staging = {
'httpPort': 3000,
'httpsPort': 3001,
'envName': 'staging',
'hashingSecret': 'thisIsASecret',
// TODO - dummy sensors

};
`

Thanks

Hi, It's not possible to do.. :/ You can only create yourself some mock library, which you replace with mine on development.